Hi All, I am pretty new to python and am having a problem intepreting binary data using struct.unpack. I am reading a file containing binary packed data using open with "rb". All the values are coming through fine when using (integer1,) = struct.unpack('l', line[86:90]) except when line[86:90] contains "carriage-return" "linefeed" which are valid binary packed values. Error = unpack string size dows not match format. It seems that struct, instead of reading 4 bytes for line[86:90] only reads 2 bytes if the second byte is CR or LF.
Thanks Grant -- http://mail.python.org/mailman/listinfo/python-list