[PyKDE] Re: Plugins in Python

David Boddie david at boddie.org.uk
Sat Aug 9 04:02:01 BST 2003


On Thu, 7 Aug 2003 13:38:05, Jim Bublitz <jbublitz at nwinternet.com> wrote:

[Qt plugins in Python and writing plugins generally]

> The second is that plugins need to know something about the API
> they're plugging into, and there needs to be a "bridge" between
> the C++ API and the Python code. You can do this with bindings,
> but, for example for KSpread, the bindings would be huge and
> difficult to use.

Yes, this all appears to depend on the plugin API used. Unfortunately,
some APIs can be really unwieldy, verbose and difficult to translate well;
this is presumably where the next suggestion comes in:

> The other alternative is a "thin wrapper" that
> exposes the internals of the API to Python - these are pretty
> easy to write on the one hand and can be customized to provide a
> usable programming environment on the other hand. You can still
> use sip to generate the bindings lib for this wrapper.

Another case is where the API is minimal because the plugin communicates
with the main application using a standard API, or perhaps a reference
to the plugin object is returned to the application, allowing it to call
plugin functions directly.

> This would be a great project for someone to take the initiative
> on - as I've said in the past, if no one else does it, I'd like
> to get to it eventually, but 'eventually' may be a long time in
> the future. You could also track down some of the stuff David
> Boddie's been doing with KControl and panel applets (posts to
> the list over the last few months - May and June?), as it's
> probably similar in nature.

I've not looked at KControl yet, unfortunately, as I'd like to be able
to track down what is wrong with my panel applet. I suspect that my lack
of experience with sip is letting me down in a fairly fundamental way.

> As part of getting PyKDE on track,
> I'd like to include some of that stuff in the future, but even
> that's still a few weeks off before I get a chance to look at it
> thoroughly.

That means more time for me to debug and test it. First, I'd better look
at PyQt/sip/PyKDE 3.7.

David




More information about the PyQt mailing list