[3.12] Docs: add more links to PIPE in subprocess docs (GH-25416) (#117427)

(cherry picked from commit fc2071687b)

Co-authored-by: Matthew Davis <7035647+mdavis-xyz@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2024-04-01 21:56:36 +02:00 committed by GitHub
parent 87e470b039
commit 4a3fc49d2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,10 +52,12 @@ underlying :class:`Popen` interface can be used directly.
If *capture_output* is true, stdout and stderr will be captured. If *capture_output* is true, stdout and stderr will be captured.
When used, the internal :class:`Popen` object is automatically created with When used, the internal :class:`Popen` object is automatically created with
``stdout=PIPE`` and ``stderr=PIPE``. The *stdout* and *stderr* arguments may *stdout* and *stdin* both set to :data:`~subprocess.PIPE`.
not be supplied at the same time as *capture_output*. If you wish to capture The *stdout* and *stderr* arguments may not be supplied at the same time as *capture_output*.
and combine both streams into one, use ``stdout=PIPE`` and ``stderr=STDOUT`` If you wish to capture and combine both streams into one,
instead of *capture_output*. set *stdout* to :data:`~subprocess.PIPE`
and *stderr* to :data:`~subprocess.STDOUT`,
instead of using *capture_output*.
A *timeout* may be specified in seconds, it is internally passed on to A *timeout* may be specified in seconds, it is internally passed on to
:meth:`Popen.communicate`. If the timeout expires, the child process will be :meth:`Popen.communicate`. If the timeout expires, the child process will be
@ -69,7 +71,8 @@ underlying :class:`Popen` interface can be used directly.
subprocess's stdin. If used it must be a byte sequence, or a string if subprocess's stdin. If used it must be a byte sequence, or a string if
*encoding* or *errors* is specified or *text* is true. When *encoding* or *errors* is specified or *text* is true. When
used, the internal :class:`Popen` object is automatically created with used, the internal :class:`Popen` object is automatically created with
``stdin=PIPE``, and the *stdin* argument may not be used as well. *stdin* set to :data:`~subprocess.PIPE`,
and the *stdin* argument may not be used as well.
If *check* is true, and the process exits with a non-zero exit code, a If *check* is true, and the process exits with a non-zero exit code, a
:exc:`CalledProcessError` exception will be raised. Attributes of that :exc:`CalledProcessError` exception will be raised. Attributes of that