I want to show progress bar in my script because it takes a lots of time to execute while working on huge files.I gone through the python progressbar module
and examples also its good and very intresting to use but as per examples all values are predefine .As we can't guess the max execution time of programm or function.So i am not able to figure out how should i use progress bar function in my sctipt
for data in files:
crawl_data(data)
this is the crawl_data function which take time so how can i set the progress bar values
pbar = ProgressBar(widgets=[Percentage(), Bar()], maxval=300).start()
for i in range(300):
time.sleep(0.01)
pbar.update(i+1)
pbar.finish()
how can i define this range and maxval values in above lines of code.