progressbar

hhpy.main.progressbar(i: int = 1, i_max: int = 1, symbol: str = '=', empty_symbol: str = '_', mid: str = None, mode: str = 'perc', print_prefix: str = '', p_step: int = 1, printf: Callable = <function tprint>, persist: bool = False, **kwargs)[source]

Prints a progressbar for the currently running process based on iteration counters.

Parameters:
  • i – current iteration
  • i_max – max iteration
  • symbol – symbol that represents reached progress blocks
  • empty_symbol – symbol that represents not yet reached progress blocks
  • mid – what to write in the middle of the progressbar, if mid is passed mode is ignored
  • mode – One of [‘perc’, ‘remaining’, ‘elapsed’] If perc is passed writes percentage. If ‘remaining’ or ‘elapsed’ writes remaining or elapsed time respectively. [optional]
  • print_prefix – what to write in front of the progressbar. Useful when calling progressbar multiple times from different functions.
  • p_step – progressbar prints one symbol (progress block) per p_step
  • printf – Using tprint by default. Use fprint to write to file instead.
  • persist – Whether to persist the progressbar after reaching 100 percent.
  • kwargs – Passed to print function
Returns: