[PyKDE] IOSlaves and panel applets
Jim Bublitz
jbublitz at nwinternet.com
Fri Jun 27 07:33:01 BST 2003
On Thursday June 26 2003 16:16, Richard Jones wrote:
> I'm probably being naive, but couldn't we just implement a
> stub handler for both IOSlave and panel applet that implements
> the C++ API, is loadable by whatever C++ mechanism is
> required, but calls out to Python code? The python code would
> mirror the C++ API, and all the C++ stub would need is a
> configuration setting indicating which Python module to use
> for its implementation...
Not naive at all - the KParts and panel applet interfaces would
probably be very similar. I don't know enough about IOSlaves to
know if that's even required there, but if it is it's probably
using a KLibLoader/KLibrary mechanism which would also be the
same. In turn, that should be very similar to what's needed for
KOffice plugins and can also be used to load the Python
interpreter so that scripting can be easily added to KOffice or
other apps that load plugins.
That would probably allow KParts, panel applets, IOSlaves and app
plugins all to be written in Python. Most would also require
some kind of thin wrapper (using sip of course) to expose app
APIs to Python. A lot of this is fairly independent of PyKDE, so
although you could use PyKDE or PyQt, you could also use any
other toolkit with Python bindings or interface.
Whether a single lib or set of libs would be needed, it'd all be
in C++ but wouldn't be that complicated (once you understand the
KDE mechanisms involved - I know some but not all).
Jim
More information about the PyQt
mailing list