[Spambayes] first experiments - "UnicodeDecodeError" problem inCzech setup

Mark Hammond mhammond at skippinet.com.au
Mon Jul 7 10:52:06 EDT 2003


> Sorry, but I've never laid my fingers on python (and for all practical
> purposes haven't laid my fingers on ANY programming language) 
> before, and I
> couldn't get the above to work in any useful way. The 
> interpreter reacts
> like this:

Sorry about that - I should have been more clear.

> >>> f=unicode("c:\\@test-\xe0\xf2", "latin-1")
> >>> os.path.join(f, "foo")
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> NameError: name 'os' is not defined

Perform an "import os" before the above.

> >>> ntpath.join(f, "foo")
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> NameError: name 'ntpath' is not defined

import ntpath

should get that one working.

Thanks,

Mark.




More information about the Spambayes mailing list