def fetch_dlo(self, container, name, chunk_size=None, verbose=False):
        """
        Returns a list of 2-tuples in the form of (object_name,
        fetch_generator) representing the components of a multi-part DLO
        (Dynamic Large Object).  Each fetch_generator object can be interated
        to retrieve its contents.

        This is useful when transferring a DLO from one object storage system
        to another. Examples would be copying DLOs from one region of a
        provider to another, or copying a DLO from one provider to another.
        """
        if chunk_size is None:
            chunk_size = DEFAULT_CHUNKSIZE

        class FetchChunker(object):
            """
            Class that takes the generator objects returned by a chunked
            fetch_object() call and wraps them to behave as file-like objects
            for uploading.
            """
            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=name)
        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/original