IDLE 3.0a5 has problems with Unicode
Sven Siegmund
sven.siegmund at gmail.com
Sun May 11 18:27:51 EDT 2008
Hello,
I am testing Python 3.0a5's handling of unicode strings. Since SPE is
not yet for Python 3.0, I have begun to write in IDLE 3.0a5.
I have a source code which IDLE 3.0a5 cannot parse, but Python 3.0a5
can:
#!/usr/bin/python
# -*- coding: utf-8 -*-
def načtiSlovník(zdroj='slovník.txt'):
soubor = open(zdroj, mode='r', encoding='utf_8')
řádky = soubor.readlines()
for řádek in řádky:
print(řádek, end='')
načtiSlovník()
# End of source code
I have set up Default Source Encoding to UTF-8 in IDLE's general
configuration. Still, when I open that source code and try to run it,
IDLE complains about "invalid character in identifier" and highlights
"zdroj" red in the first line (sic!).
However, when I run the source code from command line (by "python
<filename>"), it gets executed well and does what it shall do.
I should probably add, that I have installed py3k:62932M, May 9 2008,
16:23:11 [MSC v.1500 32 bit (Intel)] on win32. I use Windows XP SP 3.
Is this a known bug if IDLE 3.0a5 which will be fixed in the final
release?
Greetings,
S.
More information about the Python-list
mailing list