Hi Jeff,
You was right, my problem was coming from the number of items that I
gave to the "unpack" method.
I was thinking,like an array in C, that slice [2:5] will give 4 items and not 3.
Thanks a lot for your help.
Olivier
On 5/3/05, Jeff Epler <[EMAIL PROTECTED]> wrote:
> As your 'for' loop shows, the number of items in the slice [2:5] is only
> 3, not 4.
>
> Maybe you want the slice [2:6] instead.
>
> >>> x = "xx\xb6/\0\0"
> >>> struct.unpack('i', x[2:6])
> (12214,)
>
> Jeff
>
>
>
--
http://mail.python.org/mailman/listinfo/python-list