Joined: 13 Apr 2003
|Posted: Sun Sep 25, 2016 4:22 pm Post subject: linuxfd: Python support for eventfd/signalfd/timerfd/inotify
|Update: Version 1.4.3 is out, fixing an var init problem ; added git support (ebuild linuxfd-9999)
Update: Version 1.4.2 is out, removing two residual debug print() calls
Update: Version 1.4.1 is out, fixing a small but important typo. When you change function names, you should do it everywhere...
Today I released linuxfd version 1.4. This Python module adds support for the eventfd, signalfd, timerfd and inotify system calls.
The source distribution is available at PyPI (https://pypi.python.org/pypi/linuxfd/). Its repository can be found at GitHub (https://github.com/FrankAbelbeck/linuxfd). Ebuilds for linuxfd are available at GitHub, too.
Background information from my docs:
|linuxfd.eventfd = class eventfd(builtins.object)
| Class to manage a file descriptor for event notification.
| An event file descriptor is created, which represents a kernel-managed counter.
| Reading and writing this file increments/decrements/resets this counter. As the
| file is pollable via select/poll/epoll it can be used as event notification in
| asynchronous I/O algorithms.
linuxfd.signalfd = class signalfd(builtins.object)
| Class to manage a file descriptor for signal notification.
| A signal file descriptor is created, which accepts signals targeted at the
| caller and becomes readable if triggered. Reading this file returns the pending
| signals for the process. As the file is pollable via select/poll/epoll it can be
| used as an alternative to the usual signal handlers.
linuxfd.timerfd = class timerfd(builtins.object)
| Class to manage a file descriptor for timer notification.
| A timer file descriptor is created, which represents a timer and becomes
| readable if this timer expires. Reading this file returns the number of
| expirations that have occurred since the last read operation.
linuxfd.inotify = class inotify(builtins.object)
| Class to manage an inotify instance.
| An inotify file descriptor is created, which represents an inotify instance.
| Files and directories can be added in order to monitor them. The inotify file
| descriptor becomes readable when such a file alternation event occurs.
Up until now I keep it in a local overlay, but would like to contribute it to Portage. In January 2014 I made a bug report for its predecessor pytimerfd, but to no avail.