Antoine Pitrou <[email protected]> added the comment:
Ok, actually it boils down to the following code in Modules/main.c:
if (Py_UnbufferedStdioFlag) {
#if defined(MS_WINDOWS) || defined(__CYGWIN__)
_setmode(fileno(stdin), O_BINARY);
_setmode(fileno(stdout), O_BINARY);
#endif
... which explains things quite clearly! Archeology leads to r7409 by Guido in
1997:
changeset: 4916:5af9f8a98d93
branch: trunk
user: guido
date: Sat Jan 11 20:28:55 1997 +0100
files: Modules/main.c
description:
[svn r7409] On Windows, -u implies binary mode for stdin/stdout
(as well as unbuffered stdout/stderr).
----------
nosy: +gvanrossum
versions: +Python 2.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10841>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com