From: R David Murray Date: Wed, 15 Aug 2012 15:11:27 +0000 (-0400) Subject: Merge #15543: glossary entry for and 'universal newlines', and links to it. X-Git-Tag: v3.3.0rc1~106 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27bbcfb8ff55ed2c57042bf72eb2ba01ec7e4169;p=python Merge #15543: glossary entry for and 'universal newlines', and links to it. Patch by Chris Jerdonek. --- 27bbcfb8ff55ed2c57042bf72eb2ba01ec7e4169 diff --cc Doc/library/subprocess.rst index 7557c928be,899bd7c26b..ff6bb9927b --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@@ -276,18 -216,20 +276,21 @@@ default values. The arguments that are *stdin*, *stdout* and *stderr* specify the executed program's standard input, standard output and standard error file handles, respectively. Valid values - are :data:`PIPE`, an existing file descriptor (a positive integer), an - existing file object, and ``None``. :data:`PIPE` indicates that a new pipe - to the child should be created. With the default settings of ``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 child process 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 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 the default + settings of ``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 child + process should be captured into the same file handle as for *stdout*. + .. index:: + single: universal newlines; subprocess module + If *universal_newlines* is ``True``, the file objects *stdin*, *stdout* - and *stderr* will be opened as text streams with universal newlines support, - using the encoding returned by :func:`locale.getpreferredencoding`. + and *stderr* will be opened as text streams in :term:`universal newlines` + mode using the encoding returned by :func:`locale.getpreferredencoding`. For *stdin*, line ending characters ``'\n'`` in the input will be converted to the default line separator :data:`os.linesep`. For *stdout* and *stderr*, all line endings in the output will be converted to ``'\n'``.