K i dZddlmZddlZddlZddlmZmZddlm Z m Z erddl m Z GddeZ d d ZeZd gZy) u:module: watchdog.observers :synopsis: Observer that picks a native implementation if available. :author: yesudeep@google.com (Yesudeep Mangalapilly) :author: contact@tiger-222.fr (Mickaël Schoentgen) Classes ======= .. autoclass:: Observer :members: :show-inheritance: :inherited-members: Observer thread that schedules watching directories and dispatches calls to event handlers. You can also import platform specific classes directly and use it instead of :class:`Observer`. Here is a list of implemented observer classes.: ============== ================================ ============================== Class Platforms Note ============== ================================ ============================== |Inotify| Linux 2.6.13+ ``inotify(7)`` based observer |FSEvents| macOS FSEvents based observer |Kqueue| macOS and BSD with kqueue(2) ``kqueue(2)`` based observer |WinApi| Microsoft Windows Windows API-based observer |Polling| Any fallback implementation ============== ================================ ============================== .. |Inotify| replace:: :class:`.inotify.InotifyObserver` .. |FSEvents| replace:: :class:`.fsevents.FSEventsObserver` .. |Kqueue| replace:: :class:`.kqueue.KqueueObserver` .. |WinApi| replace:: :class:`.read_directory_changes.WindowsApiObserver` .. |Polling| replace:: :class:`.polling.PollingObserver` ) annotationsN) TYPE_CHECKINGProtocol)UnsupportedLibcErrorplatform) BaseObserverceZdZddddZy) ObserverType.)timeoutcy)N)selfr s a/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/watchdog/observers/__init__.py__call__zObserverType.__call__2sN)r floatreturnr)__name__ __module__ __qualname__rr rrr r 1s+.Drr cNtjr+tjt5ddlm}|cdddStjr ddlm }|Stjr dd lm}|Stj$rddl m }|Sdd lm}|S#1swYxYw#t$rK ddl m }tjdd|cYS#t$rtjddYnwxYwYgwxYw#t$rtjd dYwxYw) Nr)InotifyObserver)FSEventsObserver)KqueueObserverz.Failed to import fsevents. Fall back to kqueue) stacklevelz;Failed to import fsevents and kqueue. Fall back to polling.)WindowsApiObserverz@Failed to import `read_directory_changes`. Fall back to polling.)PollingObserver)ris_linux contextlibsuppressrwatchdog.observers.inotifyr is_darwinwatchdog.observers.fseventsr Exceptionwatchdog.observers.kqueuerwarningswarn is_windows)watchdog.observers.read_directory_changesris_bsdwatchdog.observers.pollingr)rrrrrs r_get_observer_clsr-5s   !5 6 # B" # #     $ D$ #     & T& %  <: ? # # & &D N[\]%%  k [hij kj  & l MM\ij k lsSBB*2DB'* C>4C:C> C85C>7C88C>=C> D$#D$Observer)rr )__doc__ __future__rr r'typingrrwatchdog.utilsrrwatchdog.observers.apirr r-r.__all__r rrr5sG"H#*93E8E!H   ,r