[Idle-dev] Known bug? Saving fails in IDLE if accents used in characters
Harri Pasanen
harri@nerim.net
Sun, 23 Mar 2003 10:07:43 +0100
Hi,
In Python 2.2.1, Mandrake 9.0, and Python 2.2.2 on Windows 2000/Win98
trying out IDLE, I'm observing the following:
File->New Window
Type:
# déjà
Save: t.py
-->
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 1292, in __call__
return apply(self.func, args)
File "/usr/lib/python2.2/site-packages/idle/IOBinding.py", line 126,
in save
self.save_as(event)
File "/usr/lib/python2.2/site-packages/idle/IOBinding.py", line 136,
in save_as
if self.writefile(filename):
File "/usr/lib/python2.2/site-packages/idle/IOBinding.py", line 154,
in writefile
f.write(chars)
UnicodeError: ASCII encoding error: ordinal not in range(128)
------------
In browsing the bugs, I saw some related problems but not exactly this
one. It was actually my 12 year old son who found this problem - he
wanted to learn programming, so I pointed him to IDLE, and a tutorial
in French (http://www.p3b.org/tutor/denis), but the experience was
not so rewarding due to this bug. So now he is playing with XEmacs +
python, but I'm not sure if that is the best novice environment.
Regards,
Harri