shlex, unicode, and subprocess.Popen on Windows

Nobody nobody at nowhere.com
Mon Aug 30 15:25:42 EDT 2010


On Mon, 30 Aug 2010 10:24:26 -0400, python wrote:

>> Kudos for avoiding shell=True
> 
> My understanding is that the only time one needs to use shell=True is
> when they are 'executing' a non-executable file whose executable must be
> discovered via file association rules? Does that sound accurate?

You also need to use it to execute commands which are built into the shell
rather than being separate executables.

On Windows, whether "shell" is True or False and whether "args" is a
string or list are orthogonal. If args is a list, it will be converted to
a string using the same rules regardless of whether the shell is used.




More information about the Python-list mailing list