summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-06-30 16:17:28 (GMT)
committerGeorg Brandl <georg@python.org>2009-06-30 16:17:28 (GMT)
commit0d8649a1c9b61a2a0e3c6e1d2cf4f5807c30addf (patch)
tree3b2a360727ea972fb27078c30f42a92c6559242f
parent3d5c87a23caf224b75fd2b0533d78aac74e7acdf (diff)
downloadcpython-0d8649a1c9b61a2a0e3c6e1d2cf4f5807c30addf.zip
cpython-0d8649a1c9b61a2a0e3c6e1d2cf4f5807c30addf.tar.gz
cpython-0d8649a1c9b61a2a0e3c6e1d2cf4f5807c30addf.tar.bz2
#6374: add a bit of explanation about shell=True on Windows.
-rw-r--r--Doc/library/subprocess.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index e5a86e6..b903c8c 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -73,7 +73,11 @@ This module defines one class called :class:`Popen`:
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