Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7d161726
Commit
7d161726
authored
Sep 22, 2018
by
Xiang Zhang
Committed by
Miss Islington (bot)
Sep 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make docs of exitcode for subprocess.getstatusoutput more clear. (GH-9477)
Make it more accurate and not limited to UNIX.
parent
2ec872b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
Doc/library/subprocess.rst
Doc/library/subprocess.rst
+3
-2
No files found.
Doc/library/subprocess.rst
View file @
7d161726
...
...
@@ -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')
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment