def print_progression(percent, width=50, delimiters=['[', ']'], symbol='#'):
    """
    Prints a progress bar to the command line

    Parameters
    ----------
    percent : float
        Completion value between 0 and 100
    width : int, optional
        Number of symbols corresponding to a 100 percent completion
    delimiters : list of str, optional
        Character delimiters for the progression bar
    symbol : str, optional
        Symbol representing one unit of progression
    """
    n_symbols = int(percent/100.0*width)
    progress_bar = delimiters[0] + n_symbols * symbol \
                                 + (n_symbols - width) * ' ' \
                                 + delimiters[1] + " "
    sys.stdout.write("\r" + progress_bar + str(percent) + "%")
    sys.stdout.flush()
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/utils/shell.py/print_progression/swapped operands of `-`