def open(self): try: self.fd = open(self.tfile, "a+") for line in self.fd.readlines(): t = Tweet() t.parse(line) self.tmap[t.mid] = t except Exception, ex: print str(ex)
def open(self): self.fd = open(self.tfile) for line in self.fd.readlines(): t = Tweet() t.parse(line) self.tmap[t.mid] = t