Problems With Python 2.4 And 2.4.4 In Struct.unpack And Win/lin
i'm coding on a Linux debian machine with python 2.4. My neighbour with Windows XP and python 2.4.4 He can run this code: w1, w2, w3 = unpack('LLL', pack('LLHH', localtime, ipddr,
Use the I
format code instead of L
.
On your Linux machine, L
isn't twice as long as H
, it's four times as long -- 8 bytes (64 bits) instead of 4 bytes (32 bits).
I
should be 4 bytes (32 bits) on both.
Edit: Make sure to read eryksun's comment.
Post a Comment for "Problems With Python 2.4 And 2.4.4 In Struct.unpack And Win/lin"