pyworkflow.utils.progressbar module¶
-
class
pyworkflow.utils.progressbar.
ProgressBar
(total, width=40, fmt='Progress: %(bar)s %(percent)3d%%', symbol='=', output=None, extraArgs=None)[source]¶ Bases:
object
Text progress bar class for Python.
A text progress bar is typically used to display the progress of a long running operation, providing a visual cue that processing is underway.
- Example:
N = 1000 pb = ProgressBar(N, fmt=ProgressBar.FULL) pb.start() for x in range(N):
pb.update(x+1) sleep(0.1)pb.finish()
-
DEFAULT
= 'Progress: %(bar)s %(percent)3d%%'¶
-
DOT
= '.'¶
-
FULL
= '%(bar)s %(current)d/%(total)d (%(percent)3d%%) %(remaining)d to go'¶
-
NOBAR
= '%(current)d/%(total)d (%(percent)3d%%) %(remaining)d to go'¶
-
OBJID
= '%(bar)s %(current)d/%(total)d (%(percent)3d%%) (objectId=%(objectId)d)'¶