Strange problem with structs Linux vs. Mac

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Mon Mar 17 03:12:13 EDT 2008


On Sun, 16 Mar 2008 18:45:19 +0100, Martin Blume wrote:

> I don't think this qualifies as a bug, but I am astonished
> that the struct module does not tell you whether you are
> big endian, you have to find out yourself with
>    struct.unpack('@I', s)[0]==struct.unpack(">I", s)[0]

Maybe a little more compact and readable:

In [92]: sys.byteorder
Out[92]: 'little'

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list