On Thu, 25 May 2006, Alan Gauld wrote:

> In general I prefer to use string formatting to convert into hex 
> format.

I'm a big fan of hexlify:

>>> from binascii import hexlify
>>> s="abc-123"
>>> hexlify(s)
'6162632d313233'



_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to