Skip to content

Instantly share code, notes, and snippets.

@balloy
balloy / watchdog_persistent_observer.py
Last active August 11, 2022 16:48 — forked from serge-kilimoff/watchdog_persistent_observer.py
Persistent watchdog observer. When watchdog re-start, check if new/modify/delete/etc.. files or directories since the last launch, and send events for suscribers handlers.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is forked from https://gist.github.com/serge-kilimoff/8163233
Supports Python 3 and fixed a few spell errors.
"""
"""
Subclassing Observer for saving states of folders, and load this states at the next observation.