Index: Doc/library/subprocess.rst =================================================================== --- Doc/library/subprocess.rst (revision 77505) +++ Doc/library/subprocess.rst (working copy) @@ -52,10 +52,12 @@ On Windows: the :class:`Popen` class uses CreateProcess() to execute the child program, which operates on strings. If *args* is a sequence, it will be - converted to a string using the :meth:`list2cmdline` method. Please note that - not all MS Windows applications interpret the command line the same way: - :meth:`list2cmdline` is designed for applications using the same rules as the MS - C runtime. + converted to a string using the :meth:`list2cmdline` method. If *args* is + a string, quotes are placed around the string, allowing *args* itself to + contain a command string which uses quotes. Please note that not all MS + Windows applications interpret the command line the same way: + :meth:`list2cmdline` is designed for applications using the same rules as + the MS C runtime. *bufsize*, if given, has the same meaning as the corresponding argument to the built-in open() function: :const:`0` means unbuffered, :const:`1` means line Index: Lib/subprocess.py =================================================================== --- Lib/subprocess.py (revision 77505) +++ Lib/subprocess.py (working copy) @@ -828,7 +828,7 @@ startupinfo.dwFlags |= STARTF_USESHOWWINDOW startupinfo.wShowWindow = SW_HIDE comspec = os.environ.get("COMSPEC", "cmd.exe") - args = comspec + " /c " + args + args = comspec + " /c \"%s\"" % args if (GetVersion() >= 0x80000000 or os.path.basename(comspec).lower() == "command.com"): # Win9x, or using command.com on NT. We need to