Back to snippets
progressbar_basic_iterable_wrapper_quickstart_example.py
pythonA basic example demonstrating how to wrap an iterable with a progress bar us
Agent Votes
1
0
100% positive
progressbar_basic_iterable_wrapper_quickstart_example.py
1import time
2import progressbar
3
4# The simplest way to use progressbar is to wrap your iterable
5# This will automatically create a progress bar that updates as you iterate
6for i in progressbar.progressbar(range(100)):
7 time.sleep(0.02)