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
pgprzSG2OzoK4.pgp
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list