Re: Convert hex to string

2005-10-06 Thread Magnus Lycka
Java and Swing wrote: > I have some output stored in a string that looks like.. > > >>>x > > '\x01\xee\x1eo\xc3+\x8b\x83\xfad\xf6E\xaa\x0ea/I\x96\x83\xf5G\xa3\rQ\xfcH\xee\r' > > > According to, http://docs.python.org/lib/typesseq-strings.html, this is > "Unsigned Hexidecimal (lowercase)". How

Re: Convert hex to string

2005-10-03 Thread Larry Bates
It contains non-printing and non-ASCII characters so it can't be printed lie you want. The best Python can do is to show you the hexadecimal of those bytes (as it has done). Printable ASCII characters lie in the range 32 decimal (20 hex) to 125 decimal (7F hex). Those characters in that range ar

Re: Convert hex to string

2005-10-03 Thread jepler
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,

Convert hex to string

2005-10-03 Thread Java and Swing
I have some output stored in a string that looks like.. >> x '\x01\xee\x1eo\xc3+\x8b\x83\xfad\xf6E\xaa\x0ea/I\x96\x83\xf5G\xa3\rQ\xfcH\xee\r' According to, http://docs.python.org/lib/typesseq-strings.html, this is "Unsigned Hexidecimal (lowercase)". How can I get this into normal Ascii so that