diff options
author | Georg Brandl <georg@python.org> | 2009-12-20 14:33:20 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-12-20 14:33:20 (GMT) |
commit | 6ab5d083f20aa63d689ed095e7660aef4241cd22 (patch) | |
tree | 8bcf0e1ef0866c8e723f66a089805702d1580b46 /Doc | |
parent | 819a8fa0f694bea3099f704d01ba51c5350c71b1 (diff) | |
download | cpython-6ab5d083f20aa63d689ed095e7660aef4241cd22.zip cpython-6ab5d083f20aa63d689ed095e7660aef4241cd22.tar.gz cpython-6ab5d083f20aa63d689ed095e7660aef4241cd22.tar.bz2 |
#7381: subprocess documentation and library docstring consistency fixes.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/subprocess.rst | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index b7cbdd2..f5d5a8e 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -126,9 +126,10 @@ This module defines one class called :class:`Popen`: .. note:: - This feature is only available if Python is built with universal newline support - (the default). Also, the newlines attribute of the file objects :attr:`stdout`, - :attr:`stdin` and :attr:`stderr` are not updated by the communicate() method. + This feature is only available if Python is built with universal newline + support (the default). Also, the newlines attribute of the file objects + :attr:`stdout`, :attr:`stdin` and :attr:`stderr` are not updated by the + communicate() method. The *startupinfo* and *creationflags*, if given, will be passed to the underlying CreateProcess() function. They can specify things such as appearance @@ -162,7 +163,7 @@ This module also defines two shortcut functions: The arguments are the same as for the Popen constructor. Example:: - retcode = call(["ls", "-l"]) + >>> retcode = subprocess.call(["ls", "-l"]) .. warning:: @@ -181,7 +182,8 @@ This module also defines two shortcut functions: The arguments are the same as for the Popen constructor. Example:: - check_call(["ls", "-l"]) + >>> subprocess.check_call(["ls", "-l"]) + 0 .. versionadded:: 2.5 @@ -208,8 +210,8 @@ This module also defines two shortcut functions: To capture standard error in the result, use ``stderr=subprocess.STDOUT``:: >>> subprocess.check_output( - ["/bin/sh", "-c", "ls non_existent_file ; exit 0"], - stderr=subprocess.STDOUT) + ... ["/bin/sh", "-c", "ls non_existent_file; exit 0"], + ... stderr=subprocess.STDOUT) 'ls: non_existent_file: No such file or directory\n' .. versionadded:: 2.7 |