[Python-ideas] Suprocess functionality partitioning

Andrew Barnert abarnert at yahoo.com
Thu Jun 13 03:59:19 CEST 2013


On Jun 12, 2013, at 13:38, Chris Rebert <pyideas at rebertia.com> wrote:

> shell=False, isinstance(args, str) ==>
> Works only if no arguments are being passed to the subprocess.

That's only true on POSIX. On Windows, this not only works, it's the most straightforward way to do it.

> shell=False, isinstance(args, list) ==> works normally

Except that on Windows it has to build a string out of your args, attempting to craft the right string that the child will then parse back into the specified args. Which _usually_ works, but when you start doing complicated things with quoting it doesn't.


More information about the Python-ideas mailing list