how to convert UNICODE to integer in Python?
kath
nitte.sudhir at gmail.com
Fri Oct 6 07:16:24 EDT 2006
Fredrik Lundh wrote:
> kath wrote:
>
> > xldays = int(xldate)
> > ValueError: invalid literal for int(): Date
> >
> > because xlrd.xldate_as_tuple() function expects first argument to be an
> > integer. How do I convert an unicode character to integer, so that I
> > could get the date using xlrd.xldate_as_tuple() function.
>
> the error doesn't say anything about Unicode characters, it says that
> someone's passing the string "Date" to the int() function.
>
> >>> int("Date")
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> ValueError: invalid literal for int(): Date
>
> </F>
Hi,
Thanks for reminding me. I was wrong.
Regards,
kath
More information about the Python-list
mailing list