|
grepros 1.2.2
grep for ROS bag files and live topics
|
A simple ASCII progress bar with a ticker thread. More...

Public Member Functions | |
| __init__ (self, max=100, value=0, min=0, width=30, forechar="-", backchar=" ", foreword="", afterword="", interval=1, pulse=False, aftertemplate=" {afterword}", **afterargs) | |
| Creates a new progress bar, without drawing it yet. | |
| draw (self, flush=False) | |
| Prints the progress bar, from the beginning of the current line. | |
| run (self) | |
| stop (self) | |
| update (self, value=None, draw=True, flush=False) | |
| Updates the progress bar value, and refreshes by default; returns self. | |
Public Attributes | |
| afterargs | |
| aftertemplate | |
| afterword | |
| backchar | |
| bar | |
| daemon | |
| forechar | |
| foreword | |
| interval | |
| is_running | |
| max | |
| min | |
| pause | |
| percent | |
| printbar | |
| progresschar | |
| pulse | |
| pulse_pos | |
| value | |
| width | |
A simple ASCII progress bar with a ticker thread.
Drawn like '[———/ 36% ] Progressing text..'. or for pulse mode '[ —- ] Progressing text..'.
| __init__ | ( | self, | |
max = 100, |
|||
value = 0, |
|||
min = 0, |
|||
width = 30, |
|||
forechar = "-", |
|||
backchar = " ", |
|||
foreword = "", |
|||
afterword = "", |
|||
interval = 1, |
|||
pulse = False, |
|||
aftertemplate = " {afterword}", |
|||
| ** | afterargs | ||
| ) |
Creates a new progress bar, without drawing it yet.
| max | progress bar maximum value, 100% |
| value | progress bar initial value |
| min | progress bar minimum value, for 0% |
| width | progress bar width (in characters) |
| forechar | character used for filling the progress bar |
| backchar | character used for filling the background |
| foreword | text in front of progress bar |
| afterword | text after progress bar |
| interval | ticker thread interval, in seconds |
| pulse | ignore value-min-max, use constant pulse instead |
| aftertemplate | afterword format() template, populated with vars(self) and afterargs |
| afterargs | additional keywords for aftertemplate formatting |
| draw | ( | self, | |
flush = False |
|||
| ) |
| update | ( | self, | |
value = None, |
|||
draw = True, |
|||
flush = False |
|||
| ) |