Module pyinotify :: Class TornadoAsyncNotifier
[hide private]
[frames] | no frames]

Class TornadoAsyncNotifier

source code


Tornado ioloop adapter.

Instance Methods [hide private]
 
__init__(self, watch_manager, ioloop, callback=None, default_proc_fun=None, read_freq=0, threshold=0, timeout=None, channel_map=None)
Note that if later you must call ioloop.close() be sure to let the default parameter to all_fds=False.
source code
 
stop(self)
Close inotify's instance (close its file descriptor).
source code
 
handle_read(self, *args, **kwargs)
See comment in AsyncNotifier.
source code

Inherited from Notifier: append_event, check_events, coalesce_events, loop, proc_fun, process_events, read_events

Inherited from Notifier (private): _sleep

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, watch_manager, ioloop, callback=None, default_proc_fun=None, read_freq=0, threshold=0, timeout=None, channel_map=None)
(Constructor)

source code 

Note that if later you must call ioloop.close() be sure to let the default parameter to all_fds=False.

See example tornado_notifier.py for an example using this notifier.

Parameters:
  • ioloop (tornado.ioloop.IOLoop instance.) - Tornado's IO loop.
  • callback (callable object or function) - Functor called at the end of each call to handle_read (IOLoop's read handler). Expects to receive the notifier object (self) as single parameter.
Overrides: object.__init__

stop(self)

source code 

Close inotify's instance (close its file descriptor). It destroys all existing watches, pending events,... This method is automatically called at the end of loop(). Afterward it is invalid to access this instance.

Overrides: Notifier.stop
(inherited documentation)