Python, Unicode, Excel and Web Tesing
calfdog at yahoo.com
calfdog at yahoo.com
Fri Nov 7 11:16:18 EST 2003
Peter Otten <__peter__ at web.de> wrote in message news:<bofkr9$s1u$03$1 at news.t-online.com>...
> calfdog at yahoo.com wrote:
>
> [problems with excel automation, reportedly due to unicode]
>
> (u'Test1',)
>
> is a tuple, you are doing
>
> (u'Test1',)[-1]
>
> to extract the last item in that tuple, which is, by the way, the same as
> the first item (u'Test1',)[0] in this case.
>
> So you may still run into trouble when you inadvertently try to convert your
> unicode string into a str *and* it contains characters with ord(c) >= 128.
>
> However, rest assured that Python will spit out a helpful traceback :-)
>
> Peter
Thanks Peter for the feedback!!
More information about the Python-list
mailing list