[Python-3000] IDLE encoding setup
Kurt B. Kaiser
kbk at shore.net
Mon Aug 13 00:31:44 CEST 2007
"Martin v. Löwis" <martin at v.loewis.de> writes:
>> Hopefully MvL has a few minutes to revisit the IOBinding.py code which is
>> setting IDLE's encoding. I'm not sure how it should be configured.
>
> This code was now bogus. In 2.x, the line read
>
> s = unicode(s, IOBinding.encoding)
>
> Then unicode got systematically replaced by str, but so did the type of
> s, and this entire block of code was now obsolete; I removed it in
> 56951.
OK, thanks.
Is the code which sets IOBinding.encoding still correct? That value is
used in several places in IDLE, including setting the encoding for
std{in,err,out}.
Same question for IOBinding.py:IOBinding.{encode(),decode()} !
>
> I now get an IDLE window which crashes as soon as I type something.
Yes, something like
File "/home/kbk/PYDOTORG/projects/python/branches/py3k/Lib/lib-tk/Tkinter.py", line 1022, in mainloop
self.tk.mainloop(n)
TypeError: expected string, bytes found
I can duplicate this using just WidgetRedirector.main() (no IDLE), but I
haven't figured out the problem as yet. That's a very interesting module ::-P
--
KBK
More information about the Python-3000
mailing list