A dbus.mainloop.NativeMainLoop instance is required [Was: Re: dbus-python: support for Windows and OS X]

Pavel Strashkin pavel.strashkin at gmail.com
Thu Feb 3 05:00:21 PST 2011


Simon,

What about native main loop inside libdbus? Can we do it? Or write our
own and put it inside python-dbus so glib will not be required
anymore.

2011/2/3 Simon McVittie <simon.mcvittie at collabora.co.uk>:
> On Thu, 03 Feb 2011 at 08:20:08 +0100, Ralf Habacker wrote:
>> maybe this is because the Native mainloop implementation in http://cgit.freedesktop.org/dbus/dbus-python/tree/_dbus_bindings/mainloop.c
>> is a noop ?
>
> That's deliberate; the GLib and Qt main loop glue modules each provide a
> subclass of NativeMainLoop which does something useful. The GLib glue is in
> _dbus_glib_bindings in dbus-python, and the Qt glue is provided by PyQt.
>
> My guess would be that your dbus-python and PyQt were compiled differently
> (different compilers? different Python versions? ...) in a way that causes
> them to be incompatible. PyQt hooks into dbus-python by using a Python module
> with a C API (_dbus_bindings), which is relatively unusual; that's why I
> suggested trying the GLib main loop, which is compiled alongside dbus-python
> itself, so it'd be immune to compiler/version differences.
>
> I do notice that the PyQt website says:
>
>    The DBus support module is installed as dbus.mainloop.qt. [...]
>    It is only available for PyQt for X11.
>
>    -- http://www.riverbankcomputing.co.uk/software/pyqt/intro
>
> but perhaps that information is out of date?
>
> I don't develop on Windows, so I'm afraid you're on your own here; I'm somewhat
> surprised dbus-python *compiles* on Windows, to be honest.
>
>    Simon
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
>


More information about the dbus mailing list