Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!



Python extension module for Niels Provos' libevent:

Build dependencies:

  • libevent-1.4.X

Optional (only required to regenerate event.c if you modify *.pyx):

  • Cython-0.10.3 or newer


Original author and maintainer,

example usage

>>> import event
>>> def sig_cb(a, b, c):
...     print a, b, c
...     event.abort()
>>> def time_cb(msg):
...     print msg
...     return True
>>> event.timeout(5, time_cb, 'hello world')
<event flags=0x81, handle=-1, callback=<function time_cb at 0x3c0c51b4>, arg=('hello world',)>
>>> event.signal(2, sig_cb, 1, [1,2], 345)
<event flags=0x1084, handle=2, callback=<function sig_cb at 0x3c0c5144>, arg=(1, [1, 2], 345)>
>>> event.dispatch()
hello world
hello world
hello world
^C1 [1, 2] 345

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.