A simple ASCII progress bar with a ticker thread
Drawn like
'[---------/ 36% ] Progressing text..'.
or for pulse mode
'[ ---- ] Progressing text..'.
Definition at line 348 of file common.py.
def grepros.common.ProgressBar.__init__ |
( |
|
self, |
|
|
|
max = 100 , |
|
|
|
value = 0 , |
|
|
|
min = 0 , |
|
|
|
width = 30 , |
|
|
|
forechar = "-" , |
|
|
|
backchar = " " , |
|
|
|
foreword = "" , |
|
|
|
afterword = "" , |
|
|
|
interval = 1 , |
|
|
|
pulse = False , |
|
|
|
aftertemplate = " {afterword}" |
|
) |
| |
Creates a new progress bar, without drawing it yet.
@param max progress bar maximum value, 100%
@param value progress bar initial value
@param min progress bar minimum value, for 0%
@param width progress bar width (in characters)
@param forechar character used for filling the progress bar
@param backchar character used for filling the background
@param foreword text in front of progress bar
@param afterword text after progress bar
@param interval ticker thread interval, in seconds
@param pulse ignore value-min-max, use constant pulse instead
@param aftertemplate afterword format() template, populated with vars(self)
Definition at line 358 of file common.py.