R. David Murray added the comment:

Well, it sounds like there may be no way around the fact that people may 
already be doing the extra needed quoting escaping internal quotes) and 
therefore that this change would break those use cases.  (I note that any such 
code must be conditional on windows vs unix, since escaping the quotes will 
break the same command executed on unix).  

Unless...what if we conditionalize it on whether or not '\"' and/or '\\' 
appears in the argument?

And yes, the fundamental problem is that Windows provides no way to call a 
program with a list of not-to-be-modified strings.  The problem with a .bat 
parsing its argument string differently from how everything else parses its 
argument string is not a new problem, and is faced by anyone using subprocess.  
distutils is trying to be (relatively) platform agnostic, to my understanding, 
so again we'd have to actually parse the input, this time looking for '.bat' 
and quoting accordingly.

If we solve the .bat problem (as opposed to ignoring it like we currently do in 
subprocess) we should fix it in subprocess too.

This is certainly getting non-trivial :(

----------

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

Reply via email to