Python bindings for PopupApplet
Richard Dale
richard.j.dale at gmail.com
Wed Apr 29 16:12:15 CEST 2009
On Wed, Apr 29, 2009 at 2:31 PM, Tim Bocek <tim.bocek at gmail.com> wrote:
> Hello,
> I am trying to write a plasma applet in Python that pops up (like the
> battery monitor) when placed in the toolbar. I gathered that using the
> PopupApplet instead of Applet base class is the "right way" to do this,
> rather than try and use extenders myself and reinvent the wheel. However, I
> also gather from the tutorials that I'm supposed to subclass
> plasmascript.Applet instead of Plasma.Applet when creating my applet. The
> thing is, I can't find an equivalent plasmascript.PopupApplet. I have tried
> including the line
>
> self.setApplet(Plasma.PopupApplet(self)) in the init (NOT __init__) function
> for my plasmascript.Applet subclass, but this leaves me with a blank applet.
>
> If I instead place this line in __init__, I get an exception that the
> maximum recursion depth for object creation has been exceeded.
>
> I've googled around a bit but haven't been able to find any explanation of
> how to do this. The python plasma binding tutorials on TechBase don't
> explain it (though if I figure this out I'd be happy to write one that
> does!) Any ideas regarding what to do or where to look?
Support for writing PopupApplets in scripting languages was only
recently added to the KDE trunk. At the moment you can only write them
in Ruby, but hopefully Python support will be added before the KDE 4.3
release.
-- Richard
More information about the Plasma-devel
mailing list