Re: an hex number problem

2006-12-21 Thread Eric Brunel
On Thu, 21 Dec 2006 13:33:51 +0100, <[EMAIL PROTECTED]> wrote: > Hello, > I got a number 19968: > > 1. how can I change it to the hex form 0x4e00, '0x%x' % 19968 > 2. and how can I change 0x4e00 to a python unicode character u"\u4e00"? unichr(19968) > thank you! HTH -- python -c "print ''.jo

Re: an hex number problem

2006-12-21 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I got a number 19968: >>> x = 19968 > 1. how can I change it to the hex form 0x4e00, >>> hex(x) '0x4e00' > 2. and how can I change 0x4e00 to a python unicode character u"\u4e00"? >>> unichr(x) u'\u4e00' also see: http://effbot.org/pyfaq/how-do-i-convert-a-

an hex number problem

2006-12-21 Thread could . net
Hello, I got a number 19968: 1. how can I change it to the hex form 0x4e00, 2. and how can I change 0x4e00 to a python unicode character u"\u4e00"? thank you! -- http://mail.python.org/mailman/listinfo/python-list