Ok so the problem I\'m trying to solve is this:
I need to run a program with some flags set, check on its progress and report back to a server. So I need my script
You can use twisted library for this use case. I think it will be great for that
http://www.cs.lth.se/EDA046/assignments/assignment4/twisted/listings/process/quotes.py
documentation : http://www.cs.lth.se/EDA046/assignments/assignment4/twisted/process.html
Basically you have 3 options:
threading
to read in another thread without blocking the main thread.communicate
. This way you can read just when data is available and avoid blocking.