Mainpulating Data Files

Pete Shinners shredwheat at mediaone.net
Sun Jul 22 15:06:22 EDT 2001


"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







More information about the Python-list mailing list