[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

[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,

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

2014-07-12 Thread Brian Curtin
Changes by Brian Curtin br...@python.org: -- nosy: -brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8972 ___ ___ Python-bugs-list

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

2011-03-03 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8972 ___ ___

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

2011-02-07 Thread SilentGhost
SilentGhost ghost@gmail.com added the comment: issue11139 was closed as a duplicate of this issue. -- nosy: +SilentGhost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8972 ___

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

2010-06-18 Thread shypike
shypike shyp...@sabnzbd.org 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.

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

2010-06-18 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@twistedmatrix.com 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 rep...@bugs.python.org http://bugs.python.org/issue8972

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

2010-06-18 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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. --

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

2010-06-13 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8972 ___ ___ Python-bugs-list mailing

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

2010-06-13 Thread shypike
shypike shyp...@sabnzbd.org 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'QA').

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

2010-06-13 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@twistedmatrix.com 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

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

2010-06-13 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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

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

2010-06-12 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@twistedmatrix.com 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

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

2010-06-12 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - unit test needed versions: +Python 2.7 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8972 ___

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

2010-06-12 Thread shypike
shypike shyp...@sabnzbd.org 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 rep...@bugs.python.org

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

2010-06-12 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@twistedmatrix.com 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

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

2010-06-12 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone exar...@twistedmatrix.com: -- components: +Library (Lib) stage: unit test needed - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8972 ___

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

2010-06-12 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- nosy: +brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8972 ___ ___ Python-bugs-list mailing

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

2010-06-12 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@twistedmatrix.com added the comment: http://www.autohotkey.net/~deleyd/parameters/parameters.htm#WINCRULES is a helpful reference, by the way. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8972

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

2010-06-12 Thread shypike
shypike shyp...@sabnzbd.org 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

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

2010-06-11 Thread shypike
New submission from shypike shyp...@sabnzbd.org: 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