All Projects → trendels → gevent_inotifyx

trendels / gevent_inotifyx

Licence: MIT license
gevent compatibility for inotifyx

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to gevent inotifyx

Go Fsevents
Recursive filesystem event watcher using inotify in golang
Stars: ✭ 107 (+386.36%)
Mutual labels:  inotify
Inotify Win
A port of the inotify-wait tool for Windows
Stars: ✭ 214 (+872.73%)
Mutual labels:  inotify
greendb
server frontend for lmdb
Stars: ✭ 20 (-9.09%)
Mutual labels:  gevent
Clsync
file live sync daemon based on inotify/kqueue/bsm (Linux, FreeBSD), written in GNU C
Stars: ✭ 115 (+422.73%)
Mutual labels:  inotify
Inotify
Idiomatic inotify wrapper for the Rust programming language
Stars: ✭ 175 (+695.45%)
Mutual labels:  inotify
Dogo
Monitoring changes in the source file and automatically compile and run (restart).
Stars: ✭ 237 (+977.27%)
Mutual labels:  inotify
Inotify
📢 JS achieve the browser title flashing, scrolling, voice prompts, Chrome/Safari/FireFox/IE notice. has no dependencies. It not interfere with any JavaScript libraries or frameworks. has a reasonable footprint 5.05kb (gzipped: 1.75kb)
Stars: ✭ 892 (+3954.55%)
Mutual labels:  inotify
fswatch
File/Directory Watcher for Modern C++
Stars: ✭ 56 (+154.55%)
Mutual labels:  inotify
Inotify Tools
inotify-tools is a C library and a set of command-line programs providing a simple interface to inotify.
Stars: ✭ 2,447 (+11022.73%)
Mutual labels:  inotify
pmOCR
A wrapper for tesseract / abbyyOCR11 ocr4linux finereader cli that can perform batch operations or monitor a directory and launch an OCR conversion on file activity
Stars: ✭ 53 (+140.91%)
Mutual labels:  inotify
Trigger
Run a user-defined command on file changes
Stars: ✭ 163 (+640.91%)
Mutual labels:  inotify
Hupper
in-process file monitor / reloader for reloading your code automatically during development
Stars: ✭ 167 (+659.09%)
Mutual labels:  inotify
gowatch
watch go files for developer, support run test case and auto reload server application
Stars: ✭ 18 (-18.18%)
Mutual labels:  inotify
Dfs
A distributed file server framework based on swoole and inotify
Stars: ✭ 112 (+409.09%)
Mutual labels:  inotify
funboost
pip install funboost,python全功能分布式函数调度框架,。支持python所有类型的并发模式和全球一切知名消息队列中间件,python函数加速器,框架包罗万象,一统编程思维,兼容50% python编程业务场景,适用范围广。只需要一行代码即可分布式执行python一切函数。旧名字是function_scheduling_distributed_framework
Stars: ✭ 351 (+1495.45%)
Mutual labels:  gevent
Entr
A utility for running arbitrary commands when files change
Stars: ✭ 976 (+4336.36%)
Mutual labels:  inotify
Node Inotify
Inotify bindings for Node.JS
Stars: ✭ 237 (+977.27%)
Mutual labels:  inotify
watcherd
A shell daemon that will listen for directory changes and execute custom commands for each event.
Stars: ✭ 48 (+118.18%)
Mutual labels:  inotify
inotify-rs
Idiomatic inotify wrapper for the Rust programming language
Stars: ✭ 219 (+895.45%)
Mutual labels:  inotify
CampusDailyAutoSign
今日校园/体温签到/海南大学/QQ机器人
Stars: ✭ 15 (-31.82%)
Mutual labels:  gevent

gevent_inotifyx

build-status-img PyPI

Gevent-compatible low-level inotify bindings based on inotifyx.

  • Python 2 and 3 compatible
  • Exposes a low-level inotify(7) API
  • Allows to wait for events in a non-blocking way when using gevent.

Installation

$ pip install gevent_inotifyx

From source:

$ python setup.py install

To run the tests:

$ make test

Examples

Watch a directory while creating new files. This prints

event: test.txt IN_CLOSE|IN_CLOSE_WRITE|IN_ALL_EVENTS

every second:

#!/usr/bin/env python
from __future__ import print_function
import os
import gevent
import gevent_inotifyx as inotify

def create_file_events():
    """Open and close a file to generate inotify events."""
    while True:
        with open('/tmp/test.txt', 'a'):
            pass
        gevent.sleep(1)

def watch_for_events():
    """Wait for events and print them to stdout."""
    fd = inotify.init()
    try:
        wd = inotify.add_watch(fd, '/tmp', inotify.IN_CLOSE_WRITE)
        while True:
            for event in inotify.get_events(fd):
                print("event:", event.name, event.get_mask_description())
    finally:
        os.close(fd)

if __name__ == '__main__':
    tasks = [
        gevent.spawn(watch_for_events),
        gevent.spawn(create_file_events),
    ]
    gevent.joinall(tasks)

License

gevent_inotifyx is licensed under the MIT License. See the included file LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].