Commit 616168a0 authored by Ronald Oussoren's avatar Ronald Oussoren

Cleanup of documentation change from #17860

Reformulated the textual change, and applied it to the docstring as well.
parent c18dd2a8
...@@ -290,11 +290,14 @@ default values. The arguments that are most commonly needed are: ...@@ -290,11 +290,14 @@ default values. The arguments that are most commonly needed are:
.. index:: .. index::
single: universal newlines; subprocess module single: universal newlines; subprocess module
If *universal_newlines* is ``True``, the file objects *stdin*, *stdout* and If *universal_newlines* is ``False`` the file objects *stdin*, *stdout* and
*stderr* will be opened as text streams in :term:`universal newlines` mode *stderr* will be opened as binary streams, and no line ending conversion is
done.
If *universal_newlines* is ``True``, these file objects
will be opened as text streams in :term:`universal newlines` mode
using the encoding returned by :func:`locale.getpreferredencoding(False) using the encoding returned by :func:`locale.getpreferredencoding(False)
<locale.getpreferredencoding>`, otherwise these streams will be opened <locale.getpreferredencoding>`. For *stdin*, line ending characters
as binary streams. For *stdin*, line ending characters
``'\n'`` in the input will be converted to the default line separator ``'\n'`` in the input will be converted to the default line separator
:data:`os.linesep`. For *stdout* and *stderr*, all line endings in the :data:`os.linesep`. For *stdout* and *stderr*, all line endings in the
output will be converted to ``'\n'``. For more information see the output will be converted to ``'\n'``. For more information see the
......
...@@ -104,6 +104,9 @@ in the child process prior to executing the command. ...@@ -104,6 +104,9 @@ in the child process prior to executing the command.
If env is not None, it defines the environment variables for the new If env is not None, it defines the environment variables for the new
process. process.
If universal_newlines is false, the file objects stdin, stdout and stderr
are opened as binary files, and no line ending conversion is done.
If universal_newlines is true, the file objects stdout and stderr are If universal_newlines is true, the file objects stdout and stderr are
opened as a text files, but lines may be terminated by any of '\n', opened as a text files, but lines may be terminated by any of '\n',
the Unix end-of-line convention, '\r', the old Macintosh convention or the Unix end-of-line convention, '\r', the old Macintosh convention or
......
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