A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-January/115476.html below:

[Python-Dev] Backwards incompatible sys.stdout.write() behavior in Python 3 (Was: [Python-ideas] Pythonic buffering in Py3 print())

[Python-Dev] Backwards incompatible sys.stdout.write() behavior in Python 3 (Was: [Python-ideas] Pythonic buffering in Py3 print()) [Python-Dev] Backwards incompatible sys.stdout.write() behavior in Python 3 (Was: [Python-ideas] Pythonic buffering in Py3 print())anatoly techtonik techtonik at gmail.com
Fri Jan 13 16:34:38 CET 2012
Posting to python-dev as it is no more relates to the idea of improving
print().


sys.stdout.write() in Python 3 causes backwards incompatible behavior that
breaks recipe for unbuffered character reading from stdin on Linux -
http://code.activestate.com/recipes/134892/  At first I though that the
problem is in the new print() function, but it appeared that the culprit is
sys.stdout.write()

Attached is a test script which is a stripped down version of the recipe
above.

If executed with Python 2, you can see the prompt to press a key (even
though output on Linux is buffered in Python 2).
With Python 3, there is not prompt until you press a key.

Is it a bug or intended behavior? What is the cause of this break?
-- 
anatoly t.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120113/e0b082f9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getchrec.py
Type: text/x-python
Size: 489 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120113/e0b082f9/attachment.py>
More information about the Python-Dev mailing list

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