Commit 7d161726 authored by Xiang Zhang's avatar Xiang Zhang Committed by Miss Islington (bot)

Make docs of exitcode for subprocess.getstatusoutput more clear. (GH-9477)



Make it more accurate and not limited to UNIX.
parent 2ec872b3
......@@ -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')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment