You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In certain cases, a programmer may call multiple subroutines that shall watch the same file. With the current implementation, this is cumbersome to do. Allowing the programmer to add an empty ObservedWatch could allow for a much simplified implementation.
What should be implemented?
Either: Add a function Observer.watch(self, filename, recursive=False, event_filter=None) that creates a watch without handlers.
Allow adding
ObservedWatch
without handlersWhy is this helpful?
In certain cases, a programmer may call multiple subroutines that shall watch the same file. With the current implementation, this is cumbersome to do. Allowing the programmer to add an empty
ObservedWatch
could allow for a much simplified implementation.What should be implemented?
Either: Add a function
Observer.watch(self, filename, recursive=False, event_filter=None)
that creates a watch without handlers.Or: Allow passing a
event_handler=None
toObserver.schedule
to create anObservedWatch
without a handler.Optionally: Store a reference to the observer in
ObservedWatch
to simplify this APIThe text was updated successfully, but these errors were encountered: