You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Signed-off-by: Michele Calgaro <firstname.lastname@example.org>
|2 years ago|
|lib||11 years ago|
|shell||2 years ago|
|test||4 years ago|
|Makefile.am||13 years ago|
|README||11 years ago|
|TODO||13 years ago|
|configure.in.in||3 years ago|
PYTHON bindings for DCOP
These are the new-style Python DCOP bindings. The way in which the bindings are
implemented has changed since KDE 3.1.1.
How they work
The code is divided into two parts:
pcop.cpp - the C++ interface between Python and DCOP - generates shared library pcop.so
which can be imported by Python
pydcop.py - the Python interface to pcop.cpp
pcop.cpp includes a header file marshal_funcs.h, which is generated from
a data file called marshal_funcs.data by a converter script, gen_marshal_funcs.py
marshal_funcs.data contains the basic code necessary to marshal and demarshal the different
types that DCOP can handle. For example, it codes how to convert a TQString for use by Python
(in this case, a Python string) and the reverse - what the user may supply in Python when
DCOP requires a TQString. In addition to the fundemental types, more complex QT classes are
coded, such as TQRect (which converts to a Python tuple ( (x1,y1), (x2,y2) ) ).
Documentation is auto-generated out of marshal_funcs.data, creating file marshal_funcs_doc.html,
which details how each DCOP type (e.g. TQString, TQRect, int, QCStringList) is represented in Python.
In this implementation, each DCOP type is represented by a basic Python type - numeric, tuple, etc.
There are no "QT bindings" necessary.
These bindings allow you to code Python to act as a DCOP client (querying and/or controlling
other DCOP applications), or as a DCOP server. This means that you can DCOP-enable Python applications
even if they are not QT based.
If you want to use DCOP in the context of a Python QT application, then there are DCOP bindings included in
the PyQT and PyKDE bindings available from:
There are some example Python programs in the test directory.
There is currently a bug which means you must import both pcop and pydcop in your Python programs.
This means that a Python program using dcoppython must include:
In that order. If you don't import pcop, a seg fault occurs when the interpreter exits. This, of course, will be
fixed once I find out what the hell's going on.
The original Python DCOP bindings were written by Torben Weis (email@example.com).
The current implementation, based on Torben's worked, was written by Julian Rockey (firstname.lastname@example.org).
Julian is also the current maintainer.