"Alan Gauld" <[email protected]> wrote in message
news:[email protected]...
"Alex" <[email protected]> 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 then be able to see the
error.
That should help you debug it.
Try:
import sys
year = raw_input(u'Introduce el año:'.encode(sys.stdout.encoding))
Without the explicit encoding I got a UnicodeError due to using the 'ascii'
codec.
Interesting that 'print' uses the console encoding for Unicode strings, but
input() and raw_input() don't for their prompts.
You may still get a Unicode error if your console encoding doesn't support
the characters you are trying to print, but it worked on my US Windows
'cp437' console.
-Mark
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor