def load(self): import info from datetime import datetime inf = info.parse_stream(self.stream_file) self.Version = inf.Version self.TimeDateStamp = datetime.fromtimestamp(inf.TimeDateStamp) self.Age = inf.Age self.GUID = inf.GUID self.names = inf.names del inf
def load(self): import info from datetime import datetime inf = info.parse_stream(self.stream_file) self.Version = inf.Version self.TimeDateStamp = datetime.fromtimestamp(inf.TimeDateStamp) self.Age = inf.Age self.GUID = inf.GUID # build named streams self.names = {} for i in xrange(inf.NumNames): self.names[CString("foo").parse(inf.NameBuffer[inf.NameStreams[i].Offset:])] = inf.NameStreams[i].StreamIndex del inf