[issue5110] Printing Unicode chars from the interpreter in a non-UTF8 terminal (Py3)
STINNER Victor
report at bugs.python.org
Fri Jan 30 16:57:27 CET 2009
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
Oh yeah, original sys.displayhook uses a special hack for the _ global
variable:
---------
import sys
import builtins
def hook(message):
if message is None:
return
builtins._ = message
print(ascii(message))
sys.displayhook = hook
---------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5110>
_______________________________________
More information about the Python-bugs-list
mailing list