diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-10-28 09:42:26 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-10-28 09:42:26 (GMT) |
commit | c2415eb7e6ccb22888f35138527d6dc106e50a4e (patch) | |
tree | a544d8e3e3514144d1a02a5866d5f1d7ae88c03b | |
parent | 65e2bef4f0dd1e39915be45e219d82bf25e7d5e4 (diff) | |
download | cpython-c2415eb7e6ccb22888f35138527d6dc106e50a4e.zip cpython-c2415eb7e6ccb22888f35138527d6dc106e50a4e.tar.gz cpython-c2415eb7e6ccb22888f35138527d6dc106e50a4e.tar.bz2 |
Issue #14616: Mention shlex.quote in subprocess docs.
Patch by Chris Rebert.
-rw-r--r-- | Doc/library/subprocess.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 66d6cbb..34fdf10 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. |