Use 'd' as the format character for 64-bit double precision numbers with struct.

>>> x = 148.73
>>> unpack("<d", pack("<d", x))[0] == x
True
>>> unpack("<f", pack("<f", x))[0] == x
False

Jeff

Attachment: pgpB2b9owxZs7.pgp
Description: PGP signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to