Unpacking binary data with struct.unpack

Gordon McMillan gmcm at hypernet.com
Sat Aug 5 08:38:01 EDT 2000


Holger Fuessler wrote: 

>Using struct.unpack('i', data) gives me a ValueError: incomplete format


Don't know whey.

>>> import struct
>>> struct.unpack('i', '\001\000\000\000')
(1,)
>>>

- Gordon



More information about the Python-list mailing list