Fighting with subprocess.Popen

Christian Heimes lists at cheimes.de
Sun Feb 14 21:43:22 CET 2010


Mr.John wrote:
> Below is a test case that demonstrates this. Tests 1 & 2 concatenate the
> command and the argument, Tests 3 & 4 mimic the python docs and use the form
> Popen(["mycmd", "myarg"], ...), which never seems to work.

It doesn't work with shell=True because the shell is not able to
interpret the list form. It's recommended that you don't use shell=True
unless you need a shell.

Christian




More information about the Python-list mailing list