Capturing stdout without waiting for the process end

Luigi luigipaioro at libero.it
Mon Apr 3 12:56:12 EDT 2006


I use Linux.

So, if I modify my sdtout behaviour, when I execute:

fin, fout = os.popen4(arg)

this is executed asyncronously? And how can I intercept a fout.write()
event?

The question is that I have a C program (by third part) that streams
the logs into the stderr and stdout devices. I need to create an
envelopment that captures the outputs and puts them in a file
generating log events (for a real-time view).

Thanks

Luigi




More information about the Python-list mailing list