[SciPy-User] unpacking binary data from a C structure

Jason Grout jason-sage@creativetrax....
Tue Apr 13 10:06:24 CDT 2010

On 04/13/2010 08:20 AM, Tom Kuiper wrote:
> So the actual format is 'HHHH L H xxxx HH L xxxx d L xxxx H'
> What are all the mystery 4-byte blanks?  This works:
> buf = fd.read(50)
> header = unpack_from('=4H LH2x 2x2HL4xdL4xH',buf)

If you are using gcc, this might be relevant:




Jason Grout

More information about the SciPy-User mailing list