import struct, collections RES = r"C:\git\bt411\content\BTL4.RES" data = open(RES, "rb").read() ver = data[0:4] labOnly, maxID = struct.unpack_from(" 64 or p+slen > len(b): print(" cell[%d] *** slen sanity fail slen=%d @%d ***" % (c, slen, p-4)); return s = b[p:p+slen].decode("ascii","replace"); p += slen + 1 # +1 = trailing null cnt = struct.unpack_from(" %s" % (p, len(b), status)) # ground on the first 2 tables for r in t29[:2]: b = data[r.off:r.off+r.length] parse_table(b, r.name)