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

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)
Return a BlockFile object. 

        def open(fname, mode='rb+'):
    """ Return a BlockFile object. """
    return BlockFile(fname, mode)
        


src/f/l/flud-HEAD/flud/protocol/ServerPrimitives.py   flud(Download)
            if os.path.exists(fname):
                loggerstor.debug("adding metadata to %s" % fname)
                f = BlockFile.open(fname,'rb+')
                if not f.hasNode(nodeID):
                    f.addNode(int(nodeID,16), {metakey: meta})
            request.write("Not found: %s" % filekey)
        else:
            f = BlockFile.open(fname,"rb")
            loggerretr.log(logging.INFO, "successful RETRIEVE for %s" % filekey)
            meta = f.meta(int(reqKu.id(),16))
            loggervrfy.debug("looking in regular blockfile for %s" % fname)
            if meta:
                f = BlockFile.open(fname, 'rb+')
            else:
                f = BlockFile.open(fname, 'rb')
            request.write("Not found: %s" % filekey)
        else:
            f = BlockFile.open(fname,"rb+")
            nID = int(reqID, 16)
            if f.hasNode(nID):