On Nov 8, 2:43 am, m...@distorted.org.uk (Mark Wooding) wrote: > > I don’t know what happens to the extra arguments, but they just seem > > to be ignored if -c is specified. > > The argument to -c is taken as a shell script; the remaining arguments > are made available as positional parameters to the script as usual (only > starting with $0 rather than $1, for some unknown reason).
Perhaps this example better demonstrates what is going on: >>> p = subprocess.Popen(['echo one $0 three $1 five', 'two', 'four'], ... shell=True) one two three four five Cheers, Ian -- http://mail.python.org/mailman/listinfo/python-list