[Python-Dev] epoll() and kqueue wrapper for the select module
Christian Heimes
lists at cheimes.de
Fri Dec 21 11:28:55 CET 2007
Ross Cohen wrote:
> Did you look at the python-epoll module which has been in the Cheese
> Shop for quite some time? There is no messing with a low level control
> file descriptor and it presents an identical interface to select.poll().
No, I didn't see the module. To be honest I didn't look at the Python
Package Index but used Google to search for epoll wrappers. I found the
wrapper in Twisted on my disk and two other wrappers. One was written in
pure C and the other one used ctypes.
Your wrapper is a good implementation. I even found an inconvenience in
my implementation when I studied your code. My wrapper raised an
exception when a closed fd was removed with EPOLL_CTL_DEL.
> I would also claim that adding a new interface to accomplish the same
> task is not more pythonic. But I did write the python-epoll module in
> question, so I may be a bit biased.
I agree with Gregory on that part of your answer.
Christian
More information about the Python-Dev
mailing list