8000 bpo-26897: Clarify Popen stdin, stdout, stderr file object docs (GH-3… · python/cpython@dd69f73 · GitHub
[go: up one dir, main page]

Skip to content

Commit dd69f73

Browse files
bpo-26897: Clarify Popen stdin, stdout, stderr file object docs (GH-30231)
1 parent 87af12b commit dd69f73

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

Doc/library/subprocess.rst

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,14 @@ default values. The arguments that are most commonly needed are:
264264
*stdin*, *stdout* and *stderr* specify the executed program's standard input,
265265
standard output and standard error file handles, respectively. Valid values
266266
are :data:`PIPE`, :data:`DEVNULL`, an existing file descriptor (a positive
267-
integer), an existing file object, and ``None``. :data:`PIPE` indicates
268-
that a new pipe to the child should be created. :data:`DEVNULL` indicates
269-
that the special file :data:`os.devnull` will be used. With the default
270-
settings of ``None``, no redirection will occur; the child's file handles
271-
will be inherited from the parent. Additionally, *stderr* can be
272-
:data:`STDOUT`, which indicates that the stderr data from the child
273-
process should be captured into the same file handle as for *stdout*.
267+
integer), an existing file object with a valid file descriptor, and ``None``.
268+
:data:`PIPE` indicates that a new pipe to the child should be created.
269+
:data:`DEVNULL` indicates that the special file :data:`os.devnull` will
270+
be used. With the default settings of ``None``, no redirection will occur;
271+
the child's file handles will be inherited from the parent.
272+
Additionally, *stderr* can be :data:`STDOUT`, which indicates that the
273+
stderr data from the child process should be captured into the same file
274+
handle as for *stdout*.
274275

275276
.. index::
276277
single: universal newlines; subprocess module
@@ -482,13 +483,14 @@ functions.
482483
*stdin*, *stdout* and *stderr* specify the executed program's standard input,
483484
standard output and standard error file handles, respectively. Valid values
484485
are :data:`PIPE`, :data:`DEVNULL`, an existing file descriptor (a positive
485-
integer), an existing :term:`file object`, and ``None``. :data:`PIPE`
486-
indicates that a new pipe to the child should be created. :data:`DEVNULL`
487-
indicates that the special file :data:`os.devnull` will be used. With the
488-
default settings of ``None``, no redirection will occur; the child's file
489-
handles will be inherited from the parent. Additionally, *stderr* can be
490-
:data:`STDOUT`, which indicates that the st 8C5C derr data from the applications
491-
should be captured into the same file handle as for stdout.
486+
integer), an existing :term:`file object` with a valid file descriptor,
487+
and ``None``. :data:`PIPE` indicates that a new pipe to the child should
488+
be created. :data:`DEVNULL` indicates that the special file
489+
:data:`os.devnull` will be used. With the default settings of ``None``,
490+
no redirection will occur; the child's file handles will be inherited from
491+
the parent. Additionally, *stderr* can be :data:`STDOUT`, which indicates
492+
that the stderr data from the applications should be captured into the same
493+
file handle as for stdout.
492494

493495
If *preexec_fn* is set to a callable object, this object will be called in the
494496
child process just before the child is executed.

0 commit comments

Comments
 (0)
0