Tim Golden <m...@timgolden.me.uk> added the comment:

Attached is a patch against r73685 of the documentation for subprocess
which adds some information about using shell=True on Windows. I plan
to do some more general-purpose docs for subprocess on Windows, but as 
I've failed to get round to them for a year or so, let's get this small
change in at least!

----------
keywords: +patch
nosy: +tim.golden
Added file: http://bugs.python.org/file14385/doc-subprocess.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6374>
_______________________________________
Index: subprocess.rst
===================================================================
--- subprocess.rst      (revision 73685)
+++ subprocess.rst      (working copy)
@@ -73,7 +73,11 @@
    needed: Usually, the program to execute is defined by the *args* argument. 
If
    ``shell=True``, the *executable* argument specifies which shell to use. On 
Unix,
    the default shell is :file:`/bin/sh`.  On Windows, the default shell is
-   specified by the :envvar:`COMSPEC` environment variable.
+   specified by the :envvar:`COMSPEC` environment variable. The only reason you
+   would need to specify ``shell=True`` on Windows is where the command you
+   wish to execute is actually built in to the shell, eg ``dir``, ``copy``.
+   You don't need ``shell=True`` to run a batch file, nor to run a 
console-based
+   executable.
 
    *stdin*, *stdout* and *stderr* specify the executed programs' standard 
input,
    standard output and standard error file handles, respectively.  Valid values
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to