A File System Watch dog
Project description
Watch Dog
author = Dr. Abiira Nathan
A File system watch dog. Fit for monitoring and reloading a server configuration file. Based on watchdog module
Installation
pip install wdog
Example Usage:
from wdog import WatchDog
import config
def reload_config():
print("Reload server configiguration file")
import importlib
importlib.reload(config)
# Assuming config reads reads settings from config.ini
dog = WatchDog(callback=reload_config, folder_to_track='.',
include_patterns=['*/config.ini'])
try:
dog.monitor_forever()
except(KeyBoardInterrupt, EOFError):
print('Bye!')
You can extend this to do some fancy things.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
wdog-1.0.1-py3-none-any.whl
(9.8 kB
view hashes)