On Fri, 13 Jan 2012 17:00:57 +0100 Xavier Morel <python-dev at 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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4