def __init__(self, dbfile, postfile): CodedOrderedReader.__init__(self, dbfile) self.postfile = postfile dbfile.seek(self.indexbase + self.length * _LONG_SIZE) self.fieldmap = dbfile.read_pickle() self.names = [None] * len(self.fieldmap) for name, num in iteritems(self.fieldmap): self.names[num] = name
def close(self): CodedOrderedReader.close(self) self.postfile.close()