def watch(env):
    """Returns a generator of file system events in the environment."""
    watcher = Watcher(env)
    watcher.observer.start()
    try:
        for event in watcher:
            yield event
    except __HOLE__:
        watcher.observer.stop()
dataset/ETHPy150Open lektor/lektor-archive/lektor/watcher.py/watch