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

All Samples(7)  |  Call(4)  |  Derive(0)  |  Import(3)

src/s/y/synnefo-HEAD/snf-pithos-backend/pithos/backends/lib/hashfiler/archipelagomapper.py   synnefo(Download)
 
from context_archipelago import ArchipelagoObject
from archipelago.common import (
    Request,
    xseg_reply_info,
        ret = req.success()
        if ret:
            data = string_at(req.get_data(), size)
            req.put()
            self.ioctx_pool.pool_put(ioctx)
            Segsarray = xseg_reply_map_scatterlist * data.contents.cnt
            segs = Segsarray.from_address(ctypes.addressof(data.contents.segs))
            hashes = [string_at(segs[idx].target, segs[idx].targetlen)
                    for idx in xrange(len(segs))]
            req.put()

src/s/y/synnefo-HEAD/snf-pithos-backend/pithos/backends/lib/hashfiler/archipelagoblocker.py   synnefo(Download)
 
from context_archipelago import ArchipelagoObject, file_sync_read_chunks
from archipelago.common import (
    Request,
    xseg_reply_info,
                ret_data = req_data.success()
                if ret_data:
                    append(self._pad(string_at(req_data.get_data(), size)))
                    req_data.put()
                else:

src/s/y/synnefo-HEAD/snf-pithos-backend/pithos/backends/lib/hashfiler/context_archipelago.py   synnefo(Download)
 
from os import SEEK_CUR, SEEK_SET
from archipelago.common import (
    Request,
    string_at,
            ret = req.success()
            if ret:
                s = string_at(req.get_data(), dsize - datalen)
            else:
                s = None