Skip to content

Commit

Permalink
bpo-36760: Clarify subprocess capture_output docs. (GH-13322)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
miss-islington and gpshead committed May 14, 2019
1 parent ecd668d commit 8226832
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Doc/library/subprocess.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8226832

Please sign in to comment.