From a2ee8bcf807fa8d73923075ce838ca8e7ae54cfd Mon Sep 17 00:00:00 2001 From: karim hamidou Date: Wed, 4 Jul 2012 09:45:16 +0200 Subject: [PATCH] renamed src dir to cagibi --- {src => cagibi}/rsync.py | 0 {src => cagibi}/watch.py | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) rename {src => cagibi}/rsync.py (100%) rename {src => cagibi}/watch.py (92%) 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() -- 2.43.0