Re: [Tutor] Struct headspinner

2005-10-13 Thread Liam Clarke
> > """By default, C numbers are represented in the machine's native format > and byte order, and properly aligned by skipping pad bytes if necessary > (according to the rules used by the C compiler).""" > > > Does this make sense? Please feel free to ask more questions on this; > it's a bit of a

Re: [Tutor] Struct headspinner

2005-10-12 Thread Danny Yoo
On Wed, 12 Oct 2005, Liam Clarke wrote: > Erm, can someone please aid me? I'm using Windows XP, haven't tested > this code on Linux yet, but, well watch this... > > '<' indicates little-endian, @ indicates native. i is an integer, q is a long. > > >>> struct.calcsize('<3i') > 12 > >>> struct.cal

Re: [Tutor] Struct headspinner

2005-10-12 Thread Tim Peters
[Liam Clarke] > Erm, can someone please aid me? I'm using Windows XP, haven't tested > this code on Linux yet, but, well watch this... > > '<' indicates little-endian, @ indicates native. i is an integer, Yes x 3. > q is a long. No. q in native mode is C "long long" on Linux, or "_int64" on Win

[Tutor] Struct headspinner

2005-10-12 Thread Liam Clarke
Hi all, Erm, can someone please aid me? I'm using Windows XP, haven't tested this code on Linux yet, but, well watch this... '<' indicates little-endian, @ indicates native. i is an integer, q is a long. >>> struct.calcsize('<3i') 12 >>> struct.calcsize('@3i') 12 >>> struct.calcsize('<3iq') 20 >