[SciPy-User] SciPy-User Digest, Vol 80, Issue 22

Tom Kuiper kuiper@jpl.nasa....
Tue Apr 13 11:22:12 CDT 2010

Scott Ransom wrote:
> On Tuesday 13 April 2010 11:39:21 am Tom Kuiper wrote:
>> Thanks for the tip Robert.
>> On my 32-bit laptop:
>> In [11]: calcsize('HHHH L HHH L d L H')
>> Out[11]: 38
>> On a 64-bit machine:
>> In [3]: calcsize('HHHH L HHH L d L H')
>> Out[3]: 50
> That's probably not because of the padding.  It is likely due to the 
> fact that longs are 4 bytes on 32-bit machines and 8 bytes on 64-bit 
> machines.
> Scott
Hi Scott,

I thought of that.  4xL would be the same as Q.  But I'm confused that 
the 'pads' are not always adjacent to the longs.

This works on my 32-bit machine.  (The file was written by the 64-bit 

header = unpack_from('=4H L H 4x 2H L 4x d L 4x H',buf)

If I changed all the longs to long longs on my 32-bit machine, I don't 
think it would solve the problem.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100413/d31c4c70/attachment-0001.html 

More information about the SciPy-User mailing list