Starting a child process and getting its stdout?

cypher543 david at cypherspace.info
Thu Dec 28 23:09:30 EST 2006


This has been driving me insane for the last hour or so. I have search
everywhere, and nothing works. I am trying to use the subprocess module
to run a program and get its output line by line. But, it always waits
for the process to terminate and then return the output all at once.

Can someone please show me some code that actually works for this sort
of thing? It doesn't even have to use the subprocess module. Don't
worry if the code isn't compatible with Windows. My program is targeted
at Linux/UNIX users.

Thanks!




More information about the Python-list mailing list