reversing byte order

Jeff Sandys sandysj at asme.org
Fri Nov 3 11:29:55 EST 2000


Wester wrote:
> I have a binary file with double's in the wrong byte order. 
> Can anybody tell me what module this is?

struct is the module

pack(fmt, v1, v2, ...) and unpack(fmt, string) are the functions

first character of the format string specifies byte order,
"<" little-endian, ">" big-endian

and there are a bunch of format characters for short, long, 
unsigned, etc.



More information about the Python-list mailing list