Author pitrou
Recipients amaury.forgeotdarc, brian.curtin, gvanrossum, pitrou, v+python
Date 2011-01-06.09:29:53
SpamBayes Score 0.000850005
Marked as misclassified No
Message-id <1294306197.6.0.655065835397.issue10841@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2011-01-06 09:29:57pitrousetrecipients: + pitrou, gvanrossum, amaury.forgeotdarc, v+python, brian.curtin
2011-01-06 09:29:57pitrousetmessageid: <1294306197.6.0.655065835397.issue10841@psf.upfronthosting.co.za>
2011-01-06 09:29:53pitroulinkissue10841 messages
2011-01-06 09:29:53pitroucreate