[PyKDE] Konqueror plugins in Python

Jim Bublitz jbublitz at nwinternet.com
Sat May 21 20:49:03 BST 2005

On Friday 20 May 2005 10:29, Giacomo Lacava wrote:

>  how is konqueror going to "pick up" my python code?

> I suppose I can't just point to my .py file as it was a standard C
> library, because as far as I know Python support is not built into KDE
> itself (I run debian/sid, so I downloaded the pykde packages via
> apt-get). I found an old note on PyKDE being able to support .desktop
> applications via some kind of wrapper, but it was generic and it was
> from 2003; would this same wrapper be involved in a plugin call as
> well? And how?

> I'm sorry if this question looks silly, but I can assure you that it's
> not clearly stated anywhere. The answer to this mail could as well go
> straight to the wiki to help other novices like me :)

I just got this message (screwy mail system here), which I assume is the start 
of the other thread I jumped in on.

I agree some of this isn't real well documented. In general, KDE apps look in 
specific paths for plugins. At some point during startup or operation they 
read the .desktop files in the particular path and load the associated 
plugins. The .desktop file would contain the name of .so file to load (.so 
usually located by default in $KDEDIR/lib/kde3 - some have or had specific 
naming requirements). Then, as described in the other msg, the .so file loads 
the interpreter and corresponding Python modules.

I haven't done anything with konqueror, and a quick look at the file system 
didn't prove very enlightening. You might want to contact David Boddie 
<david at boddie.org.uk>, as he's played around with konqueror plugins in the 
past. I think he's posted some code in past too, but not sure what he has 
available online or where.

konqueror seems to use KParts more than plain plugins, but the machinery to 
write a KPart in Python is basically the same - you still need a C++ .so file 
to load, and while the actual C++ code is almost completely generic, enough 
is plugin-specific (usually names/paths) that you need a unique .so for each 
plugin or KPart.


More information about the PyQt mailing list