(it, label='', hide=False,)
Progress iterator. Prints a mill while iterating over the items.
Progress iterator. Prints a mill while iterating over the items.
Progress iterator . Prints a mill while iterating over the items .
def mill(it, label='', hide=False,): 
    """Progress iterator. Prints a mill while iterating over the items."""

    def _mill_char(_i):
        if _i == 100:
            return ' '
        else:
            return MILL_CHARS[_i % len(MILL_CHARS)]

    def _show(_i):
        if not hide:
            STREAM.write(MILL_TEMPLATE % (
                label, _mill_char(_i), _i, count))
            STREAM.flush()

    count = len(it)

    if count:
        _show(0)

    for i, item in enumerate(it):

        yield item
        _show(i+1)

    if not hide:
        STREAM.write('\n')
        STREAM.flush()
def mill ( it , label = '' , hide = False , ) : def _mill_char ( _i ) : if _i == 100 : return ' ' else : return MILL_CHARS [ _i % len ( MILL_CHARS ) ] def _show ( _i ) : if not hide : STREAM . write ( MILL_TEMPLATE % ( label , _mill_char ( _i ) , _i , count ) ) STREAM . flush ( ) count = len ( it ) if count : _show ( 0 ) for i , item in enumerate ( it ) : yield item _show ( i + 1 ) if not hide : STREAM . write ( '\n' ) STREAM . flush ( )