Improved struct module

Mike Fletcher mcfletch at vrtelecom.com
Thu Oct 14 06:52:19 EDT 1999


I too have many cases where I would like to use C-structure-like data
packing functions.  1/2 of the cases are related to the reading of binary
3-D file formats, where the definition of the file is a structure of
structures linearised to disk using count,data formats.

File := header, pointset, connectionset, normalset, skinset
pointset := count,point*count
point := float x, floaty, floatz

The other 1/2 of the cases is in the creation of multi-user virtual reality
wire protocols, where you want to be able to create similar highly
structured data types (i.e. you might have 20 different structures in
various relationships) and dump/load them across the wire.  Of course, here
you would also like various data-reduction features (e.g. unicode style
"continuation" encodings of integers and strings, bitfields etc.), but
that's just me being greedy :) .

Cheers,
Mike

-----Original Message-----
From: python-list-admin at python.org
[mailto:python-list-admin at python.org]On Behalf Of Just van Rossum
Sent: October 14, 1999 4:22 AM
To: Tim Peters; python-list at python.org
Subject: RE: Improved struct module


At 12:25 AM -0400 10/14/99, Tim Peters wrote:
...
>Curiously enough, I hardly ever muck with C structs.  I too would like to
>hear from people who do!
...





More information about the Python-list mailing list