|
Packit |
130fc8 |
=======================================
|
|
Packit |
130fc8 |
dbus-python_: Python bindings for D-Bus
|
|
Packit |
130fc8 |
=======================================
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
.. _dbus-python: http://www.freedesktop.org/wiki/Software/DBusBindings#python
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
Usage
|
|
Packit |
130fc8 |
=====
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
Online documentation can be found at
|
|
Packit |
130fc8 |
<http://dbus.freedesktop.org/doc/dbus-python/>.
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
There is an incomplete tutorial in `doc/tutorial.txt`__
|
|
Packit |
130fc8 |
(if you compile dbus-python with `docutils`_' ``rst2html`` tool installed or
|
|
Packit |
130fc8 |
you're reading this document on the D-Bus website, there's also an
|
|
Packit |
130fc8 |
`HTML version`__).
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
__ doc/tutorial.txt
|
|
Packit |
130fc8 |
__ doc/tutorial.html
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
`API documentation`_ is generated if you compile dbus-python with `epydoc`_
|
|
Packit |
130fc8 |
version 3 and `docutils`_ installed. An `online copy of the API documentation`_
|
|
Packit |
130fc8 |
is also available.
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
.. _API documentation: api/index.html
|
|
Packit |
130fc8 |
.. _epydoc: http://epydoc.sourceforge.net/
|
|
Packit |
130fc8 |
.. _docutils: http://docutils.sourceforge.net/
|
|
Packit |
130fc8 |
.. _online copy of the API documentation:
|
|
Packit |
130fc8 |
http://dbus.freedesktop.org/doc/dbus-python/api/
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
To develop on dbus-python, see `doc/HACKING.txt`__ or the `HTML version`__.
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
__ doc/HACKING.txt
|
|
Packit |
130fc8 |
__ doc/HACKING.html
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
Problems and alternatives
|
|
Packit |
130fc8 |
=========================
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
dbus-python might not be the best D-Bus binding for you to use. dbus-python
|
|
Packit |
130fc8 |
does not follow the principle of "In the face of ambiguity, refuse the
|
|
Packit |
130fc8 |
temptation to guess", and can't be changed to not do so without seriously
|
|
Packit |
130fc8 |
breaking compatibility.
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
In addition, it uses libdbus (which has known problems with multi-threaded
|
|
Packit |
130fc8 |
use) and attempts to be main-loop-agnostic (which means you have to select
|
|
Packit |
130fc8 |
a suitable main loop for your application).
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
Alternative ways to get your Python code onto D-Bus include:
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
* GDBus, part of the GIO module of `GLib`_, via GObject-Introspection and
|
|
Packit |
130fc8 |
`PyGI`_ (uses the GLib main loop and object model)
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
* QtDBus, part of `Qt`_, via `PyQt`_ (uses the Qt main loop and object model)
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
.. _GLib: http://developer.gnome.org/glib/
|
|
Packit |
130fc8 |
.. _PyGI: https://live.gnome.org/PyGObject
|
|
Packit |
130fc8 |
.. _Qt: https://qt.nokia.com/
|
|
Packit |
130fc8 |
.. _PyQT: http://www.riverbankcomputing.co.uk/software/pyqt/intro
|