Progress Bars¶
Progress bar implementations¶
The default implementations of progress bars are listed here, these are the classes that should be used by users.
Note
See ProgressBar
for more info on how to use its implementations.
Progress bar Interface¶
These are the classes that should be used when creating a custom progress bar.
- class ProgressBar(nsteps)[source]¶
Base class that provides an interface for progress bars
To create a progress bar, create an instance of one of its implementations. The progressbar can then be updated by calling the method
update()
.To implement a new progress bar, create a class that derives from
ProgressBar
and implement the methoddraw()
. This method should draw the progress bar based on the accessible member variables. If you need to do anything once in the beginning or the and, you can override thesetup()
and/orteardown()
methods respectively.Warning
The
update()
method should not be overwritten.- Parameters
nsteps (int) – The number of steps that the progressbar will go through
- nsteps¶
The number of steps that the progressbar will go through
- Type
int
- step¶
The current step of the iteration, going from
0
tonsteps
- Type
int
- start_time¶
The start time of the progress bar in seconds since Epoch
- Type
float
- current_time¶
The current time of the progress bar in seconds since Epoch
- Type
float