subprocess.Popen question

Danny Wong (dannwong) dannwong at cisco.com
Tue Aug 16 03:03:50 EDT 2011


Hi All,
	I'm executing a command which I want to capture the
standard/stderr output into a file (which I have with the code below),
but I also want the standard output to go into a variable so I can
process the information for the next command. Any ideas? Thanks.

CMD_OUTPUT = subprocess.Popen(COMMAND, stdout=PROJECT_LOGFILE,
stderr=subprocess.STDOUT)





More information about the Python-list mailing list