"struct" module extension proposal

Penfold spam at spam.com
Fri Feb 2 17:16:56 EST 2001


I often pack strings in reverse using an 8 byte number at the end of the
string to tell the user how long it was
I too think that the struct module needs extending to directly support my
arbitrrary packing structure.  What
do you think ?

Des :-)

<paolo.salvan.amniup at libero.it> wrote in message
news:95e3dt$kq0$1 at nnrp1.deja.com...
> I'm using the "struct" module to pack/unpack binary data...
>
> I often pack strings rappresenting raw binary data putting a 4-bytes
> integer indicating the string length, followed by the string
> data...(it's likes the Pascal string coding schema, but with 4-bytes
> prefix instead of the 1 byte prefix)
>
> I think it would be generally useful if the struct format string was
> extended to directly support this packing schema...what you think?
>
>                           Paolo
>
>
> Sent via Deja.com
> http://www.deja.com/





More information about the Python-list mailing list