RE: How to parse a binary file

2001-07-05 Thread Brian Quinlan
> I've never written a binary parser before, so I'm looking for > some starting point. You should probably start by checking out the struct module (http://www.python.org/doc/current/lib/module-struct.html). If you need a concrete usage example, please let me know. Cheers, Brian -- Brian Quinla

Re: [python-win32] How to parse a binary file

2001-07-05 Thread Jorgensen, Jens
David Ransier wrote: >I've never written a binary parser before, so I'm looking for some starting >point. > >I want to read an image file (Sun Raster format: RAS) and parse the included >color map, writing the color map as a text file (possible CSV format). > >I can open the file in "rb" mode and

How to parse a binary file

2001-07-05 Thread David Ransier
I've never written a binary parser before, so I'm looking for some starting point. I want to read an image file (Sun Raster format: RAS) and parse the included color map, writing the color map as a text file (possible CSV format). I can open the file in "rb" mode and read a certain number of byt