Module pyinotify
[hide private]
[frames] | no frames]

Module pyinotify

source code

pyinotify


Author: Sebastien Martini

License: MIT License

Contact: seb@dbzteam.org

Version: 0.9.6

Classes [hide private]
  PyinotifyError
Indicates exceptions raised by a Pyinotify class.
  UnsupportedPythonVersionError
Raised on unsupported Python versions.
  InotifyBindingNotFoundError
Raised when no inotify support couldn't be found.
  INotifyWrapper
Abstract class wrapping access to inotify's functions.
  _INotifySyscallsWrapper
  _CtypesLibcINotifyWrapper
  ProcINotify
Access (read, write) inotify's variables through /proc/sys/.
  EventsCodes
Set of codes corresponding to each kind of events.
  _Event
Event structure, represent events raised by the system.
  _RawEvent
Raw event, it contains only the informations provided by the system.
  Event
This class contains all the useful informations about the observed event.
  ProcessEventError
ProcessEventError Exception.
  _ProcessEvent
Abstract processing event class.
  _SysProcessEvent
There is three kind of processing according to each event:
  ProcessEvent
Process events objects, can be specialized via subclassing, thus its behavior can be overriden:
  PrintAllEvents
Dummy class used to print events strings representations.
  ChainIfTrue
Makes conditional chaining depending on the result of the nested processing instance.
  Stats
Compute and display trivial statistics about processed events.
  NotifierError
Notifier Exception.
  Notifier
Read notifications, process events.
  ThreadedNotifier
This notifier inherits from threading.Thread for instanciating a separate thread, and also inherits from Notifier, because it is a threaded notifier.
  AsyncNotifier
This notifier inherits from asyncore.file_dispatcher in order to be able to use pyinotify along with the asyncore framework.
  TornadoAsyncNotifier
Tornado ioloop adapter.
  AsyncioNotifier
asyncio/trollius event loop adapter.
  Watch
Represent a watch, i.e.
  ExcludeFilter
ExcludeFilter is an exclusion filter.
  WatchManagerError
WatchManager Exception.
  WatchManager
Provide operations for watching files and directories.
  RawOutputFormat
Format string representations.
  ColoredOutputFormat
Format colored string representations.
Functions [hide private]
 
logger_init()
Initialize logger instance.
source code
 
compatibility_mode()
Use this function to turn on the compatibility mode.
source code
 
command_line()
By default the watched path is '/tmp' and all types of events are monitored.
source code
Variables [hide private]
  inotify_syscalls = None
  __author__ = 'seb@dbzteam.org (Sebastien Martini)'
  COMPATIBILITY_MODE = False
  log = logger_init()
  ALL_EVENTS = 4095
  output_format = RawOutputFormat()
  IN_ACCESS = 1
  IN_ATTRIB = 4
  IN_CLOSE_NOWRITE = 16
  IN_CLOSE_WRITE = 8
  IN_CREATE = 256
  IN_DELETE = 512
  IN_DELETE_SELF = 1024
  IN_DONT_FOLLOW = 33554432
  IN_EXCL_UNLINK = 67108864
  IN_IGNORED = 32768
  IN_ISDIR = 1073741824
  IN_MASK_ADD = 536870912
  IN_MODIFY = 2
  IN_MOVED_FROM = 64
  IN_MOVED_TO = 128
  IN_MOVE_SELF = 2048
  IN_ONESHOT = 2147483648
  IN_ONLYDIR = 16777216
  IN_OPEN = 32
  IN_Q_OVERFLOW = 16384
  IN_UNMOUNT = 8192
  __package__ = None
  attrname = 'max_user_watches'
  flagc = 'EVENT_FLAGS'
  max_queued_events = <max_queued_events=16385>
  max_user_instances = <max_user_instances=128>
  max_user_watches = <max_user_watches=65536>
  name = 'IN_UNMOUNT'
  val = 8192
  valc = {'IN_IGNORED': 32768, 'IN_Q_OVERFLOW': 16384, 'IN_UNMOU...
Function Details [hide private]

compatibility_mode()

source code 

Use this function to turn on the compatibility mode. The compatibility mode is used to improve compatibility with Pyinotify 0.7.1 (or older) programs. The compatibility mode provides additional variables 'is_dir', 'event_name', 'EventsCodes.IN_*' and 'EventsCodes.ALL_EVENTS' as Pyinotify 0.7.1 provided. Do not call this function from new programs!! Especially if there are developped for Pyinotify >= 0.8.x.

command_line()

source code 

By default the watched path is '/tmp' and all types of events are monitored. Events monitoring serves forever, type c^c to stop it.


Variables Details [hide private]

valc

Value:
{'IN_IGNORED': 32768, 'IN_Q_OVERFLOW': 16384, 'IN_UNMOUNT': 8192}