|
Original discussion: #250 e.g. tqdm has it: Other message: I've actually had a similar question before and added a widget for it: #98 But... I think you are looking for the AdaptiveTransferSpeed: https://progressbar-2.readthedocs.io/en/latest/progressbar.widgets.html#progressbar.widgets.AdaptiveTransferSpeed Instead of using B as the unit parameter, you want it in this case. https://stackoverflow.com/questions/30834730/how-to-print-iterations-per-second |
Replies: 1 comment 8 replies
import time
import progressbar
widgets = [
progressbar.Percentage(),
progressbar.Bar(),
' ', progressbar.SimpleProgress(),
' ', progressbar.ETA(),
' ', progressbar.AdaptiveTransferSpeed(unit='it'),
]
bar = progressbar.ProgressBar(widgets=widgets)
for i in bar(range(100)):
time.sleep(0.2)
bar.update(i)This does roughly what you want I think :) |
This does roughly what you want I think :)