diff options
author | Gregory P. Smith <greg@krypto.org> | 2019-05-14 19:33:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-14 19:33:17 (GMT) |
commit | e883091abf7ca84a88e956fe5202e75c53bd4128 (patch) | |
tree | 8893df07941041ffd53407c16b6de76c5f1b0e5c /Doc/library | |
parent | d97adfb409290a1e4ad549e4af58cacea86d3358 (diff) | |
download | cpython-e883091abf7ca84a88e956fe5202e75c53bd4128.zip cpython-e883091abf7ca84a88e956fe5202e75c53bd4128.tar.gz cpython-e883091abf7ca84a88e956fe5202e75c53bd4128.tar.bz2 |
bpo-36760: Clarify subprocess capture_output docs. (GH-13322)
Clarify how to capture stdout and stderr combined into one stream.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/subprocess.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 3280c95..d840b46 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -55,7 +55,9 @@ compatibility with older versions, see the :ref:`call-function-trio` section. If *capture_output* is true, stdout and stderr will be captured. When used, the internal :class:`Popen` object is automatically created with ``stdout=PIPE`` and ``stderr=PIPE``. The *stdout* and *stderr* arguments may - not be supplied at the same time as *capture_output*. + not be supplied at the same time as *capture_output*. If you wish to capture + and combine both streams into one, use ``stdout=PIPE`` and ``stderr=STDOUT`` + instead of *capture_output*. The *timeout* argument is passed to :meth:`Popen.communicate`. If the timeout expires, the child process will be killed and waited for. The |