def auto_compile(path, extension, cmd):
    wm = pyinotify.WatchManager()
    handler = OnWriteHandler(cwd=path, extension=extension, cmd=cmd)
    notifier = pyinotify.Notifier(wm, default_proc_fun=handler)
    wm.add_watch(path, pyinotify.ALL_EVENTS, rec=True, auto_add=True)
    print path % '==> Start monitoring %s (type c^c to exit)'
    notifier.loop()
dataset/ETHPy150Open seb-m/pyinotify/python2/examples/autocompile.py/auto_compile/swapped operands of `%`