diff options
author | Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> | 2019-09-11 11:26:31 (GMT) |
---|---|---|
committer | Stéphane Wirtel <stephane@wirtel.be> | 2019-09-11 11:26:31 (GMT) |
commit | 1a13efb7e05b545def26f29c954751fdb6b22fa3 (patch) | |
tree | 549cf461ac3a5ccb2c6df89ab17d95452ddf79d4 /Doc/library | |
parent | c78dae8d2b890d487e428dce00c7f600612cce7b (diff) | |
download | cpython-1a13efb7e05b545def26f29c954751fdb6b22fa3.zip cpython-1a13efb7e05b545def26f29c954751fdb6b22fa3.tar.gz cpython-1a13efb7e05b545def26f29c954751fdb6b22fa3.tar.bz2 |
Minor ReST formatting fixes in subprocess docs (#14876)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/subprocess.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 167ed9a..954e0fe 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -1048,7 +1048,7 @@ calls these functions. Run the command described by *args*. Wait for command to complete, then return the :attr:`~Popen.returncode` attribute. - Code needing to capture stdout or stderr should use :func:`run` instead: + Code needing to capture stdout or stderr should use :func:`run` instead:: run(...).returncode @@ -1076,7 +1076,7 @@ calls these functions. :exc:`CalledProcessError` object will have the return code in the :attr:`~CalledProcessError.returncode` attribute. - Code needing to capture stdout or stderr should use :func:`run` instead: + Code needing to capture stdout or stderr should use :func:`run` instead:: run(..., check=True) @@ -1198,8 +1198,8 @@ becomes:: p1.stdout.close() # Allow p1 to receive a SIGPIPE if p2 exits. output = p2.communicate()[0] -The p1.stdout.close() call after starting the p2 is important in order for p1 -to receive a SIGPIPE if p2 exits before p1. +The ``p1.stdout.close()`` call after starting the p2 is important in order for +p1 to receive a SIGPIPE if p2 exits before p1. Alternatively, for trusted input, the shell's own pipeline support may still be used directly: |