summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2013-07-06 08:23:59 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2013-07-06 08:23:59 (GMT)
commita68650553d8e5339610286643dfe4f078244c5ba (patch)
treec5f82b0de9e08ba86cd33e77ddd8764771d4c379
parent54ad7e39dfe429795cc908a9a03a94c485c87cc2 (diff)
downloadcpython-a68650553d8e5339610286643dfe4f078244c5ba.zip
cpython-a68650553d8e5339610286643dfe4f078244c5ba.tar.gz
cpython-a68650553d8e5339610286643dfe4f078244c5ba.tar.bz2
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.
-rw-r--r--Doc/library/subprocess.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index 4212e02..cf9fd0b 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -293,7 +293,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
@@ -537,7 +538,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.