On Fri, 13 Jan 2012 17:00:57 +0100 Xavier Morel <python-...@masklinn.net> wrote: > FWIW this is not restricted to Linux (the same behavior change can > be observed in OSX), and the script is overly complex you can expose > the change with 3 lines > > import sys > sys.stdout.write('promt>') > sys.stdin.read(1) > > Python 2 displays "prompt" and terminates execution on [Return], > Python 3 does not display anything until [Return] is pressed. > > Interestingly, the `-u` option is not sufficient to make > "prompt>" appear in Python 3, the stream has to be flushed > explicitly unless the input is ~16k characters (I guess that's > an internal buffer size of some sort)
"-u" forces line-buffering mode for stdout/stderr, which is already the default if they are wired to an interactive device (isattr() returning True). But this was already rehashed on python-ideas and the bug tracker, and apparently Anatoly thought it would be a good idea to post on a third medium. Sigh. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com