def show_simple_percent_animation(): bar = SimplePercentProgressBar() bar.show_progress_bar() while (not bar.completed()): time.sleep(0.3) bar.increase(random.randint(1, 10)) bar.show_progress_bar()
def show_simple_percent_animation(): bar = SimplePercentProgressBar() bar.show_progress_bar() while(not bar.completed()): time.sleep(0.3) bar.increase(random.randint(1, 10)) bar.show_progress_bar()
def show_up_down_animation(): bar = SimplePercentProgressBar() bar.show_progress_bar() up = False for i in range(5): if up: up = False bar.decrease(1) else: up = True bar.increase(1) while (bar.progress > 0 and bar.progress < 100): time.sleep(0.1) factor = random.randint(1, 10) if up: bar.increase(factor) else: bar.decrease(factor) bar.show_progress_bar()
def show_up_down_animation(): bar = SimplePercentProgressBar() bar.show_progress_bar() up = False for i in range(5): if up: up = False bar.decrease(1) else: up = True bar.increase(1) while(bar.progress > 0 and bar.progress < 100): time.sleep(0.1) factor = random.randint(1, 10) if up: bar.increase(factor) else: bar.decrease(factor) bar.show_progress_bar()