Why don't you use ord?

2008/2/10 [EMAIL PROTECTED] <[EMAIL PROTECTED]>:

> I want to make a little Python utility where a user can enter the
> unicode numerical code and get the actual symbol back in utf-8.
>
> For example, a user could enter something like u221E
>
> And get back ∞
>
> Now, this does seem to work:
>
> >>> print u"\u221E"
> ∞
> However how can I change it so it works with a string variable?
>
> print unicode("\u221E") doesn't seem to do it.
>
> I hope this makes sense.  I don't know all the unicode terminology to
> phrase this question coherently ;-)
>
> Thanks in advance,
>
> Greg
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to