예제 #1
0
 def dumps(self, arg, proto=0):
     from zodbpickle import _pickle
     f = self.output()
     try:
         p = _pickle.Pickler(f, proto)
         p.dump(arg)
         f.seek(0)
         return f.read()
     finally:
         self.close(f)
예제 #2
0
 def dumps(self, arg, proto=0):
     from zodbpickle import _pickle
     p = _pickle.Pickler(proto)
     p.dump(arg)
     return p.getvalue()