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. I don’t know what happens to the extra arguments, but they just seem to be ignored if -c is specified. sh -c 'echo hi' echoes “hi”, while sh -c echo hi just outputs a blank line. -- http://mail.python.org/mailman/listinfo/python-list