Starting a child process and getting its stdout?
Tom Plunket
tomas at fancy.org
Fri Dec 29 14:52:43 EST 2006
cypher543 wrote:
> Thank you for the examples, but I have tried all of that before.
Did you try my example specifically?
> No matter what I do, my program always hangs while it waits for the
> process to exit and then it prints all of the output at once.
>
> self.buildPID = subprocess.Popen(["python", "tobeforked.py"], ...
By default, python will execute in buffered mode if it's attached to a
pipe. Start it with the '-u' command line option and you may be good to
go. (`python -h` for more info on this, man pages may also discuss it.)
-tom!
--
More information about the Python-list
mailing list