[Python-Dev] Lazy unpacking for struct module (original) (raw)

Victor Stinner victor.stinner at haypocalc.com
Mon Jun 13 10:44:22 CEST 2011


Le dimanche 12 juin 2011 à 10:27 -0700, Raymond Hettinger a écrit :

I do suggest that you publish your code as a third-party module to make the optional available and to validate whether there is any real interest in this.

See the Hachoir project: it is a lazy parser supporting sub-structures (whereas struct only supports flat structures). It is difficult to implement a lazy parser: I chose to use Python generators to implement them. Hachoir should not enter Python standard library: it evoles too fast and it is too big (60K lines of Python).

See also:

bdec: http://www.protocollogic.com/ Construct: http://construct.wikispaces.com/ FileAlyzer: http://www.safer-networking.org/fr/filealyzer/index.html DataWorkshop: http://www.dataworkshop.de/

DataWorkshop project is dead since 2005. I don't remember if FileAlyzer is a free software or not.

I agree with Raymond: struct module should be kept simple, and if you want a lazy parser: it should be a third party project.

Victor



More information about the Python-Dev mailing list