Detect file creation with watchdog
问题 I am trying to detect when a file with a given name is created in a directory. I am doing it thanks to watchdog. The creation is correctly detected but I don't know how to terminate the application properly once the detection is done. My piece of code is the following: #!/usr/bin/env python # -*- coding: utf-8 -*- import logging import sys import time from watchdog.events import FileSystemEventHandler from watchdog.observers import Observer logging.basicConfig(level=logging.ERROR) class