# http://pyrocko.org - GPLv3 # # The Pyrocko Developers, 21st Century # ---|P------/S----------~Lg----------
self._widgets = widgets self._maxval = maxval self._val = 0 self._time = time.time()
for widget in self._widgets: if isinstance(widget, str): return widget
logger.info('%s...' % self.label()) return self
self._val = val t = time.time() if t - self._time > 5.0: logger.info('%s: %i/%i %3.0f%%' % ( self.label(), self._val, self._maxval, 100.*float(self._val) / float(self._maxval)))
self._time = t
logger.info('%s: done.' % self.label())
pass
pass
pass |