Strange problem with structs Linux vs. Mac
mblume at freesurf.ch
Tue Mar 18 17:53:55 CET 2008
"Marc 'BlackJack' Rintsch" schrieb
> > 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)==struct.unpack(">I", s)
> Maybe a little more compact and readable:
> In : sys.byteorder
> Out: 'little'
Yes, indeed it is more compact and readable.
More information about the Python-list