Skip to main content

multi-files watcher

Project description

the file watch


  • capable to watch multi files at the same time.
  • base on pyinotify
  • easy to use


$ pip install thefilewatch

how to use

import sys
from thefilewatch.file_watch import BaseWatchHandler, FileWatch

class PrintHandler(BaseWatchHandler):

    def process(self, content):
        print('getting content ', content)

if __name__ == '__main__':
    if len(sys.argv) < 2:
        print('need watch files')
        file_list = sys.argv[1:]
    watcher = FileWatch(file_list, PrintHandler())

start watching files

$ python -m thefilewatch.file_watch a.txt b.txt


see more specific examples in handler

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for thefilewatch, version 0.0.8
Filename, size File type Python version Upload date Hashes
Filename, size thefilewatch-0.0.8.tar.gz (2.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page