using struct module on a file

2009-11-18 Thread Ulrich Eckhardt
Hia! I need to read a file containing packed binary data. For that, I find the struct module pretty convenient. What I always need to do is reading a chunk of data from the file (either using calcsize() or a struct.Struct instance) and then parsing it with unpack(). For that, I repeatedly

Re: using struct module on a file

2009-11-18 Thread Jon Clements
On Nov 18, 4:42 pm, Ulrich Eckhardt dooms...@knuut.de wrote: Hia! I need to read a file containing packed binary data. For that, I find the struct module pretty convenient. What I always need to do is reading a chunk of data from the file (either using calcsize() or a struct.Struct instance)

Re: using struct module on a file

2009-11-18 Thread Simon Forman
On Wed, Nov 18, 2009 at 11:42 AM, Ulrich Eckhardt dooms...@knuut.de wrote: Hia! I need to read a file containing packed binary data. For that, I find the struct module pretty convenient. What I always need to do is reading a chunk of data from the file (either using calcsize() or a