[Python-checkins] cpython (merge 3.3 -> default): Merge issue #14616: Mention shlex.quote in subprocess docs.

andrew.svetlov python-checkins at python.org
Sun Oct 28 10:43:17 CET 2012


http://hg.python.org/cpython/rev/72672cf5d850
changeset:   80008:72672cf5d850
parent:      80006:e8619f015ab9
parent:      80007:f9d11ca3ccd1
user:        Andrew Svetlov <andrew.svetlov at gmail.com>
date:        Sun Oct 28 11:43:02 2012 +0200
summary:
  Merge issue #14616: Mention shlex.quote in subprocess docs.

Patch by Chris Rebert.

files:
  Doc/library/subprocess.rst |  4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -341,6 +341,10 @@
       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.
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list