Mainpulating Data Files

Tim Daneliuk tundra at tundraware.com
Sun Jul 22 15:30:01 EDT 2001


Pete Shinners wrote:
> 
> "Tim Daneliuk" <tundra at tundraware.com> wrote
> > So, as a general matter, is there a 'Pythonic' way to read
> > this kind of thing in or am I stuck with the usual 'C' approach
> > of reading in n-characters and then filling some data stucture
> 
> tim, i'd start with the struct module. it will at least
> handle the binary sections of data for you. plus all your
> worries about byteswapping and what not can be planned out.
> http://www.python.org/doc/current/lib/module-struct.html

Hmmm, this does some of what I want, but I was actually looking for
more of a metadata-driven approach wherein I could describe the
data abstractly and have Python go read it into a dictionary or
list directly.

Tnx for the response...
-- 
------------------------------------------------------------------------------
Tim Daneliuk
tundra at tundraware.com



More information about the Python-list mailing list