mirror of
https://github.com/python/cpython.git
synced 2025-09-27 18:59:43 +00:00
gh-128342: Specify timeout unit in subprocess docstrings (GH-128343)
Specify timeout unit (seconds) in subprocess docstrings Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
parent
47d2cb8eb7
commit
dafe7a4463
1 changed files with 3 additions and 3 deletions
|
@ -386,7 +386,7 @@ def _text_encoding():
|
||||||
|
|
||||||
def call(*popenargs, timeout=None, **kwargs):
|
def call(*popenargs, timeout=None, **kwargs):
|
||||||
"""Run command with arguments. Wait for command to complete or
|
"""Run command with arguments. Wait for command to complete or
|
||||||
timeout, then return the returncode attribute.
|
for timeout seconds, then return the returncode attribute.
|
||||||
|
|
||||||
The arguments are the same as for the Popen constructor. Example:
|
The arguments are the same as for the Popen constructor. Example:
|
||||||
|
|
||||||
|
@ -523,8 +523,8 @@ def run(*popenargs,
|
||||||
in the returncode attribute, and output & stderr attributes if those streams
|
in the returncode attribute, and output & stderr attributes if those streams
|
||||||
were captured.
|
were captured.
|
||||||
|
|
||||||
If timeout is given, and the process takes too long, a TimeoutExpired
|
If timeout (seconds) is given and the process takes too long,
|
||||||
exception will be raised.
|
a TimeoutExpired exception will be raised.
|
||||||
|
|
||||||
There is an optional argument "input", allowing you to
|
There is an optional argument "input", allowing you to
|
||||||
pass bytes or a string to the subprocess's stdin. If you use this argument
|
pass bytes or a string to the subprocess's stdin. If you use this argument
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue