subprocess

subprocess — Subprocess management

New in version 2.4.

The subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. This module intends to replace several older modules and functions:

os.system
os.spawn*
os.popen*
popen2.*
commands.*

Information about how this module can be used to replace the older functions can be found in the subprocess-replacements section.

See also

POSIX users (Linux, BSD, etc.) are strongly encouraged to install and use the much more recent 登录查看完整内容