| Server IP : 46.101.140.223 / Your IP : 216.73.216.134 Web Server : nginx/1.22.1 System : Linux debian-s-1vcpu-1gb-fra1-01 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : deploy-others ( 1001) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/doc/python3-watchdog/examples/ |
Upload File : |
# coding: utf-8
import sys
import time
from watchdog.observers import Observer
from watchdog.tricks import LoggerTrick
event_handler = LoggerTrick()
observer = Observer()
observer.schedule(event_handler, sys.argv[1], recursive=True)
observer.start()
try:
while True:
time.sleep(1)
finally:
observer.stop()
observer.join()