Python ProgressBar adds its own dynamic information to the progress bar

Python progressbar adds its own dynamic information to the progressbar (prevent visuals)

import progressbar
import time
widgets = ['Progress:', 
                   progressbar.Percentage(), ' ', 
                   progressbar.Bar('='),' ', 
                   progressbar.Timer(), ' ',
bar=progressbar.ProgressBar(widgets=widgets, max_value=1000)
for i in range(1000):
    bar.dynamic_messages.training_batch_acc = 10

Dynamic information added by training_batch_ACC in the code, variable is set by Widgets, dynamic_messages.training_batch_ACC modify value, which can be displayed dynamically in real time, concise and clear

Read More: