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, counter, aid))
But when i try this code i become this error:
w1, w2, w3 = unpack("LLL", pack("LLHH", localtime, ipddr, counter, aid))
struct.error: unpack str size does not match format
Can it be the Version of python or maybe the system?
Use the
Iformat code instead ofL.On your Linux machine,
Lisn’t twice as long asH, it’s four times as long — 8 bytes (64 bits) instead of 4 bytes (32 bits).Ishould be 4 bytes (32 bits) on both.Edit: Make sure to read eryksun’s comment.