pack and unpack problems

Jeff Epler jepler at unpythonic.net
Wed Jun 18 04:20:44 CEST 2003


To continue my earlier message:

>>> print struct.unpack("xxLxx8s", data)
(2021161080L, 'xxxxxxxx')

"s" unpacks to one element (a string of length 8) and "c" unpacks to 8
elements (eight chars, each necessarily of length 1)

Jeff





More information about the Python-list mailing list