Equivalent of system()?

Jeff Schwab jeff at schwabcenter.com
Sat Feb 23 00:00:21 EST 2008


Max wrote:
> Is there a Python equivalent of C++'s system()?

More or less.  You probably want subprocess.Popen:

 >>> import subprocess
 >>> subprocess.Popen("echo hello", shell=True)
hello
<subprocess.Popen object at 0x2ab8f3665d10>

http://docs.python.org/lib/node533.html#CHILD_LINKS



More information about the Python-list mailing list