Lawrence D'Oliveiro <l...@geek-central.gen.new_zealand> writes: > In message <ib0kor01...@news5.newsguy.com>, Chris Torek wrote: > > > ['/bin/sh', '-c', 'echo', '$MYVAR'] > > > > (with arguments expressed as a Python list). /bin/sh takes the > > string after '-c' as a command, and the remaining argument(s) if > > any are assigned to positional parameters ($0, $1, etc). > > Doesn’t work.
What doesn't work? You were being given an explanation, not a solution. > 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). -- [mdw] -- http://mail.python.org/mailman/listinfo/python-list