[Python-ideas] Suprocess functionality partitioning
Chris Rebert
pyideas at rebertia.com
Thu Jun 13 08:23:53 CEST 2013
On Jun 12, 2013 6:59 PM, "Andrew Barnert" <abarnert at yahoo.com> wrote:
> 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.
Ah, Windows. Always gotta be different.
I suppose the subprocess module may have bitten off more than it can chew
in trying to have a single completely cross-platform constructor.
Cheers,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130612/045fa13f/attachment.html>
More information about the Python-ideas
mailing list