(self, event)
File system event received from watchdog module,
        not to be confused with package_events which we use for internal communication
        dir(event) = ['event_type', 'is_directory', 'key', 'src_path']
File system event received from watchdog module,
        not to be confused with package_events which we use for internal communication
        dir(event) = ['event_type', 'is_directory', 'key', 'src_path']
File system event received from watchdog module not to be confused with package_events which we use for internal communication dir ( event ) = [ event_type is_directory key src_path ]
def on_any_event(self, event):
        '''
        File system event received from watchdog module,
        not to be confused with package_events which we use for internal communication
        dir(event) = ['event_type', 'is_directory', 'key', 'src_path']
        '''
        if isinstance(event, DirModifiedEvent):
            # change of access time may cause modified event, which can be safely ignored
            # actual changes will fire the corresponding event types:
            # FileMovedEvent
            # DirMovedEvent
            # FileModifiedEvent
            # FileCreatedEvent
            # DirCreatedEvent
            # FileDeletedEvent
            # DirDeletedEvent
            print('Ignore DirModified:', event.key)
            return

        src_path = event.src_path
        path = os.path.dirname(src_path)
        for v, p in self.paths.items():
            if any(i in p for i in (src_path, path)) and v not in self.ignore_views:
                if not self.scheduled_views:
                    self.schedule_refresh(v, datetime.datetime.now())
                else:
                    self.scheduled_views.update({v: datetime.datetime.now()})
def on_any_event ( self , event ) : if isinstance ( event , DirModifiedEvent ) : # change of access time may cause modified event, which can be safely ignored # actual changes will fire the corresponding event types: # FileMovedEvent # DirMovedEvent # FileModifiedEvent # FileCreatedEvent # DirCreatedEvent # FileDeletedEvent # DirDeletedEvent print ( 'Ignore DirModified:' , event . key ) return src_path = event . src_path path = os . path . dirname ( src_path ) for v , p in self . paths . items ( ) : if any ( i in p for i in ( src_path , path ) ) and v not in self . ignore_views : if not self . scheduled_views : self . schedule_refresh ( v , datetime . datetime . now ( ) ) else : self . scheduled_views . update ( { v : datetime . datetime . now ( ) } )