]> granicus.if.org Git - python/commitdiff
Issue #14616: Mention shlex.quote in subprocess docs.
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Sun, 28 Oct 2012 09:42:26 +0000 (11:42 +0200)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Sun, 28 Oct 2012 09:42:26 +0000 (11:42 +0200)
Patch by Chris Rebert.

Doc/library/subprocess.rst

index 66d6cbbd646dd13da6d20f65a0e066b016239685..34fdf106a324816f667d59c2804c26aeb009843d 100644 (file)
@@ -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.