Questions about the Python bindings

Phil Thompson phil at riverbankcomputing.co.uk
Thu Mar 1 07:10:12 PST 2007


On Thursday 01 March 2007 2:57 pm, dwelch91 wrote:
> (sending this again, doesn't seem to be making it onto the list...)
> Hello,
>
>    I am one of the authors of HPLIP (the set of Linux drivers and tools to
> use
>    with HP printers on Linux) and am interested in the possibility of using
>    DBus as a replacement for our current home-grown IPC mechanism. All of
> our
>    GUIS and various "middleware" layers are written in Python, so the
>    dbus-python bindings are my main interest. I have some
> questions/concerns that I'd appreciate some more information about:
>    1. I have noticed that there appear to be two incompatible sets of
> bindings,
>    the pre-0.80 set and the post-0.80 set. I see that on Ubuntu Edgy that
>    0.71is available and installed by default, and that
>    0.80 is only on Feisty. Since my software must run on distros of all
> "ages",
>    what is the preferred strategy to support a single codebase that runs on
> all
>    versions? Is it possible?
>    2. The GUIs in HPLIP are all written in PyQt (version 3 now, version 4
> in the future). I will need a way to integrate the PyQt/Qt message loop
> with the DBus loop. Is putting the DBus loop in a separate thread the most
> appropriate way to accomplish this (and use Queue or other means of
> inter-thread communication)? Is there a way to integrate the PyQt and DBus
>    message loops together? I see that there are plans for a native Python
> loop
>    in the future. Any idea when this might happen?
>    3. I noticed that there appears to be a dependency on a part of GTK,
> glib,
>    for the DBus loop. Is this an external dependency? (e.g, is a package
> such
>    as python-glib required?).
>    4. In general, is there a feeling that the bindings are stable enough to
> use
>    with production software? Should I wait until things like the Python
> native
>    message loop become available? Even still, how would I support distros
> like
>    Edgy that only have 0.71 available?
>
>    Any information is much appreciated.

As far as PyQt is concerned, the next release of PyQt4 installs 
dbus.mainloop.qt which provides the same support for the Qt event loop as the 
dbus.mainloop.glib module provides for the GLib event loop. It is also in the 
current development snapshots.

Phil


More information about the dbus mailing list