popen2

Spawn a command with pipes to its stdin, stdout, and optionally stderr.

The normal os.popen(cmd, mode) call spawns a shell command and provides a file interface to just the input or output of the process depending on whether mode is ‘r’ or ‘w’. This module provides the functions popen2(cmd) and popen3(cmd) which return two or three pipes to the spawned command.

Functions

popen2(cmd[, bufsize, mode]) Execute the shell command ‘cmd’ in a sub-process.
popen3(cmd[, bufsize, mode]) Execute the shell command ‘cmd’ in a sub-process.
popen4(cmd[, bufsize, mode]) Execute the shell command ‘cmd’ in a sub-process.

Classes

Popen3(cmd[, capturestderr, bufsize]) Class representing a child process.
Popen4(cmd[, bufsize])