diff options
author | Ross Lagerwall <rosslagerwall@gmail.com> | 2011-03-16 16:40:25 (GMT) |
---|---|---|
committer | Ross Lagerwall <rosslagerwall@gmail.com> | 2011-03-16 16:40:25 (GMT) |
commit | ba102ec10d953af825e0da4c3cff02a701d3ca81 (patch) | |
tree | cf8b734f1e3a007082e83f410fdb6521483663f5 /Doc | |
parent | 09bb8f46aa08fdcc4ec4b7c791d550fd71ae9f60 (diff) | |
download | cpython-ba102ec10d953af825e0da4c3cff02a701d3ca81.zip cpython-ba102ec10d953af825e0da4c3cff02a701d3ca81.tar.gz cpython-ba102ec10d953af825e0da4c3cff02a701d3ca81.tar.bz2 |
Issue #5870: Add subprocess.DEVNULL constant.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/subprocess.rst | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 4a12b76..88eb784 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -125,12 +125,14 @@ This module defines one class called :class:`Popen`: *stdin*, *stdout* and *stderr* specify the executed programs' standard input, standard output and standard error file handles, respectively. Valid values - are :data:`PIPE`, an existing file descriptor (a positive integer), an - existing :term:`file object`, and ``None``. :data:`PIPE` indicates that a - new pipe to the child should be created. With ``None``, no redirection will - occur; the child's file handles will be inherited from the parent. Additionally, - *stderr* can be :data:`STDOUT`, which indicates that the stderr data from the - applications should be captured into the same file handle as for stdout. + are :data:`PIPE`, :data:`DEVNULL`, an existing file descriptor (a positive + integer), an existing :term:`file object`, and ``None``. :data:`PIPE` + indicates that a new pipe to the child should be created. :data:`DEVNULL` + indicates that the special file :data:`os.devnull` will be used. With ``None``, + no redirection will occur; the child's file handles will be inherited from + the parent. Additionally, *stderr* can be :data:`STDOUT`, which indicates + that the stderr data from the applications should be captured into the same + file handle as for stdout. If *preexec_fn* is set to a callable object, this object will be called in the child process just before the child is executed. @@ -229,6 +231,15 @@ This module defines one class called :class:`Popen`: Added context manager support. +.. data:: DEVNULL + + Special value that can be used as the *stdin*, *stdout* or *stderr* argument + to :class:`Popen` and indicates that the special file :data:`os.devnull` + will be used. + + .. versionadded:: 3.3 + + .. data:: PIPE Special value that can be used as the *stdin*, *stdout* or *stderr* argument |