How does os.popen works ?
Rouk
cuny at iie.cnam.fr
Sat Feb 8 10:37:02 EST 2003
Hello, i have a problem with os.popen function.
It seems that the command that is launched must be finished before one
can read from the pipe which was opened.
I made a script called chld.py that writes several lines on stdout with a
pause of one second between them.
Following code wait until all lines have been written.
>>> a = os.popen("./chld.py", "r", 0)
>>> a.readline()
How can i do to get the lines as soon as they are written to stdout ?
I havn't found anything about it on the web...
Thanks !
More information about the Python-list
mailing list