[issue11139] subprocess: Arguments to .bat scripts get interpreted by shell

2011-02-07 Thread Arve Knudsen
Arve Knudsen added the comment: I'll keep it in mind. On Mon, Feb 7, 2011 at 8:00 PM, R. David Murray wrote: > > R. David Murray added the comment: > > Yes, having a cmd.exe 'quote' function, parallel to the shutil 'quote' > function, would be an excellent addition to the stdlib. You could o

[issue11139] subprocess: Arguments to .bat scripts get interpreted by shell

2011-02-07 Thread R. David Murray
R. David Murray added the comment: Yes, having a cmd.exe 'quote' function, parallel to the shutil 'quote' function, would be an excellent addition to the stdlib. You could open a feature request for that. -- ___ Python tracker

[issue11139] subprocess: Arguments to .bat scripts get interpreted by shell

2011-02-07 Thread Arve Knudsen
Arve Knudsen added the comment: The non-obvious thing with 8972 is what to do with an argument list when the 'shell' option is True, isn't it? I can't see how it overlaps with my case. My suggestion is a flag to enable argument protection in Popen, either just for arguments passed as a list (i.e

[issue11139] subprocess: Arguments to .bat scripts get interpreted by shell

2011-02-07 Thread R. David Murray
R. David Murray added the comment: As noted in issue 8972, it's not clear what such a mode should actually do. If you have a concrete proposal you could make it, probably on the python-ideas mailing list. But I'm personally not in favor of it; I prefer maintaining as much API consistency be

[issue11139] subprocess: Arguments to .bat scripts get interpreted by shell

2011-02-07 Thread SilentGhost
Changes by SilentGhost : Removed file: http://bugs.python.org/file20714/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue11139] subprocess: Arguments to .bat scripts get interpreted by shell

2011-02-07 Thread SilentGhost
Changes by SilentGhost : Removed file: http://bugs.python.org/file20712/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue11139] subprocess: Arguments to .bat scripts get interpreted by shell

2011-02-07 Thread Arve Knudsen
Arve Knudsen added the comment: I wasn't saying that subprocess is interpreting the arguments, but that the shell is. Which was highly unexpected to me when outside of shell mode (i.e., shell == False). From some further testing, though, I see that the transformation from sequence to command lin

[issue11139] subprocess: Arguments to .bat scripts get interpreted by shell

2011-02-07 Thread R. David Murray
R. David Murray added the comment: The point is that subprocess (now!) is *not* interpreting the arguments when shell is false. It is passing them through to Windows. What windows does with them after that is out of the control of subprocess (and always has been). -- __

[issue11139] subprocess: Arguments to .bat scripts get interpreted by shell

2011-02-07 Thread Arve Knudsen
Arve Knudsen added the comment: Would you mind defining why the 2.7 behaviour is correct in this particular case? The list2cmdline behaviour discussed in issue 8972 has to do with shell commandlines; in this case, in my eyes any shell invocation (in order to run a .bat I guess) is only an implem

[issue11139] subprocess: Arguments to .bat scripts get interpreted by shell

2011-02-07 Thread R. David Murray
R. David Murray added the comment: Well, it's not really a duplicate, but rather invalid, since the 2.7 behavior is more correct than the 2.6 behavior. Not that it matters all that much what particular resolution is attached to a bug. Arve: It is unfortunate that the bug fix in issue 8972 ca

[issue11139] subprocess: Arguments to .bat scripts get interpreted by shell

2011-02-07 Thread SilentGhost
SilentGhost added the comment: This seem to have been discussed in issue8972: closing as a duplicate. -- nosy: +SilentGhost resolution: -> duplicate status: open -> closed ___ Python tracker _

[issue11139] subprocess: Arguments to .bat scripts get interpreted by shell

2011-02-07 Thread SilentGhost
Changes by SilentGhost : -- versions: +Python 3.1, Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue11139] subprocess: Arguments to .bat scripts get interpreted by shell

2011-02-07 Thread Arve Knudsen
New submission from Arve Knudsen : As a regression from Python 2.6, when running .bat scripts on Windows with f.ex. subprocess.call under Python 2.7.1, arguments get interpreted by the shell. This bit me in the way that I could no longer pass arguments containing the character '|' to .bat scri