Muscat.Helpers.ProgressBar module¶
- PrintProgressBar(iteration: int | int64, total: int | int64, prefix: str = '', suffix: str = '', decimals: int = 1, length: int = 100, fill: str = '|') None [source]¶
Call in a loop to create terminal progress bar
PrintProgressBar(0, l, prefix = 'Progress:', suffix = 'Complete', length = 50) for i, item in enumerate(items): # Do stuff... # Update Progress Bar PrintProgressBar(i + 1, l, prefix = 'Progress:', suffix = 'Complete', length = 50)
- Parameters:
iteration (int) – Current iteration
total (int) – Total iterations
prefix (str, optional) – Prefix string
suffix (str, optional) – Suffix string
decimals (int, optional) – Positive number of decimals in percent complete
length (str, optional) – Character length of bar
fill (str, optional) – Bar fill character