IDLE : Saving script problems

v.wehren v.wehren at home.nl
Sun Oct 6 07:00:17 EDT 2002


Are you using any french characters (cedilla, accents) and so on in your
comments? Be aware that your build propably defaults to ASCII as encoding
for your code!

The trick used to be adapting your "site.py" in the pythin22\lib directory.
Find "encoding" (ca. line 288). Try changing "ASCII" to "CP1252".

It's possible that this method is depracated, but it worked fine for me...

Regards
vinweh







"ray" <raynaldo.delporte at noos.fr> schrieb im Newsbeitrag
news:3da0114c$0$6939$79c14f64 at nan-newsreader-01.noos.net...
> Hi !
>
> I'm a beginner in Python. Using XP.
>
> When starting the Python Shell, creating a new window with CTRL-N, and
> writing some script, i CANNOT save it !!!
> when saving, the Python Shell main window displays an error message in RED
:
>
> >>> Exception in Tkinter callback
> Traceback (most recent call last):
>   File "C:\Python22\lib\lib-tk\Tkinter.py", line 1292, in __call__
>     return apply(self.func, args)
>   File "C:\PYTHON22\Tools\idle\IOBinding.py", line 126, in save
>     self.save_as(event)
>   File "C:\PYTHON22\Tools\idle\IOBinding.py", line 136, in save_as
>     if self.writefile(filename):
>   File "C:\PYTHON22\Tools\idle\IOBinding.py", line 154, in writefile
>     f.write(chars)
> UnicodeError: ASCII encoding error: ordinal not in range(128)
>
> How can i fix this problem ???
>
> Thanx.
>
>





More information about the Python-list mailing list