Convert hex to string

jepler at jepler at
Mon Oct 3 22:30:52 CEST 2005

it *is* a string.

because most of the characters are not printable, they're presented using hex
notation when you repr() the string.  That's what entering an expression in the
interactive interpreter does (except that it never prints 'None').

If you really want to write whatever those bytes are, then do something like
>>> print x
>>> sys.stdout.write(x)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list