Chris Rebert <pyb...@rebertia.com> added the comment:

> The reason I'm not a fan is the fact that, with "shell=True", you can use the 
> *executable* argument to Popen to select a non-default shell. At that point, 
> passing a list can make sense, even if it isn't useful for the default shell.

Modulo Windows, at that point, why not just run the shell explicitly (i.e. 
shell=False, args=['my_sh', ...])? Also, a '-c' argument will be forcibly 
prepended to the passed-in `args` in your case, which may frustrate such 
use-cases.

> For the other way around, passing a string with "shell=False" can be a 
> straightforward way to launch GUI applications from a script.

And they may need to eventually pass it (an) argument(s), and when that 
happens, cue confusion! There's a reason the `subprocess` docs feature the 
not-strictly-necessary clause "[a str `args` w/ shell=False] will only work if 
the program is being given no arguments". The distinction regularly 
trips/tripped users up.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7839>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to