This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sbt
Recipients Arve.Knudsen, exarkun, piotr.dobrogost, r.david.murray, sbt
Date 2013-08-04.16:21:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375633316.16.0.52863653465.issue18649@psf.upfronthosting.co.za>
In-reply-to
Content
> I think you're missing the point. The implementation is wrong as it 
> does not do what documentation says which is "A double quotation mark 
> preceded by a backslash is interpreted as a literal double quotation 
> mark."

That docstring describes how the string returned by list2cmdline() is interpreted by the MS C runtime.  I assume you mean this bit:

    3) A double quotation mark preceded by a backslash is
       interpreted as a literal double quotation mark.

This looks correct to me: it implies that list2cmdline() must convert a double quotation mark to a double quotation mark preceded by a backslash.  e.g.

  >>> print(subprocess.list2cmdline(['"']))
  \"

> How the output of list2cmdline interacts with the cmd.exe is another 
> issue (It just happens here that if implementation of list2cmdline were 
> in line with its documentation then there wouldn't be any subsequent 
> problem with cmd.exe).

As I said, list2cmdline() behaves as expected.  Whatever else happens, "|" must be escaped with "^" or else cmd will interpret it specially.
History
Date User Action Args
2013-08-04 16:21:56sbtsetrecipients: + sbt, exarkun, r.david.murray, Arve.Knudsen, piotr.dobrogost
2013-08-04 16:21:56sbtsetmessageid: <1375633316.16.0.52863653465.issue18649@psf.upfronthosting.co.za>
2013-08-04 16:21:56sbtlinkissue18649 messages
2013-08-04 16:21:56sbtcreate