pip install progressbar
from progressbar import *
total = 10000
counter = 0
widgets = ['进度:', Percentage(), ' ', Bar('='),' ', Timer(), ' ', ETA()]
pbar = ProgressBar(widgets=widgets, maxval=total).start()
for i in range(total):
counter += 1
pbar.update(i)
pbar.finish()
进度:100% |=================================| Elapsed Time: 0:00:00 Time: 0:00:00