import tqdm import time goal = 256 progress = 0 pbar = tqdm.tqdm(total=goal) while progress < goal: time.sleep(0.1) pbar.update(1) progress += 1 pbar.close()