Re: Novice: replacing strings with unicode variables in a list

2006-12-06 Thread aine_canby
[EMAIL PROTECTED] skrev: > Fredrik Lundh skrev: > > > Diez B. Roggisch wrote: > > > > > Please provide the full script, and the desired input - then we might be > > > able to help you. > > > > the full *traceback* would pretty useful, too: > > > > http://effbot.org/pyfaq/tutor-i-need-help-im-gett

Re: Novice: replacing strings with unicode variables in a list

2006-12-06 Thread aine_canby
Fredrik Lundh skrev: > Diez B. Roggisch wrote: > > > Please provide the full script, and the desired input - then we might be > > able to help you. > > the full *traceback* would pretty useful, too: > > http://effbot.org/pyfaq/tutor-i-need-help-im-getting-an-error-in-my-program-what-should-i-do.h

Re: Novice: replacing strings with unicode variables in a list

2006-12-06 Thread John Machin
[EMAIL PROTECTED] wrote: > Hi, > > Im totally new to Python so please bare with me. > > Data is entered into my program using the folling code - > > str = raw_input(command) > words = str.split() > > for word in words: > word = unicode(word,'latin-1') > word.encode('utf8') The above statement

Re: Novice: replacing strings with unicode variables in a list

2006-12-06 Thread Peter Otten
Peter Otten wrote: > words = s.split(): Oops, remove bogus colon here. -- http://mail.python.org/mailman/listinfo/python-list

Re: Novice: replacing strings with unicode variables in a list

2006-12-06 Thread Peter Otten
[EMAIL PROTECTED] wrote: > Im totally new to Python so please bare with me. That's no problem, really. I don't use a spellchecker, either, and it wouldn't have protected you from that particular typo... > Data is entered into my program using the folling code - > > str = raw_input(command) > w

Re: Novice: replacing strings with unicode variables in a list

2006-12-06 Thread Fredrik Lundh
Diez B. Roggisch wrote: > Please provide the full script, and the desired input - then we might be > able to help you. the full *traceback* would pretty useful, too: http://effbot.org/pyfaq/tutor-i-need-help-im-getting-an-error-in-my-program-what-should-i-do.htm my guess is that the OP left out

Re: Novice: replacing strings with unicode variables in a list

2006-12-06 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hi, > > Im totally new to Python so please bare with me. > > Data is entered into my program using the folling code - > > str = raw_input(command) > words = str.split() > > for word in words: > word = unicode(word,'latin-1') > word.encode('utf8') > > This gives

Novice: replacing strings with unicode variables in a list

2006-12-06 Thread aine_canby
Hi, Im totally new to Python so please bare with me. Data is entered into my program using the folling code - str = raw_input(command) words = str.split() for word in words: word = unicode(word,'latin-1') word.encode('utf8') This gives an error: File "C:\Python25\lib\encodings\cp850.py"