diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2013-07-06 08:25:04 (GMT) |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2013-07-06 08:25:04 (GMT) |
commit | c17d0c2218133109740e554abac26bf3345aaa3f (patch) | |
tree | 829e2131a3f549216609e8737cde96d86d20c41b /Doc/library/subprocess.rst | |
parent | de68e0cf0e6d94b087a3b7ae40e50843dff6d918 (diff) | |
parent | a68650553d8e5339610286643dfe4f078244c5ba (diff) | |
download | cpython-c17d0c2218133109740e554abac26bf3345aaa3f.zip cpython-c17d0c2218133109740e554abac26bf3345aaa3f.tar.gz cpython-c17d0c2218133109740e554abac26bf3345aaa3f.tar.bz2 |
(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.
Diffstat (limited to 'Doc/library/subprocess.rst')
-rw-r--r-- | Doc/library/subprocess.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 70a21eb..7dfda5a 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -303,7 +303,8 @@ default values. The arguments that are most commonly needed are: 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) - <locale.getpreferredencoding>`. For *stdin*, line ending characters + <locale.getpreferredencoding>`, 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 @@ functions. 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. |