[PATCH] Support for arbitrary main script names in Python plasmoids
Aaron J. Seigo
aseigo at kde.org
Thu Feb 11 19:16:53 CET 2010
On February 11, 2010, Luca Beltrame wrote:
> Hello,
>
> currently if you use Python plasmoids the main script *must* be named
> "main.py" because it is hardcoded into pyappletscripts.py. When using a
> different mainscript in the .desktop file (like Plasmate does) this will
> ensure the plasmoid will not run (you get a NameError exception).
>
> The attached patch fixes this by retrieving the mainscript file, stripping
> it to its name and then using Python introspection (__dict__) to pass the
> right module name to the CreateApplet call.
i can't comment on the use of __dict__ (my python-fu is non-existent :) but
using mainScript() is obviously correct from a libplasma API usage perspective
and if this fixes things then yes it should be backported.
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Qt Development Frameworks
More information about the Plasma-devel
mailing list