Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Decompress a zlib compressed string and unpickle the data

:param obj: the object to be decompressend and unpickled

        def unpickleAndDecompress(obj_dump, decompress=True):
   """ Decompress a zlib compressed string and unpickle the data
   
   :param obj: the object to be decompressend and unpickled
   """
   if decompress:
      if not ZLIB_SUPPORT:
         Util.raiseException('zlib not found !', ImportError)
      obj_decompress = zlib.decompress(obj_dump)
   else:
      obj_decompress = obj_dump
   return cPickle.loads(obj_decompress)
        


src/p/y/Pyevolve-HEAD/pyevolve/Migration.py   Pyevolve(Download)
         # (IP source, data)
         networkData = self.serverThread.popPool()
         networkObject = Network.unpickleAndDecompress(networkData[1])
         # (code, group name, individual)
         pool.append(networkObject)