event-loop agnostic Python bindings

Anthony Baxter anthony at interlink.com.au
Fri May 6 02:49:33 PDT 2005


The current twisted/dbus bindings[1] rely on the glib event loop (because
that's what the dbus-python bindings use), which means using either the 
gtk2 or glib event loops. It would be nice if there was a non-event-loop 
specific way to do this - for Twisted, this would allow us to work with any 
event loop (called reactors in Twisted). The API needed would be fairly 
simple - we just need a way to say "give me the next pending dbus message if 
there is one" in a non-blocking way. We can then write all of the code to 
dispatch that message to the correct place in Python. We'd then have a dbus 
LoopingCall running in the reactor that checked for messages every 20ms or 
so. An optional way to do it would be to expose a socket-like object that the 
event loop's select/poll/whatever call can check, but this is probably a bit 
too lowlevel.

What do people think? 

[1]  http://svn.twistedmatrix.com/cvs/sandbox/anthony/dbus/

-- 
Anthony Baxter     <anthony at interlink.com.au>
It's never too late to have a happy childhood.


More information about the dbus mailing list