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.