Paul Moore added the comment:

On Windows, subprocess.Popen has to convert an argument list to a command line 
(because that's what the OS expects for CreateProcess). It does so internally, 
using subprocess.list2cmdline, which follows the quoting rules for the MS C 
runtime (because that's what 99% of programs use). Unfortunately batfile 
argument parsing does *not* use these conventions, and you can find odd corner 
cases like this.

Specifically, it's not possible on Windows to "correctly" quote all forms of 
argument without knowing what program you are calling (because programs do 
their own argument parsing, usually but not always via the C runtime). The 
subprocess module has to work for unknown executables, so it chooses to do the 
right thing for programs using the MS C runtime argument parser (which is most 
programs).

----------
nosy: +paul.moore
resolution:  -> not a bug
status: open -> closed

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

Reply via email to