In article <[EMAIL PROTECTED]>,
 Kent Johnson <[EMAIL PROTECTED]> wrote:

> Robin Haswell wrote:
> > Hey guys. This should just be a quickie: I can't figure out how to convert
> > r"\x2019" to an int - could someone give me a hand please?
> 
> Is this what you mean?
> In [9]: int(r'\x2019'[2:], 16)
> Out[9]: 8217
> 
> or maybe you meant this:
> In [6]: ord(u'\u2019')
> Out[6]: 8217

Or even:

  >>> import struct 
  >>> struct.unpack("q", "\0\0"+ r'\x2019')[0]
  101671307850041L
  >>> 

Who knows :)

Just
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to