From: karim hamidou Date: Wed, 4 Jul 2012 07:45:16 +0000 (+0200) Subject: renamed src dir to cagibi X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a2ee8bcf807fa8d73923075ce838ca8e7ae54cfd;p=cagibi.git renamed src dir to cagibi --- diff --git a/src/rsync.py b/cagibi/rsync.py similarity index 100% rename from src/rsync.py rename to cagibi/rsync.py diff --git a/src/watch.py b/cagibi/watch.py similarity index 92% rename from src/watch.py rename to cagibi/watch.py index ffad582..d7b568e 100644 --- a/src/watch.py +++ b/cagibi/watch.py @@ -7,7 +7,8 @@ class FileWatcher: self.paused = False def addHandler(self, fn): - """add an handler which is called everytime a change is detected. An handler function is a function which is called whenever a file change is detected. + """add an handler which is called everytime a change is detected. An handler function is a function which is called + whenever a file change is detected. This function takes three parameters : a list of files modified, a list of files added and a list of files removed.""" self.handlers.append(fn) @@ -33,6 +34,7 @@ class FileWatcher: if __name__ == "__main__": def handler(m, a, r): print "added: %s, modified: %s, removed: %s" % (a, m, r) + fw = FileWatcher() fw.addHandler(handler) fw.watch()