Skip to content

Commit

Permalink
(3.3->default) Cleanup of documentation change from python#17860
Browse files Browse the repository at this point in the history
Reformulated the textual change, and applied it to the docstring as well.
  • Loading branch information
ronaldoussoren committed Jul 7, 2013
2 parents ef9b47f + 385521c commit 5f8e785
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Doc/library/subprocess.rst
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,14 @@ default values. The arguments that are most commonly needed are:
.. index::
single: universal newlines; subprocess module

If *universal_newlines* is ``True``, the file objects *stdin*, *stdout* and
*stderr* will be opened as text streams in :term:`universal newlines` mode
If *universal_newlines* is ``False`` the file objects *stdin*, *stdout* and
*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)
<locale.getpreferredencoding>`, otherwise these streams will be opened
as binary streams. For *stdin*, line ending characters
<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'``. For more information see the
Expand Down
3 changes: 3 additions & 0 deletions Lib/subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ class Popen(args, bufsize=-1, executable=None,
If env is not None, it defines the environment variables for the new
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
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
Expand Down

0 comments on commit 5f8e785

Please sign in to comment.