Module Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias If NameLoad body ImportFrom alias identifier Assign NameStore Num Assign NameStore ListLoad Str Str Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad NameLoad If Call NameLoad NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Assign NameStore TupleLoad NameLoad orelse Assign NameStore NameLoad Assign NameStore TupleLoad NameLoad Assign NameStore Call NameLoad Str Assign NameStore NameLoad While BoolOpOr UnaryOpNot NameLoad CompareGt Call NameLoad NameLoad Num body If UnaryOpNot NameLoad body TryExcept body Assign NameStore Call NameLoad Call NameLoad NameLoad If CompareGt Call NameLoad NameLoad Num body AugAssignAdd NameStore NameLoad orelse Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad If CompareEq Call NameLoad NameLoad Num body If BoolOpAnd NameLoad NameLoad body Expr Yield Call NameLoad Str Raise NameLoad If NameLoad body If BoolOpOr NameLoad CompareGtE Call NameLoad NameLoad NameLoad body Expr Yield SubscriptLoad NameLoad Slice NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad orelse Expr Yield NameLoad Assign NameStore Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Str TryExcept body Assign NameStore Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call NameLoad Str While CompareGt Call NameLoad NameLoad Num body AugAssignAdd NameStore NameLoad TryExcept body Assign NameStore Call NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list
N/A N/A os N/A mimetypes libcloud.utils.py3 PY3 libcloud.utils.py3 httplib libcloud.utils.py3 next libcloud.utils.py3 b N/A PY3 N/A io FileIO file N/A CHUNK_SIZE 8096 N/A __all__ N/A read_in_chunks exhaust_iterator guess_file_mime_type read_in_chunks N/A N/A iterator chunk_size fill_size yield_empty N/A None False False N/A N/A 
    Return a generator which yields data in chunks.

    :param iterator: An object which implements an iterator interface
                     or a File like object with read method.
    :type iterator: :class:`object` which implements iterator interface.

    :param chunk_size: Optional chunk size (defaults to CHUNK_SIZE)
    :type chunk_size: ``int``

    :param fill_size: If True, make sure chunks are exactly chunk_size in
                      length (except for last chunk).
    :type fill_size: ``bool``

    :param yield_empty: If true and iterator returned no data, yield empty
                        bytes object before raising StopIteration.
    :type yield_empty: ``bool``

    TODO: At some point in the future we could use byte arrays here if version
    >= Python 3. This should speed things up a bit and reduce memory usage.
     N/A chunk_size N/A chunk_size CHUNK_SIZE N/A N/A isinstance iterator N/A file N/A httplib HTTPResponse N/A N/A get_data N/A iterator read N/A args N/A chunk_size N/A N/A get_data next N/A args N/A iterator N/A data N/A b N/A empty False N/A N/A N/A empty N/A N/A len data 0 N/A N/A N/A empty N/A N/A N/A N/A chunk N/A b N/A get_data args N/A N/A N/A len chunk 0 N/A N/A data chunk N/A N/A empty True N/A N/A N/A StopIteration N/A N/A empty True N/A N/A N/A len data 0 N/A N/A N/A empty yield_empty N/A N/A N/A N/A b N/A StopIteration N/A fill_size N/A N/A N/A empty N/A N/A len data chunk_size N/A N/A N/A N/A data N/A chunk_size N/A data N/A data N/A chunk_size N/A N/A N/A data N/A data N/A b N/A exhaust_iterator N/A N/A iterator N/A N/A N/A 
    Exhaust an iterator and return all data returned by it.

    :type iterator: :class:`object` which implements iterator interface.
    :param iterator: An object which implements an iterator interface
                     or a File like object with read method.

    :rtype ``str``
    :return Data returned by the iterator.
     N/A data N/A b N/A N/A N/A chunk N/A b N/A next iterator N/A N/A N/A StopIteration N/A N/A chunk N/A b N/A N/A N/A len chunk 0 N/A N/A data chunk N/A N/A N/A chunk N/A b N/A next iterator N/A N/A N/A StopIteration N/A N/A chunk N/A b N/A data N/A guess_file_mime_type N/A N/A file_path N/A N/A N/A filename N/A N/A N/A os path basename file_path N/A N/A mimetype encoding N/A N/A mimetypes guess_type filename N/A N/A mimetype encoding N/A