New submission from Mark Tolonen <[email protected]>:
According to Issue xxxx, sys.stdout.buffer is the binary stream
underlying stdout. I see the following behavior on 3.0.1 and 3.1rc2
when writing to a console window:
Python 3.1rc2 (r31rc2:73414, Jun 13 2009, 16:43:15) [MSC v.1500 32 bit
(Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>>
sys.stdout.buffer.write('hello\u200bworld'.encode('cp437','replace'))
hello?world11
Notice the extra '11' at the end of the string.
----------
components: IO
messages: 89719
nosy: metolone
severity: normal
status: open
title: extra characters displayed when writing to sys.stdout.buffer
type: behavior
versions: Python 3.1
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue6345>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com