merge from 3.1
authorEli Bendersky <eliben@gmail.com>
Fri, 15 Apr 2011 04:26:28 +0000 (07:26 +0300)
committerEli Bendersky <eliben@gmail.com>
Fri, 15 Apr 2011 04:26:28 +0000 (07:26 +0300)
1  2 
Doc/library/subprocess.rst

index bcd38de3e3cb9cf7ed1efaab740d1cd6a61cbdc7,7188b9570239da96148c5fa15fe06dbf84aa3962..f0a632a71cc1265642c97af2c4d1b3f99e29d159
@@@ -662,5 -606,37 +660,39 @@@ Replacing functions from the :mod:`pope
  * ``stdin=PIPE`` and ``stdout=PIPE`` must be specified.
  
  * popen2 closes all file descriptors by default, but you have to specify
 -  ``close_fds=True`` with :class:`Popen`.
 +  ``close_fds=True`` with :class:`Popen` to guarantee this behavior on
 +  all platforms or past Python versions.
+ Notes
+ -----
+ .. _converting-argument-sequence:
+ Converting an argument sequence to a string on Windows
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ On Windows, an *args* sequence is converted to a string that can be parsed
+ using the following rules (which correspond to the rules used by the MS C
+ runtime):
+ 1. Arguments are delimited by white space, which is either a
+    space or a tab.
+ 2. A string surrounded by double quotation marks is
+    interpreted as a single argument, regardless of white space
+    contained within.  A quoted string can be embedded in an
+    argument.
+ 3. A double quotation mark preceded by a backslash is
+    interpreted as a literal double quotation mark.
+ 4. Backslashes are interpreted literally, unless they
+    immediately precede a double quotation mark.
+ 5. If backslashes immediately precede a double quotation mark,
+    every pair of backslashes is interpreted as a literal
+    backslash.  If the number of backslashes is odd, the last
+    backslash escapes the next double quotation mark as
+    described in rule 3.
++