[Python-checkins] r72576 - python/branches/py3k/Doc/library/sys.rst
Georg Brandl
g.brandl at gmx.net
Tue May 12 09:24:17 CEST 2009
benjamin.peterson schrieb:
> Author: benjamin.peterson
> Date: Tue May 12 05:01:51 2009
> New Revision: 72576
>> Log:
> detach() is a nifty trick for making std* binary
>> Modified:
> python/branches/py3k/Doc/library/sys.rst
>> Modified: python/branches/py3k/Doc/library/sys.rst
> ==============================================================================
> --- python/branches/py3k/Doc/library/sys.rst (original)
> +++ python/branches/py3k/Doc/library/sys.rst Tue May 12 05:01:51 2009
> @@ -781,11 +781,10 @@
> :func:`os.popen`, :func:`os.system` or the :func:`exec\*` family of functions in
> the :mod:`os` module.)
>> - .. note::
> -
> - The standard streams are in text mode by default. To write or read binary
> - data to these, use the underlying binary buffer. For example, to write
> - bytes to :data:`stdout`, use ``sys.stdout.buffer.write(b'abc')``.
> + The standard streams are in text mode by default. To write or read binary
> + data to these, use the underlying binary buffer. For example, to write bytes
> + to :data:`stdout`, use ``sys.stdout.buffer.write(b'abc')``. Using
> + :meth:`io.TextIOWrapper.detach` streams can be made binary by default.
It would be even nicer if you could directly include the incantation to do this.
Georg
More information about the Python-checkins
mailing list