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,
:)



      

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to