[Tutor] error when using using subprocess.popen in Python wrapper script
Rogelio
scubacuda at gmail.com
Mon May 7 09:18:41 CEST 2012
If I want to write this command to a file, would this be the right format?
*********************************
import subprocess
(all my variables defined okay)
perl_script=subprocess.call(['perl',perl_prog,ipfile,cmd,user,timeout,])
log=open('/tmp/pythonOutput.txt',w)
log.write(subprocess.call(perl_script))
*********************************
The program runs (and outputs stuff on the screen okay), but when I
"cat /tmp/pythonOutput.txt", nothing is there.
(While I'm not waiting for the entire program to run across all the IP
addresses, I would think that something would be go out into that log
file.)
More information about the Tutor
mailing list