Progress bars with tqdm

At your shell:

$ pip install tqdm

Whenever you iterate over something, wrap it in a tqdm like so:

In [1]: from tqdm import tqdm

In [2]: from time import sleep

In [3]: for i in tqdm(range(1000)):
   ...:     sleep(0.01)
   ...:
      100%|█████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:10<00:00, 98.49it/s]

In [4]:

Comments

Comments powered by Disqus