calling python scripts as a sub-process

Jeremy Sanders jeremy+complangpython at jeremysanders.net
Wed Nov 19 16:43:43 EST 2008


Dan Upton wrote:

> I think when I came across this error, I added shell=True, e.g.
> 
> sub1 = subprocess.Popen(command, shell=True)

That's really papering over the bug. You need to have the parameters
separately, including the name of the program, separately in the list. You
need to remove any shell quoting you may use on the unix/dos command line.

Jeremy

-- 
Jeremy Sanders
http://www.jeremysanders.net/



More information about the Python-list mailing list