[Tutor] unichr not working as expected

Jim Mooney cybervigilante at gmail.com
Tue Jul 23 06:43:49 CEST 2013


Steven D'Aprano <steve at pearwood.info>

When Python starts up, it needs to set the encoding used, but you *cannot*
> set it to arbitrary encodings. Setting it to arbitrary encodings can cause
> all sorts of weird, hard to diagnose bugs, so to prevent that, Python
> deletes the setdefaultencoding function after using it.
>

Oh, I found that out already. I found a trick to set it anyway, using
reload, then discovered python wasn't printing Anything, even "Hello,
world", even after restarting the interpreter  ;')  I had awful visions of
reinstalling python and re downloading python(x,y) on my Really slow
connection, but the problem went away after awhile. So I will have to
concur in not messing with it.

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130722/5532c9e7/attachment.html>


More information about the Tutor mailing list