def on_add_elem(self, runner): """Called once the runner found a new element.""" elem = runner.element self.model.add_path(elem['path'], Column.make_row(elem)) # Decide how much progress to show (or just move a bit) tick = (elem.get('progress', 0) / 100.0) or None self.show_progress(tick)
def push(size, path): """Helper for pushing a dummy path""" model.add_path(path, Column.make_row({'size': size}), True)