Hello, the following program prompts the user for a word and tests to
see if it is the same as another one. If the user types "españa" (note
that the word contains an 'ñ'), the program should output "same". This
works if I run the code in IDLE but does not if I run it in the windows
console. Can so
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote:
>
> > Hello, the following program prompts the user for a word and tests to
> > see if it is the same as another one. If the user types "españa" (note
> > that the word contains an 'ñ'), the program should output "same". This
> > works if I run the co
Martin v. Löwis wrote:
> [EMAIL PROTECTED] 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: PyShe
Hello again, I've investigated a little bit and this is what I found:
If I run IDLE and type
>>> import sys
>>> sys.stdin.encoding
I get
'cp1252'
But if I have a whatever.py file (it can even be a blank file), I edit
it with IDLE, I press F5 (Run Module) and then type:
>>> import sys
>>> sys.