[Tutor] calling other process?
Bernard Rankin
berankin99 at yahoo.com
Sun Feb 8 20:40:58 CET 2009
Hello,
I've been reading the Python docs on how to call a 2nd program and getting it's output, and would up here:
http://docs.python.org/library/subprocess.html
Is:
from subprocess import Popen
output = Popen(["mycmd", "myarg"], stdout=PIPE).communicate()[0]
Really the replacement for:
output = `mycmd myarg`
Is there a less verbose, yet still official supported, way to capture STDOUT from a different program?
Thank you,
:)
More information about the Tutor
mailing list