def observe_scanner(self, scanner):
        """
        Hooks into multiple events of a scanner.
        """
        scanner.observe(scanner.ALL_EVENTS,
                        self.absorb_args(self.modules.restore))
        if self.clear:
            scanner.observe(scanner.ALL_EVENTS,
                            self.absorb_args(self.clear_on_run))
        scanner.observe(scanner.ALL_EVENTS, self.absorb_args(self._run))
        if self.debug:
            scanner.observe('created',  echo("callback - created  %(file)s"))
            scanner.observe('modified', echo("callback - changed  %(file)s"))
            scanner.observe('deleted',  echo("callback - deleted  %(file)s"))
        self._scanners.append(scanner)
def observe_scanner ( self , scanner ) : scanner . observe ( scanner . ALL_EVENTS , self . absorb_args ( self . modules . restore ) ) if self . clear : scanner . observe ( scanner . ALL_EVENTS , self . absorb_args ( self . clear_on_run ) ) scanner . observe ( scanner . ALL_EVENTS , self . absorb_args ( self . _run ) ) if self . debug : scanner . observe ( 'created' , echo ( "callback - created  %(file)s" ) ) scanner . observe ( 'modified' , echo ( "callback - changed  %(file)s" ) ) scanner . observe ( 'deleted' , echo ( "callback - deleted  %(file)s" ) ) self . _scanners . append ( scanner )
Hooks into multiple events of a scanner.