I am trying to execute an unpack hex string in double in Python.
When I try to unpack the following:
unpack('d', "4081637ef7d0424a");
I get the following error:
struct.error: unpack requires a string argument of length 8
This doesn't really matter to me, because double is 8 bytes long and
2 characters = 1 hexadecimal value = 1 byte
Thus, in essence, a double length of 8 bytes will be a hexadecimal string of 16 characters.
Any pointers to unpacking this hexadecimal code to a double would be greatly appreciated.
source share