To implement a status bar like below:
[========== ] 45%
[================ ] 60%
[==========================] 100%
If you are developing a command line interface, I suggest you to take a look at click which is very nice:
import click
import time
for filename in range(3):
with click.progressbar(range(100), fill_char='=', empty_char=' ') as bar:
for user in bar:
time.sleep(0.01)
Here the output you get:
$ python test.py
[====================================] 100%
[====================================] 100%
[========= ] 27%