Aahz aahz at
Fri Oct 23 05:03:14 CEST 2009

In article <hbk4p5$uc$1 at>,
Lawrence D'Oliveiro  <ldo at geek-central.gen.new_zealand> wrote:
>This routine is so useful, I wonder there's nothing like it in module
>struct, or anywhere else I'm aware of:
>    def structread(fromfile, decode_struct) :
>        """reads sufficient bytes from fromfile to be unpacked according to
>        decode_struct, and returns the unpacked results."""                
>        return struct.unpack(decode_struct,
>    #end structread

Guido is generally opposed to simple one-liners.
Aahz (aahz at           <*>

Member of the Groucho Marx Fan Club  

More information about the Python-list mailing list