[Tutor] Docs for os popen and Popen2 modules
cappy2112 at gmail.com
Wed Dec 6 04:18:23 CET 2006
Running python 2.3.4, on Windows XP
the popen2 docs show
6.8 popen2 -- Subprocesses with accessible I/O streams
This module allows you to spawn processes and connect to their
input/output/error pipes and >>obtain their return codes under Unix and
Then it further goes to say
The only way to retrieve the return codes for the child processes is by
using the poll() or wait() methods on the Popen3 and Popen4 classes; these
>>only available on Unix<<.
This information is not available when using the popen2(), popen3(), and
popen4() functions, or the equivalent functions in the os
After having spent much time reading about the differences between the popen
calls in the os module, and the popen calls in popen2, if the return values
aren't available under windows, I'm confused.
Why bother making these functions available under Windows at all? Other than
the order of the return values, I don't see any advantage of one over the
Since the document contradicts itself regaring the return values on Windows,
is there a way to get the return values or not?
Is so- how?
Since poll and wait are only available on Unix, how do we wait for a process
to finish under Windows?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor