Re: [Tutor] Conflict with encoding in console view and file dump

2010-08-04 Thread Peter Otten
Alex Baraibar wrote: > I just wish I understood better what happened and why. I've looked into > the Unicode section of the official docs, but I probably need to study it > more in order to fully understand it, so... Just in case you didn't come across it, there's a howto that covers the basics:

Re: [Tutor] Conflict with encoding in console view and file dump

2010-08-04 Thread Alex Baraibar
Hello, Peter. I checked my sys.stdout.encoding and it prints: >>> import sys >>> sys.stdout.encoding 'cp1252' Sometimes IDLE tells me I'm using characters that might not work if I don't place this at the beginning of my script: # -*- coding: cp1252 -*- Other than that, I have not made any change

Re: [Tutor] Conflict with encoding in console view and file dump

2010-08-03 Thread Peter Otten
Alex Baraibar wrote: > Hi, Peter. > Sorry for the delay, I've been out for a while. > So I did what you suggested and it prints the following: > > " > import sys > print >> sys.stderr, sys.stdout.encoding > > what does the above print > (a) when you print to the console? it prints cp850 > (b) wh

Re: [Tutor] Conflict with encoding in console view and file dump

2010-08-03 Thread Alex Baraibar
Hi, Peter. Sorry for the delay, I've been out for a while. So I did what you suggested and it prints the following: " import sys print >> sys.stderr, sys.stdout.encoding what does the above print (a) when you print to the console? it prints cp850 (b) when you redirect to a file? it prints None "

Re: [Tutor] Conflict with encoding in console view and file dump

2010-07-30 Thread Peter Otten
Alex Baraibar wrote: > Hello, would you please look at the comments in the code and help me with > an answer? > Thanx. > > # -*- coding: cp1252 -*- > > def festivos(): > fest = [ 'Any Nou:\t\t\t1 de enero', > 'Reis:\t\t\t\t6 de enero', > 'Festa del Treball:\t\t1 de

[Tutor] Conflict with encoding in console view and file dump

2010-07-30 Thread Alex Baraibar
Hello, would you please look at the comments in the code and help me with an answer? Thanx. # -*- coding: cp1252 -*- def festivos(): fest = [ 'Any Nou:\t\t\t1 de enero', 'Reis:\t\t\t\t6 de enero', 'Festa del Treball:\t\t1 de mayo', 'Sant Joan:\t\t\t24 de