Signals in Python without glib

John (J5) Palmieri johnp at redhat.com
Wed Jul 26 07:30:43 PDT 2006


dbus_connection_read_write_dispatch <http://dbus.freedesktop.org/doc/api/html/group__DBusConnection.html#g65668674acca39dac5f5c434d5d7cc2e>

It reads and writes to the socket as well as handling dispatching. What 
would be nice is to wrap this in the lower level bindings directly and 
then add a method on the Bus class in _dbus.py.  Perhaps even have 
something like

connection = dbus.SessionBus()
connection.generic_main_loop()

Make sure the method is clear that a person shouldn't be using this if 
they can be using a real main loop.

Justin Mazzola Paluska wrote:
> On Mon, Jul 24, 2006 at 03:24:18PM -0400, John (J5) Palmieri wrote:
>   
>> The python bindings can not receive signals without the glib mainloop 
>> and we don't currently wrap the methods needed to update and dispatch 
>> (you need to update as well as dispatch).  Patches welcome.
>>     
>
> What are the update methods?  Looking at dbus_connection_dispatch in
> dbus-connection.c:3472
> (http://dbus.freedesktop.org/doc/api/html/dbus-connection_8c-source.html#l03472),
> it looks like the dispatch method inherently makes updates, but I
> don't think that's what you were referring to.
>
> I've pulled the most recent version of the Python bindings out of git
> and compiled them against my system DBUS (0.62), so if you can send me
> pointers on where to start adding signal handling for Python, I'll
> start hacking.
>
> Thanks,
> 	--Justin
>   



More information about the dbus mailing list