mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Issue #24420: Fix documentation regression introduced by f0a00ee094ff.
These functions accept same arguments as subprocess.Popen(). Patch by Martin Panter.
This commit is contained in:
parent
00f8197540
commit
bf1d4b6d7d
1 changed files with 19 additions and 3 deletions
|
@ -825,7 +825,7 @@ calls these functions.
|
||||||
.. function:: call(args, *, stdin=None, stdout=None, stderr=None, shell=False, timeout=None)
|
.. function:: call(args, *, stdin=None, stdout=None, stderr=None, shell=False, timeout=None)
|
||||||
|
|
||||||
Run the command described by *args*. Wait for command to complete, then
|
Run the command described by *args*. Wait for command to complete, then
|
||||||
return the :attr:`returncode` attribute.
|
return the :attr:`~Popen.returncode` attribute.
|
||||||
|
|
||||||
This is equivalent to::
|
This is equivalent to::
|
||||||
|
|
||||||
|
@ -833,6 +833,11 @@ calls these functions.
|
||||||
|
|
||||||
(except that the *input* and *check* parameters are not supported)
|
(except that the *input* and *check* parameters are not supported)
|
||||||
|
|
||||||
|
The arguments shown above are merely the most
|
||||||
|
common ones. The full function signature is largely the
|
||||||
|
same as that of the :class:`Popen` constructor - this function passes all
|
||||||
|
supplied arguments other than *timeout* directly through to that interface.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Do not use ``stdout=PIPE`` or ``stderr=PIPE`` with this
|
Do not use ``stdout=PIPE`` or ``stderr=PIPE`` with this
|
||||||
|
@ -856,6 +861,11 @@ calls these functions.
|
||||||
|
|
||||||
(except that the *input* parameter is not supported)
|
(except that the *input* parameter is not supported)
|
||||||
|
|
||||||
|
The arguments shown above are merely the most
|
||||||
|
common ones. The full function signature is largely the
|
||||||
|
same as that of the :class:`Popen` constructor - this function passes all
|
||||||
|
supplied arguments other than *timeout* directly through to that interface.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Do not use ``stdout=PIPE`` or ``stderr=PIPE`` with this
|
Do not use ``stdout=PIPE`` or ``stderr=PIPE`` with this
|
||||||
|
@ -867,7 +877,7 @@ calls these functions.
|
||||||
*timeout* was added.
|
*timeout* was added.
|
||||||
|
|
||||||
|
|
||||||
.. function:: check_output(args, *, input=None, stdin=None, stderr=None, shell=False, universal_newlines=False, timeout=None)
|
.. function:: check_output(args, *, stdin=None, stderr=None, shell=False, universal_newlines=False, timeout=None)
|
||||||
|
|
||||||
Run command with arguments and return its output.
|
Run command with arguments and return its output.
|
||||||
|
|
||||||
|
@ -880,6 +890,12 @@ calls these functions.
|
||||||
|
|
||||||
run(..., check=True, stdout=PIPE).stdout
|
run(..., check=True, stdout=PIPE).stdout
|
||||||
|
|
||||||
|
The arguments shown above are merely the most common ones.
|
||||||
|
The full function signature is largely the same as that of :func:`run` -
|
||||||
|
most arguments are passed directly through to that interface.
|
||||||
|
However, explicitly passing ``input=None`` to inherit the parent's
|
||||||
|
standard input file handle is not supported.
|
||||||
|
|
||||||
By default, this function will return the data as encoded bytes. The actual
|
By default, this function will return the data as encoded bytes. The actual
|
||||||
encoding of the output data may depend on the command being invoked, so the
|
encoding of the output data may depend on the command being invoked, so the
|
||||||
decoding to text will often need to be handled at the application level.
|
decoding to text will often need to be handled at the application level.
|
||||||
|
@ -902,7 +918,7 @@ calls these functions.
|
||||||
*timeout* was added.
|
*timeout* was added.
|
||||||
|
|
||||||
.. versionchanged:: 3.4
|
.. versionchanged:: 3.4
|
||||||
*input* was added.
|
Support for the *input* keyword argument was added.
|
||||||
|
|
||||||
.. _subprocess-replacements:
|
.. _subprocess-replacements:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue