On 2008-12-11, chengang.beij...@gmail.com wrote: > Hi, > > ord('\xf0') works and it only works for char. Do you know any way to > convet > '\xf0\xf0' and '\xf0\xf0\xff\xfe' to integer?
Perhaps you want the 'struct' module. >>> struct.unpack('!hi', '\xf0\xf0\xf0\xf0\xff\xfe') (-3856, -252641282) help(struct) for more information -- Regards, Stephen Thorne Development Engineer NetBox Blue - 1300 737 060 Scanned by the NetBox from NetBox Blue (http://netboxblue.com/) -- http://mail.python.org/mailman/listinfo/python-list