[issue8972] subprocess.list2cmdline doesn't quote the & character

2014-07-15 Thread R. David Murray
R. David Murray added the comment: The problem pointed to by this report was resolved by the revert. The issue of what to do about a list passed with shell=True is addressed (with no consensus) by issue 7839. A proposal to add a windows equivalent of shlex.quote has been floated, but no take

[issue8972] subprocess.list2cmdline doesn't quote the & character

2014-07-12 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: -brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue8972] subprocess.list2cmdline doesn't quote the & character

2014-07-12 Thread Mark Lawrence
Mark Lawrence added the comment: I believe this is still valid in which case could we have the stage and resolution fields set appropriately please. You might also like to take a look at issue 13238 which is referred to by issue 7839. -- nosy: +BreamoreBoy versions: +Python 3.4, Pytho

[issue8972] subprocess.list2cmdline doesn't quote the & character

2011-03-03 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue8972] subprocess.list2cmdline doesn't quote the & character

2011-02-07 Thread SilentGhost
SilentGhost added the comment: issue11139 was closed as a duplicate of this issue. -- nosy: +SilentGhost ___ Python tracker ___ ___ Py

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-18 Thread R. David Murray
R. David Murray added the comment: The reason that Popen doesn't do "the obvious thing" with a list and shell=True is that it is far from obvious what the correct thing is to do, especially for windows. Thanks for the revert, exarkun. -- ___ Pytho

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-18 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: I've reverted the issue1300 revision from 2.6, 2.7, 3.1, and 3.2. I hope 7839 is resolved soon. -- ___ Python tracker ___ ___

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-18 Thread shypike
shypike added the comment: I see your point about passing a command line as a single string instead of a list. Too bad that Popen doesn't just do the obvious thing (assemble the list into a string in a shell/cmd.exe compatible way). Issue 1300 should indeed be reversed. Raising ValueError wi

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-13 Thread R. David Murray
R. David Murray added the comment: The actual bug here is that list2cmdline is called when shell=True and a list is passed. This should not be done. Instead, Popen should raise an TypeError (see issue 7839). When calling Popen with shell=True, you should be passing in a string that is alre

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-13 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > That remark is not relevant, because the actual problem is different. Maybe you can expand the test case to demonstrate the actual problem? The tests in the latest patch are for list2cmdline directly. But you can't observe the problem a bug in list2c

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-13 Thread shypike
shypike added the comment: The discussion is going the wrong way. Let me state what is the actual problem. When the Popen() function is called with "shell=True", you cannot pass command line elements in which the characters '&' and '|' are embedded (example r'Q&A'). list2cmdline should embed s

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-13 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-12 Thread shypike
shypike added the comment: A work-around could be that the caller puts double quotes around the individual elements of the sequence that need it. However, this won't work because list2cmdline doesn't handle backslash quoting properly. An element like r'"foo"' is translated to r'\"foo\"'. This

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-12 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: http://www.autohotkey.net/~deleyd/parameters/parameters.htm#WINCRULES is a helpful reference, by the way. -- ___ Python tracker ___ __

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-12 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: +brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-12 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone : -- components: +Library (Lib) stage: unit test needed -> ___ Python tracker ___ ___ Python-bugs-list

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-12 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Thanks. I'm not sure this is a correct change. And in fact, I would say that the current quoting of | is also incorrect. & and | (and ^ and perhaps several others) have special meaning to cmd.exe. list2cmdline is documented as applying the quoting rul

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-12 Thread shypike
shypike added the comment: Added patch file for subprocess.py and test_subprocess.py. -- keywords: +patch Added file: http://bugs.python.org/file17645/list2cmdline_ampersand_fix.patch ___ Python tracker ___

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-12 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> unit test needed versions: +Python 2.7 -Python 2.5 ___ Python tracker ___ _

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-12 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Thanks for reporting this issue. Can you attach a patch which adds a unit test covering this behavior and fixing the quoting rules? It would be very helpful in resolving this ticket. If implementing the whole thing is too much work, if you could just

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-11 Thread shypike
New submission from shypike : subprocess.py/list2cmdline should also put double quotes around strings that contain ampersands (&), but no spaces. If not, the Windows command processor will split the command into two separate parts. In short, '&' needs the same treatment as '|'. -- comp