mhn2
mhn2

Reputation: 129

How to create loading in python shell

In pip, when you install a library and it starts downloading you can see a loading rectangle that start filling with white. How to add something like that in output shell to show a progress?

Upvotes: 1

Views: 141

Answers (1)

Kuldeep Singh Sidhu
Kuldeep Singh Sidhu

Reputation: 3856

You are looking for tqdm

Installation

pip3 install tqdm
from tqdm import tqdm
for i in tqdm(range(20)):
    pass

Output

100%|██████████| 20/20 [00:00<00:00, 6686.28it/s]

DOCS for more help

Upvotes: 2

Related Questions