Hello,
I am trying to use progress bar to show the progress of a script. I want it increase progress after every function in a class is executed. The code I have tried is below:
import progressbar
from time import sleep
class hello():
def no(self):
print 'hello!'
def yes(self):
print 'No!!!!!!'
def pro():
bar = progressbar.ProgressBar(widgets=[progressbar.Bar('=', '[', ']'), ' ', progressbar.Percentage()])
for i in Yep():
bar.update(Yep.i())
sleep(0.1)
bar.finish()
if __name__ == "__main__":
Yep = hello()
pro()
Does anyone know how to get this working. Thanks