I want to convert -123.456 into a C double for network transmission in python. So I tried this:
struct.pack('d', -123.456)
I get this as a result:
'w\xbe\x9f\x1a/\xdd^\xc0'
Obviously there is some hex in there, but what is with the w, /, and ^ sprinkled in there?
struct.pack('d', -123.456).hex(" "): Out[37]: '77 be 9f 1a 2f dd 5e c0'