summaryrefslogtreecommitdiff
path: root/pyinotify.py
diff options
context:
space:
mode:
authorSebastien Martini <ookoi@mars.(none)>2008-03-31 04:08:49 +0200
committerSebastien Martini <ookoi@mars.(none)>2008-03-31 04:08:49 +0200
commit9b43851fd710e7a621e8b31f157e50c23720cd53 (patch)
treef5dacede9fda61d365605b24c8a8c0cf76060587 /pyinotify.py
parent9bd63dc25643dc6959ad020de8c665d4698fe705 (diff)
downloadpyinotify-9b43851fd710e7a621e8b31f157e50c23720cd53.tar.gz
Cosmetic changes.
Diffstat (limited to 'pyinotify.py')
-rwxr-xr-xpyinotify.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/pyinotify.py b/pyinotify.py
index f2cfb07..82442b1 100755
--- a/pyinotify.py
+++ b/pyinotify.py
@@ -847,10 +847,10 @@ class Notifier:
Read notifications, process events.
"""
- def __init__(self, watch_manager, default_proc_fun=ProcessEvent(),
+ def __init__(self, watch_manager, default_proc_fun=ProcessEvent(),
read_freq=0, treshold=0, timeout=None):
"""
- Initialization. read_freq, treshold and timeout parameters are used
+ Initialization. read_freq, treshold and timeout parameters are used
when looping.
@@ -865,10 +865,10 @@ class Notifier:
poll is blocking waiting for something to read.
@type read_freq: int
@param treshold: file descriptor will be read only if its size to
- read is >= treshold. If != 0, you likely want to
- use it in combination with read_freq because
- without that you keep looping without really reading
- anything and that until the amount to read
+ read is >= treshold. If != 0, you likely want to
+ use it in combination with read_freq because
+ without that you keep looping without really reading
+ anything and that until the amount to read
is >= treshold. At least with read_freq you may sleep.
@type treshold: int
@param timeout:
@@ -932,8 +932,8 @@ class Notifier:
queue_size = buf_[0]
if queue_size < self._treshold:
log.debug('(fd: %d) %d bytes available to read but '
- 'treshold is fixed to %d bytes' % (self._fd,
- queue_size,
+ 'treshold is fixed to %d bytes' % (self._fd,
+ queue_size,
self._treshold))
return
@@ -1059,7 +1059,7 @@ class Notifier:
def loop(self, callback=None, daemonize=False, **args):
"""
- Events are read only once time every min(read_freq, timeout)
+ Events are read only once time every min(read_freq, timeout)
seconds at best and only if the size to read is >= treshold.
@param callback: functor called after each event processing.
@@ -1124,10 +1124,10 @@ class ThreadedNotifier(threading.Thread, Notifier):
max(0, read_freq - timeout) seconds.
@type read_freq: int
@param treshold: file descriptor will be read only if its size to
- read is >= treshold. If != 0, you likely want to
- use it in combination with read_freq because
- without that you keep looping without really reading
- anything and that until the amount to read
+ read is >= treshold. If != 0, you likely want to
+ use it in combination with read_freq because
+ without that you keep looping without really reading
+ anything and that until the amount to read
is >= treshold. At least with read_freq you may sleep.
@type treshold: int
@param timeout:
@@ -1141,7 +1141,7 @@ class ThreadedNotifier(threading.Thread, Notifier):
# stop condition
self._stop_event = threading.Event()
# init Notifier base class
- Notifier.__init__(self, watch_manager, default_proc_fun, read_freq,
+ Notifier.__init__(self, watch_manager, default_proc_fun, read_freq,
treshold, timeout)
def stop(self):
@@ -1157,7 +1157,7 @@ class ThreadedNotifier(threading.Thread, Notifier):
Thread's main loop. don't meant to be called by user directly.
Call start() instead.
- Events are read only once time every min(read_freq, timeout)
+ Events are read only once time every min(read_freq, timeout)
seconds at best and only if the size to read is >= treshold.
"""
# Read and process events while _stop_event condition