summaryrefslogtreecommitdiffstats
path: root/Doc/library/subprocess.rst
diff options
context:
space:
mode:
authorMatthew Davis <7035647+mdavis-xyz@users.noreply.github.com>2024-04-01 19:49:14 (GMT)
committerGitHub <noreply@github.com>2024-04-01 19:49:14 (GMT)
commitfc2071687b708598264a3403b7f9104667c1092f (patch)
treed5b1aff130e1afcabe474543cc336a34b58ba413 /Doc/library/subprocess.rst
parentfc8007ee3635db6ab73e132ebff987c910b6d538 (diff)
downloadcpython-fc2071687b708598264a3403b7f9104667c1092f.zip
cpython-fc2071687b708598264a3403b7f9104667c1092f.tar.gz
cpython-fc2071687b708598264a3403b7f9104667c1092f.tar.bz2
Docs: add more links to PIPE in subprocess docs (#25416)
Diffstat (limited to 'Doc/library/subprocess.rst')
-rw-r--r--Doc/library/subprocess.rst13
1 files changed, 8 insertions, 5 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index 8f6751c..49194b8 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -52,10 +52,12 @@ underlying :class:`Popen` interface can be used directly.
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*. If you wish to capture
- and combine both streams into one, use ``stdout=PIPE`` and ``stderr=STDOUT``
- instead of *capture_output*.
+ *stdout* and *stdin* both set to :data:`~subprocess.PIPE`.
+ The *stdout* and *stderr* arguments may not be supplied at the same time as *capture_output*.
+ If you wish to capture and combine both streams into one,
+ 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
: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
*encoding* or *errors* is specified or *text* is true. When
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
:exc:`CalledProcessError` exception will be raised. Attributes of that