|
6.8 popen2 -- Subprocesses with accessible I/O streams
Availability: Unix, Windows. This module allows you to spawn processes and connect to their input/output/error pipes and obtain their return codes under Unix and Windows. Note that starting with Python 2.0, this functionality is available using functions from the os module which have the same names as the factory functions here, but the order of the return values is more intuitive in the os module variants.
The primary interface offered by this module is a trio of factory
functions. For each of these, if bufsize is specified,
it specifies the buffer size for the I/O pipes. mode, if
provided, should be the string 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 are only available on Unix. This information is not available when using the popen2(), popen3(), and popen4() functions, or the equivalent functions in the os module.
On Unix, a class defining the objects returned by the factory functions is also available. These are not used for the Windows implementation, and are not available on that platform.
Subsections See About this document... for information on suggesting changes. |