print_progress_bar¶
- HSTB.kluster.fqpr_helpers.print_progress_bar(iteration, total, prefix='Progress:', suffix='Complete', decimals=1, length=70, fill='█', print_end='\r')¶
Call in a loop to generate a text progress bar, ex: # A List of Items items = list(range(0, 57)) l = len(items) # Initial call to print 0% progress printProgressBar(0, l, prefix = ‘Progress:’, suffix = ‘Complete’, length = 50) for i, item in enumerate(items): # Do stuff… time.sleep(0.1) # Update Progress Bar printProgressBar(i + 1, l, prefix = ‘Progress:’, suffix = ‘Complete’, length = 50)
- Parameters
iteration – current iteration out of the total iterations
total – total iterations
prefix – prefix string for the display
suffix – suffix string for the display
decimals – number of decimals in the progress percentage
length – character length of the bar
fill – bar fill character
print_end – end character