(original) (raw)

changeset: 84454:ae8b054155c1 parent: 84452:6d278f426417 parent: 84453:a2c2ffa1a41c user: Ronald Oussoren ronaldoussoren@mac.com date: Sat Jul 06 10:25:04 2013 +0200 files: Doc/library/subprocess.rst description: (3.3->default) Issue #17860: explicitly mention that std* streams are opened in binary mode by default. The documentation does mention that the streams are opened in text mode when univeral_newlines is true, but not that that they are opened in binary mode when that argument is false and that seems to confuse at least some users. diff -r 6d278f426417 -r ae8b054155c1 Doc/library/subprocess.rst --- a/Doc/library/subprocess.rst Fri Jul 05 18:05:29 2013 -1000 +++ b/Doc/library/subprocess.rst Sat Jul 06 10:25:04 2013 +0200 @@ -303,7 +303,8 @@ If *universal_newlines* is ``True``, the file objects *stdin*, *stdout* and *stderr* will be opened as text streams in :term:`universal newlines` mode using the encoding returned by :func:`locale.getpreferredencoding(False) - `. For *stdin*, line ending characters + `, otherwise these streams will be opened + as binary streams. 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 @@ -547,7 +548,8 @@ If *universal_newlines* is ``True``, the file objects *stdin*, *stdout* and *stderr* are opened as text streams in universal newlines mode, as - described above in :ref:`frequently-used-arguments`. + described above in :ref:`frequently-used-arguments`, otherwise they are + opened as binary streams. If given, *startupinfo* will be a :class:`STARTUPINFO` object, which is passed to the underlying ``CreateProcess`` function./ronaldoussoren@mac.com