Skip to content

DIT-Tools/WatchFolder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WatchFolder

Features

watchdog is used to get system events.

  • folders monitoring
  • file sequence and video treatment

Simple usage example

#!/usr/bin/env python


import time
from monitor import Monitor


def callback(file_path):
    '''Callback function

    file_path : absolute path of a completed file

    This function will be call by the Monitor instance each time a file
    is completed.

    '''
    print file_path, 'is completed !'


monitor = Monitor('.', callback)  # Monitor cur directory
monitor.start()                   # Start thread
try:
    while True:
        time.sleep(1)
except KeyboardInterrupt:
monitor.stop()                    # Stop thread and wait until it terminates
print 'All is over !'

Installation

setuptools installation :

python setup.py install

About

Folder monitoring, file sequence and video treatment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages