diff options
author | Xiang Zhang <angwerzx@126.com> | 2018-09-21 20:18:20 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-09-21 20:18:20 (GMT) |
commit | 7d161726e4ddd2b2cdd7ac58a7e9e9ea3f57a807 (patch) | |
tree | fdd35df4389214f08a5c988d2bc3b1fcd455b21e | |
parent | 2ec872b31e25cee1f983fe07991fb53f3fd1cbac (diff) | |
download | cpython-7d161726e4ddd2b2cdd7ac58a7e9e9ea3f57a807.zip cpython-7d161726e4ddd2b2cdd7ac58a7e9e9ea3f57a807.tar.gz cpython-7d161726e4ddd2b2cdd7ac58a7e9e9ea3f57a807.tar.bz2 |
Make docs of exitcode for subprocess.getstatusoutput more clear. (GH-9477)
Make it more accurate and not limited to UNIX.
-rw-r--r-- | Doc/library/subprocess.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 6e602e7..aa889ed 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -1336,14 +1336,15 @@ handling consistency are valid for these functions. Windows support was added. The function now returns (exitcode, output) instead of (status, output) - as it did in Python 3.3.3 and earlier. See :func:`WEXITSTATUS`. + as it did in Python 3.3.3 and earlier. exitcode has the same value as + :attr:`~Popen.returncode`. .. function:: getoutput(cmd) Return output (stdout and stderr) of executing *cmd* in a shell. - Like :func:`getstatusoutput`, except the exit status is ignored and the return + Like :func:`getstatusoutput`, except the exit code is ignored and the return value is a string containing the command's output. Example:: >>> subprocess.getoutput('ls /bin/ls') |