Hexadecimal Conversion in Python

Bengt Richter bokr at oz.net
Wed Nov 2 15:12:03 EST 2005


On 2 Nov 2005 12:28:26 -0800, "DaBeef" <DerrickHaller at gmail.com> wrote:

>Hello, I am reading in a socket message from a server and am only
>receiving this '....'.  Now obviously it is in the wrong format.  How
>would I convert these bys in Python, I have looked everywhere but I do
>not see much documentation on converting ptyhon types to other data
>types.
>Any Help would be appreciated.
>
print repr(msg)
where msg is what you _actually_ read (and tell us how you got the message in, BTW)
and show us a copy/pasted copy from your screen.
Unless you are very very good at descriptions, it's hard to beat presentation of
machine representations of what you are talking about ;-)

Regards,
Bengt Richter



More information about the Python-list mailing list