def __init__(self, path='.', patterns='*', logfunc=print): PatternMatchingEventHandler.__init__(self, patterns) Observer.__init__(self) self.schedule(self, path=path, recursive=False) self.log = logfunc self.style = 8 self.cnt = 0
def __init__(self, index, event_handler=SyncEventHandler): self.LOCK = RLock() self.pool = [] self.index = index self.watch_path = dict() self.event_handler = event_handler(self) self.mime = Mime() Observer.__init__(self)
def __init__(self, path='.', patterns='*', logfunc=print): ''' Instantiate the watchdog object ''' PatternMatchingEventHandler.__init__(self, patterns) Observer.__init__(self) self.schedule(self, path=path, recursive=False) self.log = logfunc
def __init__(self, path='', token='', patterns='*.test'): watchdog.events.PatternMatchingEventHandler.__init__( self, patterns=['*.test'], ignore_directories=True, case_sensitive=False) self.token = token Observer.__init__(self) self.schedule(self, path=path, recursive=True)
def __init__(self, path='.', patterns=['*.txt', '*.pdf'], logfunc=print): #patterns='*' PatternMatchingEventHandler.__init__(self, patterns) Observer.__init__(self) self.schedule(self, path=path, recursive=False ) #recursive = false means dont go through subfolders self.log = logfunc self.my_ftp = '.'
def __init__( self, path=PATH, patterns="*", ignore_patterns=[".DS_Store"], logfunc=logging.info, ): PatternMatchingEventHandler.__init__(self, patterns) Observer.__init__(self) self.schedule(self, path=path, recursive=True) self.log = logfunc
def __init__(self, path, **kwargs): """Create observer for the directory at `path`.""" Observer.__init__(self, **kwargs) # replace default event queue with ordered set queue to disallow # duplicate events even if added out of order self._event_queue = OrderedSetQueue() RegexMatchingEventHandler.__init__(self) self.path = os.path.abspath(path) self.root_observer = Observer(**kwargs) self.root_watch = None self._stopped_handlers = dict() self._dispatching_enabled = True
def __init__(self, params, sourcepath, destinationpath, logfunc=print): PatternMatchingEventHandler.__init__( self, patterns=params["patterns"], ignore_patterns=params["ignore_patterns"], ignore_directories=params["ignore_directories"], case_sensitive=params["case_sensitive"]) Observer.__init__(self) self.schedule(self, path=sourcepath, recursive=True) self.schedule(self, path=destinationpath, recursive=True) self.sourcepath = sourcepath self.destinationpath = destinationpath self.timestart = time.asctime(time.localtime(time.time())) self.log = logfunc
def __init__(self, config={}): logger.debug('Starting manual fetcher') logger.debug('__init__()') self.config = config self.keep_running = self.config['manual_download'] self.fetch_dir = self.config['manual_download_folder'] self.database = wariety_database.WarietyDatabase(self.config) Observer.__init__(self) if self.keep_running is True: self.event_handler = WarietyManualFetchHandler(self.config) self.schedule(self.event_handler, path=self.fetch_dir, recursive=False) self.start()
def __init__(self, *args, **kwargs): """ Check if watching folders has changed since last observation. If change detected, emit corresponding events at suscribers handlers. At the `Observer.stop`, save states of folders with pickle for the next observation. PARAMETERS ========== save_to : unicode path where save pickle dumping protocol (optionnal): int protocol used for dump current states of watching folders """ self._filename = kwargs.pop('save_to') self._protocol = kwargs.pop('protocol', 0) Observer.__init__(self, *args, **kwargs)
def __init__(self): Observer_super.__init__(self) self.watches = []
def __init__(self, idx, act): Observer.__init__(self) self.schedule(FileEventHandler(idx, act), cfg.get('DEFAULT', 'iqueue') + "/" + idx, False)
def __init__(self, *args): Observer.__init__(self, *args) self.accepting_events = True
def __init__(self): Observer.__init__(self) pub.subscribe(self.on_close, 'wants_to_close')
def __init__(self, path=repo_path, patterns='*', ignore_patterns=["*git*"], logfunc=print):# PatternMatchingEventHandler.__init__(self, patterns, ignore_patterns) Observer.__init__(self) self.schedule(self, path=path, recursive=True) self.log = logfunc
def __init__(self, controller, path='.', patterns="*", logfunc=print): PatternMatchingEventHandler.__init__(self, patterns) Observer.__init__(self) self.controller = controller self.schedule(self, path=path, recursive=False) self.log = logfunc