From: Guido van Rossum Date: Tue, 9 Feb 1999 18:36:51 +0000 (+0000) Subject: On Windows, -i shouldn't call set[v]buf(stdin, ...) because it screws X-Git-Tag: v1.5.2b2~98 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=01b7ced83452b733c4db004307292493c9dd6d73;p=python On Windows, -i shouldn't call set[v]buf(stdin, ...) because it screws up the _tkinter main loop. Not clear why; the _kbhit() call _tkinter makes probably confuses the stdio library when buffering isn't set to whatever it is by default. --- diff --git a/Modules/main.c b/Modules/main.c index 556a67a124..58df084c6b 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -230,7 +230,7 @@ Py_Main(argc, argv) else if (Py_InteractiveFlag) { #ifdef MS_WINDOWS /* Doesn't have to have line-buffered -- use unbuffered */ - setvbuf(stdin, (char *)NULL, _IONBF, BUFSIZ); + /* Any set[v]buf(stdin, ...) screws up Tkinter :-( */ setvbuf(stdout, (char *)NULL, _IONBF, BUFSIZ); #else /* !MS_WINDOWS */ #ifdef HAVE_SETVBUF