X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/52d87d11873f1a37b21100700f4798a375361f3f..57c40ffa3fbf7992c3a6c0d6bbfb711ecafd20cf:/pymin/dispatcher.py?ds=inline diff --git a/pymin/dispatcher.py b/pymin/dispatcher.py index 17075a3..24f0d1f 100644 --- a/pymin/dispatcher.py +++ b/pymin/dispatcher.py @@ -216,6 +216,17 @@ class Handler: raise HelpNotFoundError(command) return handler.handler_help + def handle_timer(self): + r"""handle_timer() -> None :: Do periodic tasks. + + By default we do nothing but calling handle_timer() on subhandlers. + """ + for a in dir(self): + if a == 'parent': continue # Skip parents in SubHandlers + h = getattr(self, a) + if isinstance(h, Handler): + h.handle_timer() + def parse_command(command): r"""parse_command(command) -> (args, kwargs) :: Parse a command.