2 Sep 2002 00:01
Help concerning raw_input urgently needed!
Gregor Lingl <glingl <at> aon.at>
2002-09-01 22:01:29 GMT
2002-09-01 22:01:29 GMT
Some ten days ago I posted the following to idle-dev, but
the message went into a wrong thread and was consequently
ignored. So I try it again, this time also at tutor. Several colleagues
asked me already, why this Error occurs - I still can only reply:
I don't know.
By the way: does this Error also occur when working with IDLE on
a Linux-machine? (Aren't there people with happy little Linux-Systems
in Berlin, who could check this easily?)
--------------
Some month ago I copied sitecustomize.py with
appropriate locale-setting to C:\Python22\Lib
thanks to an advice of someone on this list.
This worked well until today I made the observation,
that raw_input doesn't work correctly:
>>> a = raw_input("Hä? ")
Hä? Tschüs
Traceback (most recent call last):
File "<pyshell#2>", line 1, in ?
a = raw_input("Hä? ")
TypeError: object.readline() returned non-string
>>>
Consequently I cannot execute programs with
raw_input from IDLE, if the expected answers (inputs)
may contain "Umlaute". Those same programs,
however, can be executed from the commandline.
And also the interactive Python interpreter can execute
(Continue reading)
I'm using linux SuSE 7.3 with Python 2.2 and this is the result:
>>> a = raw_input("Hä? ")
UnicodeError: ASCII encoding error: ordinal not in range(128)
>>>
>>>
Regards,
Python 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
GRPC IDLE Fork 0.8.2
>>> a = raw_input("Hä? ")
UnicodeError: ASCII encoding error: ordinal not in range(128)
--
Patrick K. O'Brien
Orbtech
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------
Web:
RSS Feed