ANN: PyKDE now does KDE plugins

John J. Lee jjl at
Sat Nov 8 13:11:37 CET 2003

Jim Bublitz <jbublitzno at> writes:
> The same scheme will work for almost any plugin - the major
> difference is that in some cases the plugin loader doesn't
> provide enough info to allow a proxy for the .so file (for
> example, to load "somePlugin" the loader might expect
> libsomePlugin with an init_somePlugin factory function in C++).

Sounds like some gentle persuasion could be beneficial here!  

[from end of Jim's post]
> On the other hand, there's really no reason why a proxy wouldn't
> *always* work if C++ developers allowed for it - always call a
> factory function with the same name ("init", "create". whatever)
> and pass in an identifying string for locating the plugin.
> Probably makes C++ plugins a little harder to write though.

Not if a (C++) interface is *added*, not replaced.  The KDE plugin
loader could check for init_blah first, and if that's not there, check
for plain old init.

> I had a similar KSpread (KOffice spreadsheet) plugin working
> using a cruder version of the same basic idea. Apps require a
> Python wrapper for their API to be useful, but that's also
> pretty simple to write using sip (for a well-written app
> anyway).

Well, it might be if there were any sip documentation :-) I had some
success using sip before, but it was hard work.  I noticed that Phil
promised docs for PyQt/sip 4, though!


More information about the Python-list mailing list