Skip to content

Commit 8226832

Browse files
bpo-36760: Clarify subprocess capture_output docs. (GH-13322)
Clarify how to capture stdout and stderr combined into one stream. (cherry picked from commit e883091) Co-authored-by: Gregory P. Smith <greg@krypto.org>
1 parent ecd668d commit 8226832

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/library/subprocess.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ compatibility with older versions, see the :ref:`call-function-trio` section.
5555
If *capture_output* is true, stdout and stderr will be captured.
5656
When used, the internal :class:`Popen` object is automatically created with
5757
``stdout=PIPE`` and ``stderr=PIPE``. The *stdout* and *stderr* arguments may
58-
not be supplied at the same time as *capture_output*.
58+
not be supplied at the same time as *capture_output*. If you wish to capture
59+
and combine both streams into one, use ``stdout=PIPE`` and ``stderr=STDOUT``
60+
instead of *capture_output*.
5961

6062
The *timeout* argument is passed to :meth:`Popen.communicate`. If the timeout
6163
expires, the child process will be killed and waited for. The

0 commit comments

Comments
 (0)