

def progress(self, current, total, prefix, bar_length=40):
    try:
        percent = (float(current) / total)
    except Exception:
        return
    hashes = ('#' * int(round((percent * bar_length))))
    spaces = (' ' * (bar_length - len(hashes)))
    sys.stdout.write('\r{0}: [{1}] {2}%'.format(prefix, (hashes + spaces), int(round((percent * 100)))))
    sys.stdout.flush()

dataset/ETHPy150Open SUSE/azurectl/azurectl/logger.py Logger.progress/original