from progress_bar import ProgressBar import sys import time def updateBar(step): p.update_time(step) sys.stdout.write("%s\r" % p) sys.stdout.flush() if __name__ == "__main__": wait_time = 100 # seconds p = ProgressBar(wait_time) p.unit = "%" # change the unit at the end of the progress bar p.empty_char = "." for step in range(wait_time+1): updateBar(step) time.sleep(1)