Nikolaus Rath wrote:
you almost certainly want to do
Popen(['/bin/sh', 'for i in `seq 42`; do echo $i; done'], shell=False)
because if your shell happens to be tcsh or cmd.exe, things are going to
break.
On Unix, the C library's system() and popen() functions
always use /bin/sh, NOT the user's current login shell,
for this very reason.
I would hope that the Python versions of these, and also
the new subprocess stuff, do the same.
That still leaves differences between Unix and Windows,
but explicitly naming the shell won't help with that.
--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com