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/2008-December/084508.html below:

[Python-Dev] Can't have unbuffered text I/O in Python 3.0?

[Python-Dev] Can't have unbuffered text I/O in Python 3.0?Fabio Zadrozny fabiofz at gmail.com
Sun Dec 21 12:28:39 CET 2008
>> It appears that this bug was already reported: http://bugs.python.org/issue4705
>>
>> Any chance that it gets in the next 3.0.x bugfix release?
>>
>> Just as a note, if I do: sys.stdout._line_buffering = True, it also
>> works, but doesn't seem right as it's accessing an internal attribute.
>>
>> Note 2: the solution that said to pass 'wb' does not work, because I
>> need the output as text and not binary or text becomes garbled when
>> it's not ascii.
>>
>
> Can't you decode the bytes after you receive them?
>

Well, in short, no (long answer is that I probably could if I spent a
long time doing my own console instead of relying on what's already
done and working in Eclipse for all the current available languages it
supports, but that just doesn't seem right).

Also, it's seems easily solvable (enabling line buffering for the
python streams when -u is passed) in the Python side... My current
workaround is doing that on a custom site-initialization when a Python
3 interpreter is found, but I find that this is not the right way for
doing it, and it really feels like a Python bug.

-- Fabio
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