def process_files():
    """
    Use Manager and Counter as context managers
    """

    with enlighten.Manager() as manager:
        with manager.counter(total=SPLINES, desc='Reticulating:', unit='splines') as retic:
            for num in range(SPLINES):  # pylint: disable=unused-variable
                time.sleep(random.uniform(0.1, 0.5))  # Random processing time
                retic.update()

        with manager.counter(total=LLAMAS, desc='Herding:', unit='llamas') as herd:
            for num in range(SPLINES):  # pylint: disable=unused-variable
                time.sleep(random.uniform(0.1, 0.5))  # Random processing time
                herd.update()
def process_files ( ) : with enlighten . Manager ( ) as manager : with manager . counter ( total = SPLINES , desc = 'Reticulating:' , unit = 'splines' ) as retic : for num in range ( SPLINES ) : time . sleep ( random . uniform ( 0.1 , 0.5 ) ) retic . update ( ) with manager . counter ( total = LLAMAS , desc = 'Herding:' , unit = 'llamas' ) as herd : for num in range ( SPLINES ) : time . sleep ( random . uniform ( 0.1 , 0.5 ) ) herd . update ( )
Use Manager and Counter as context managers