progress bar in python 3

0

I'm trying to set up a progress bar to tell the percentage of running my Python script with varying different functions, but without success how would I create such a progress bar?

    
asked by anonymous 30.08.2016 / 22:43

1 answer

2

You can use the tqdm lib, it is suitable for this and its use is extremely simles, see an example:

>>> from tqdm import tqdm
>>> from time import sleep
>>> for i in tqdm(range(1000)):
...     sleep(0.01)

Just pass an iteravel to the tqdm function and the progress bar will be created automatically. There are other ways to work with this lib, at a glance at documentation

    
31.08.2016 / 02:33