Public Member Functions | |
def | __init__ |
def | update |
Public Attributes | |
format | |
Static Public Attributes | |
dictionary | mapping |
Static Private Attributes | |
tuple | __slots__ = ('format',) |
Definition at line 132 of file progressbar.py.
def progressbar::FormatLabel::__init__ | ( | self, | |
format | |||
) |
Reimplemented from progressbar::Timer.
Definition at line 146 of file progressbar.py.
def progressbar::FormatLabel::update | ( | self, | |
pbar | |||
) |
Updates the widget. pbar - a reference to the calling ProgressBar
Reimplemented from progressbar::Timer.
Definition at line 149 of file progressbar.py.
00150 : 00151 context = {} 00152 for name, (key, transform) in self.mapping.items(): 00153 try: 00154 value = getattr(pbar, key) 00155 00156 if transform is None: 00157 context[name] = value 00158 else: 00159 context[name] = transform(value) 00160 except: pass 00161 00162 return self.format % context
tuple progressbar::FormatLabel::__slots__ = ('format',) [static, private] |
Reimplemented from progressbar::Timer.
Definition at line 145 of file progressbar.py.
Reimplemented from progressbar::Timer.
Definition at line 146 of file progressbar.py.
dictionary progressbar::FormatLabel::mapping [static] |
{ 'elapsed': ('seconds_elapsed', Timer.format_time), 'finished': ('finished', None), 'last_update': ('last_update_time', None), 'max': ('maxval', None), 'seconds': ('seconds_elapsed', None), 'start': ('start_time', None), 'value': ('currval', None) }
Definition at line 135 of file progressbar.py.