diff options
| author | Lockywolf <for_sbo.python3-inotify-simple_2023-11-29@lockywolf.net> | 2023-11-30 22:37:51 +0700 |
|---|---|---|
| committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-11-30 23:00:12 +0700 |
| commit | df8cf1df4d088cc7d80cc1b7a91f72104e1787ea (patch) | |
| tree | b5b0370e7460800cf68efb5dac9973daa1f743c5 /python/python3-inotify-simple/README | |
| parent | 4481e8774704d67c5bf33079c386cbf6aa6cd3d9 (diff) | |
python/python3-inotify-simple: Added (inotify wrapper).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/python3-inotify-simple/README')
| -rw-r--r-- | python/python3-inotify-simple/README | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/python/python3-inotify-simple/README b/python/python3-inotify-simple/README new file mode 100644 index 0000000000..900ee4f89e --- /dev/null +++ b/python/python3-inotify-simple/README @@ -0,0 +1,13 @@ +inotify-simple + +inotify_simple is a simple Python wrapper around inotify. No fancy bells +and whistles, just a literal wrapper with ctypes. Only ~100 lines of +code! + +inotify_init1() is wrapped as a file-like object, INotify(), holding the +inotify file descriptor. INotify().read() reads available data from the +file descriptor and returns events as namedtuple objects after unpacking +them with the struct module. inotify_add_watch() and inotify_rm_watch() +are wrapped with no changes at all, taking and returning watch +descriptor integers that calling code is expected to keep track of +itself, just as one would use inotify from C. |
