summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-10-28 11:43:02 +0200
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-10-28 11:43:02 +0200
commit87c315eb7532c019b5e9a757389cd61fe4f51f8f (patch)
tree7df9b8acd3c0827417ee2134f24541d2512a9797
parentd94a502cb0dfdbfb6d337e51b0698e5fdcde20c9 (diff)
parentc2415eb7e6ccb22888f35138527d6dc106e50a4e (diff)
downloadcpython-git-87c315eb7532c019b5e9a757389cd61fe4f51f8f.tar.gz
Merge issue #14616: Mention shlex.quote in subprocess docs.
Patch by Chris Rebert.
-rw-r--r--Doc/library/subprocess.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index 66d6cbbd64..34fdf106a3 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -341,6 +341,10 @@ default values. The arguments that are most commonly needed are:
from this vulnerability; see the Note in the :class:`Popen` constructor
documentation for helpful hints in getting ``shell=False`` to work.
+ When using ``shell=True``, :func:`shlex.quote` can be used to properly
+ escape whitespace and shell metacharacters in strings that are going to
+ be used to construct shell commands.
+
These options, along with all of the other options, are described in more
detail in the :class:`Popen` constructor documentation.