struct.(un)pack and ASCIIZ strrings

Sergey Dorofeev sergey at fidoman.ru
Sat Jun 18 18:23:14 EDT 2005


I can use string.unpack if string in struct uses fixed amount of bytes.
But is there some extension to struct modue, which allows to unpack
zero-terminated string, size of which is unknown?
E.g. such struct: long, long, some bytes (string), zero, short, short,
short.





More information about the Python-list mailing list