Work on some code, and I get an error when starting from the command line ...
NameError: name 'Popen' is not defined
but I imported both import os and import sys .
Here is a piece of code
exepath = os.path.join(EXE File location is here) exepath = '"' + os.path.normpath(exepath) + '"' cmd = [exepath, '-el', str(el), '-n', str(z)] print 'The python program is running this command:' print cmd process = Popen(cmd, stderr=STDOUT, stdout=PIPE) outputstring = process.communicate()[0]
Am I missing something basic? I would not doubt it. Thank!
python popen
Tyler Jun 17 '09 at 15:38 2009-06-17 15:38
source share