Unicode, command-line and idle
Kent Johnson
kent at kentsjohnson.com
Fri Apr 7 05:57:44 EDT 2006
a.serrano at vielca.com wrote:
> Martin v. Löwis wrote:
>> a.serrano at vielca.com wrote:
>>> This works if I use the console but gives the following error if I use
>>> IDLE:
>>>
>>> Traceback (most recent call last):
>>> File "C:\test.py", line 4, in ?
>>> text2 = unicode(raw_input(), sys.stdin.encoding)
>>> AttributeError: PyShell instance has no attribute 'encoding'
>> What operating system and Python version are you using? This ought to
>> work.
>>
>> Regards,
>> Martin
>
> Python 2.4.3
> IDLE 1.1.3
> Windows XP SP2
?? Works for me on Win2K
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on
win32
Type "copyright", "credits" or "license()" for more information.
IDLE 1.1.3
>>> import sys
>>> sys.stdin.encoding
'cp1252'
Kent
More information about the Python-list
mailing list