Hexadecimal Conversion in Python

Stefan Näwe stefan at naewe.de
Wed Nov 2 21:34:58 CET 2005


DaBeef 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.

What is the server supposed to send (you need to know that
if you want to decode it).
Then, lookup struct.unpack .

HTH

Stefan



More information about the Python-list mailing list