summaryrefslogtreecommitdiff
path: root/Doc/library/subprocess.rst
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-10-28 11:42:26 +0200
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-10-28 11:42:26 +0200
commitc2415eb7e6ccb22888f35138527d6dc106e50a4e (patch)
treea544d8e3e3514144d1a02a5866d5f1d7ae88c03b /Doc/library/subprocess.rst
parent65e2bef4f0dd1e39915be45e219d82bf25e7d5e4 (diff)
downloadcpython-git-c2415eb7e6ccb22888f35138527d6dc106e50a4e.tar.gz
Issue #14616: Mention shlex.quote in subprocess docs.
Patch by Chris Rebert.
Diffstat (limited to 'Doc/library/subprocess.rst')
-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.