alphatwirl/progressbar/main.py
def atpbar(iterable, name=None):
    """Progress bar

    """
    try:
        len_ = len(iterable)
    except TypeError:
        logger = logging.getLogger(__name__)
        logging.warning('length is unknown: {!r}'.format(iterable))
        logging.warning('atpbar is turned off')
        return iterable

    if name is None:
        name = repr(iterable)

    return Atpbar(iterable, name=name, len_=len_)
def atpbar(iterable, name=None):
    """Progress bar

    """
    try:
        len_ = len(iterable)
    except TypeError:
        logger = logging.getLogger(__name__)
        logging.warning('length is unknown: {!r}'.format(iterable))
        logging.warning('atpbar is turned off')
        return iterable

    if name is None:
        name = repr(iterable)

    return Atpbar(iterable, name=name, len_=len_)
def atpbar ( iterable , name = None ) : try : len_ = len ( iterable ) except TypeError : logger = logging . getLogger ( __name__ ) logging . warning ( 'length is unknown: {!r}' . format ( iterable ) ) logging . warning ( 'atpbar is turned off' ) return iterable if name is None : name = repr ( iterable ) return Atpbar ( iterable , name = name , len_ = len_ )
Progress bar
Progress bar