Mike Driscoll on Twitter: "#Python's `subprocess` module also lets you read stdout and stderr during a long running process. One common method of accomplishing this is to use `subprocess.Popen` and set `stdout=subprocess .PIPE`
subprocess - Python Interpreter within Interpreter - Stack Overflow