summaryrefslogtreecommitdiff
path: root/python2/pyinotify.py
diff options
context:
space:
mode:
Diffstat (limited to 'python2/pyinotify.py')
-rwxr-xr-xpython2/pyinotify.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/python2/pyinotify.py b/python2/pyinotify.py
index 2bf9aea..430c467 100755
--- a/python2/pyinotify.py
+++ b/python2/pyinotify.py
@@ -882,6 +882,7 @@ class PrintAllEvents(ProcessEvent):
"""
self._out.write(str(event))
self._out.write('\n')
+ self._out.flush()
class ChainIfTrue(ProcessEvent):
@@ -2142,8 +2143,11 @@ def command_line():
cb_fun = None
if options.stats:
def cb(s):
- print('%s\n%s\n' % (repr(s.proc_fun()),
- s.proc_fun()))
+ sys.stdout.write(repr(s.proc_fun()))
+ sys.stdout.write('\n')
+ sys.stdout.write(str(s.proc_fun()))
+ sys.stdout.write('\n')
+ sys.stdout.flush()
cb_fun = cb
log.debug('Start monitoring %s, (press c^c to halt pyinotify)' % path)