[issue10841] binary stdio

Antoine Pitrou report at bugs.python.org
Thu Jan 6 11:36:24 CET 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

> So -u does do 2/3 of what my windows_binary() does :)  Should I switch
> my test case to use stderr to demonstrate that it doesn't help with
> that?

Well, judging by the history of this code, selectively putting -u in
binary mode may be justified by the fact that Python 2 relied on the C
runtime's stdio FILE pointers, and therefore on the C runtime's own
newline translation. I would say that Python 3 should put all stdio fds
in binary mode, regardless of the -u switch.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10841>
_______________________________________


More information about the Python-bugs-list mailing list