Skip to main content

multi-files watcher

Project description

the file watch

Downloads

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

install

$ 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')
        exit(1)
    else:
        file_list = sys.argv[1:]
    
    watcher = FileWatch(file_list, PrintHandler())
    watcher.start()

start watching files

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

examples

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.

Source Distribution

thefilewatch-0.0.8.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file thefilewatch-0.0.8.tar.gz.

File metadata

  • Download URL: thefilewatch-0.0.8.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.4

File hashes

Hashes for thefilewatch-0.0.8.tar.gz
Algorithm Hash digest
SHA256 9faaba5680d45d74132e6e79d7a66fa37e303b5f2fddd886a206b7cf75cc40d9
MD5 e3c3cddf7bab476db11bf3f1bc57b96f
BLAKE2b-256 64d53c22859edf2896e6033d4580494151a56ae221fbc31b7bc210cce576645c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page