Module pyinotify :: Class Notifier
[show private | hide private]
[frames | no frames]

Type Notifier

object --+
         |
        Notifier

Known Subclasses:
ThreadedNotifier

Read notifications, process events.
Method Summary
  __init__(self, watch_manager, default_proc_fun)
Initialization.
bool check_events(self, timeout)
Check for new events available to read, blocks up to timeout milliseconds.
  process_events(self)
Routine for processing events from queue by calling their associated proccessing function (instance of ProcessEvent).
  read_events(self)
Read events from device, build _RawEvents, and enqueue them.
  stop(self)
Close the inotify's instance (close its file descriptor).
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

__init__(self, watch_manager, default_proc_fun=<pyinotify.ProcessEvent object at 0x402c536c>)
(Constructor)

Initialization.
Parameters:
watch_manager - Watch Manager.
           (type=WatchManager instance)
default_proc_fun - Default processing method.
           (type=instance of ProcessEvent)
Overrides:
__builtin__.object.__init__

check_events(self, timeout=4000)

Check for new events available to read, blocks up to timeout milliseconds.
Parameters:
timeout - The timeout is passed on to select.poll(), thus timeout=0 means 'return immediately', timeout>0 means 'wait up to timeout milliseconds' and timeout=None means 'wait eternally', i.e. block.
           (type=int)
Returns:
New events to read.
           (type=bool)

process_events(self)

Routine for processing events from queue by calling their associated proccessing function (instance of ProcessEvent). It also do internal processings, to keep the system updated.

read_events(self)

Read events from device, build _RawEvents, and enqueue them.

stop(self)

Close the inotify's instance (close its file descriptor). It destroys all existing watches, pending events,...

Generated by Epydoc 2.1 on Tue Jul 10 21:40:43 2007 http://epydoc.sf.net