Re: [Tutor] Problem with input() and unicode string

2010-07-28 Thread Mark Tolonen
"Alan Gauld" wrote in message news:i2pqps$fp...@dough.gmane.org... "Alex" wrote The first print statement works as expected, both in IDLE and when double-clicking the file for a console view. The second one works in IDLE, but just flashes by when double-clicking the file, due to an error

Re: [Tutor] Problem with input() and unicode string

2010-07-28 Thread Alan Gauld
"Alex" wrote The first print statement works as expected, both in IDLE and when double-clicking the file for a console view. The second one works in IDLE, but just flashes by when double-clicking the file, due to an error report I can't see. So run it from a Console prompt and you will the

Re: [Tutor] Problem with input() and unicode string

2010-07-28 Thread Huy Ton That
You can do: input(unicode('Introduce el año:', 'latin-1').encode('latin-1')) Maybe someone could explain it better than I can. HTH, Huy On Wed, Jul 28, 2010 at 12:05 PM, Alex wrote: > Hello, I have a problem with this code: > > # -*- coding: latin-1 -*- > year = u'año, ò, ó, ç' > print year

Re: [Tutor] Problem with input() and unicode string

2010-07-28 Thread Timo
On 28-07-10 18:05, Alex wrote: Hello, I have a problem with this code: # -*- coding: latin-1 -*- year = u'año, ò, ó, ç' print year year = input(u'Introduce el año:') print year raw_input() The first print statement works as expected, both in IDLE and when double-clicking the file for a console v

[Tutor] Problem with input() and unicode string

2010-07-28 Thread Alex
Hello, I have a problem with this code: # -*- coding: latin-1 -*- year = u'año, ò, ó, ç' print year year = input(u'Introduce el año:') print year raw_input() The first print statement works as expected, both in IDLE and when double-clicking the file for a console view. The second one works in ID