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 Value
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
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
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
<http://bugs.python.org/issue8
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