Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A version of the PyKQueue module that works on Mac OS X
C Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


Python Extension Module for Kernel Queues
Steven Hazel <>
July 27, 2009

This is PyKQueue-MacOSX.  
It works with Twisted's kqreactor on Mac OS X, as of Twisted 8.2.0.

You probably only need this if you're using Twisted or Python <2.6 on 
Mac OS X.  This package should eventually become unnecessary, since 
kqueue support is included in the Python standard library as of 2.6:

PyKQueue-MacOSX is based on PyKQueue 1.4, found here:

Which is in turn based on PyKQueue 1.1 through 1.3, found here:

I've added a and patches for OS X found here:

That patch appears to be based on this one:

There's also a PyKQueue 2.0 in the Twisted repository, which is an
API-incompatible update to this code.  It aims to work on Mac OS X and
FreeBSD, but is incompatible with the released version of Twisted as
of 8.2.0.  It can be found here:


David Gilbert <>

After a brief email dicussion with, I took possession
of this.  I don't have the ambition he states below, but I needed to add
several different event types.  While adding the ones I required, I added
others from the file.

Doug White <>
July 18, 2000

This is an early version of a Python module to handle kernel queues (kqueues) 
as implemented by Johnathan Lemon (  Information on the 
kqueue system and patches are at

This version of PyKQueue, 1.2, supports the new kevent(2) API in FreeBSD 
4.1-RELEASE and 5-CURRENT (osreldate 50011).  

Sam Rushing and I are working on a totally revamped version of this module
that pushes all the code into C instead of the split system used here.  
The new module should be many times more efficient than this one. Stay tuned
for details.

Something went wrong with that request. Please try again.