summaryrefslogtreecommitdiff
path: root/python2/examples/transient_file_tornado.py
diff options
context:
space:
mode:
authorSebastien Martini <seb@dbzteam.org>2012-10-04 12:18:04 +0200
committerSebastien Martini <seb@dbzteam.org>2012-10-04 12:18:04 +0200
commitaea39987fa5f3efaad15c2fa4fe2597996393327 (patch)
tree0ebde30839328b39722cc274f01f08c1bd7ac8b1 /python2/examples/transient_file_tornado.py
parent75f63f3f63ed1105b5cad98e1121dc55e5043cba (diff)
downloadpyinotify-aea39987fa5f3efaad15c2fa4fe2597996393327.tar.gz
Improved Tornado's notifier.
Diffstat (limited to 'python2/examples/transient_file_tornado.py')
-rw-r--r--python2/examples/transient_file_tornado.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/python2/examples/transient_file_tornado.py b/python2/examples/transient_file_tornado.py
deleted file mode 100644
index a3347d3..0000000
--- a/python2/examples/transient_file_tornado.py
+++ /dev/null
@@ -1,20 +0,0 @@
-import pyinotify
-from tornado.ioloop import IOLoop
-
-wm = pyinotify.WatchManager() # Watch Manager
-mask = pyinotify.IN_MODIFY
-
-class EventHandler(pyinotify.ProcessEvent):
- def process_IN_MODIFY(self, event):
- # We have explicitely registered for this kind of event.
- print '\t', event.pathname, ' -> written'
- def process_default(self, event):
- print event
-
-ioloop = IOLoop.instance()
-notifier = pyinotify.TornadoAsyncNotifier(wm, ioloop)
-#daemon.pids['nginx']
-wdd = wm.watch_transient_file('/tmp/test_file', pyinotify.IN_MODIFY,
- EventHandler)
-
-ioloop.start()