def loads(self, *args): f = self.input(args[0]) try: p = cPickle.Unpickler(f) return p.load() finally: self.close(f)