

def fetch_dlo(self, container, name, chunk_size=None, verbose=False):
    '\n        Returns a list of 2-tuples in the form of (object_name,\n        fetch_generator) representing the components of a multi-part DLO\n        (Dynamic Large Object).  Each fetch_generator object can be interated\n        to retrieve its contents.\n\n        This is useful when transferring a DLO from one object storage system\n        to another. Examples would be copying DLOs from one region of a\n        provider to another, or copying a DLO from one provider to another.\n        '
    if (chunk_size is None):
        chunk_size = DEFAULT_CHUNKSIZE

    class FetchChunker(object):
        '\n            Class that takes the generator objects returned by a chunked\n            fetch_object() call and wraps them to behave as file-like objects\n            for uploading.\n            '

        def __init__(self, gen, verbose=False):
            self.gen = gen
            self.verbose = verbose
            self.processed = 0
            self.count = 0
            self.interval = 100

        def read(self, size=None):
            self.count += 1
            if self.verbose:
                if (self.count > self.interval):
                    self.count = 0
                    print('.')
            ret = self.gen.next()
            self.processed += len(ret)
            return ret
    parts = self.get_container_objects(container, prefix=chunk_size)
    fetches = [(part.name, self.fetch_object(container, part.name, chunk_size=chunk_size)) for part in parts if (part.name != name)]
    job = [(fetch[0], FetchChunker(fetch[1], verbose=verbose)) for fetch in fetches]
    return job

dataset/ETHPy150Open rackspace/pyrax/pyrax/object_storage.py StorageClient.fetch_dlo/VarMisuse@181/442 `name`->`chunk_size`