Mario M. Mueller wrote:
> I have a binary file containing 3 byte float values (big endian).
> How can I read them into python? The struct module does not work,
> since it expects 4 byte floats.

Since the module crystalball is still in development, you'll have to
analyze your three byte float format and convert it either to a
IEEE 754 "single" float and use struct, or convert manually using
bitwise operators.

BTW, who in his mind designs three byte floats? Memory isn't that
expensive anymore. Even C bool is four bytes long.

Regards,


Björn

-- 
BOFH excuse #87:

Password is too complex to decrypt

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

Reply via email to