[PyKDE] Creating a Panel Applet

POYEN OP Olivier (DCL) Olivier.POYEN at clf-dexia.com
Tue Apr 8 16:23:00 BST 2003


Hi All,

I'm trying to create an applet for kicker in python, as the title might have suggest. 
For now, I'm following KDE Tutorials "How to add a panel applet", and I'm stucked by the fact than in the file myPanel.desktop, the line
X-KDE-Library=Libname
has to be some DSO, some dynamic librairie. 
Is there any way i can use a python script instead ? 

I tried to have
myPanel.desktop
Exec=myPanel

where myPanel is a python script in my path.
But what to put in that script ? 

I try to re-produce the factory describe in the tutorial:
----myPanel in PATH-------

#!/usr/bin/env python
import kdeui
import sys
import kdecore

class myPanel(kdeui.KPanelApplet):
	def __init__(self,*args):
		kdeui.KPanelApplet.__init__(self,*args)
		#I knwo that next line probably won't work, but anyway....
		self.setBackgroundColor('blue')
	
def init(*args):
	return myPanel(*args)

----------

Event if I know nothing about C++, I figured that there should be a X-KDE-Library= libname in the desktop file, and that this library should implement an init method.

But how to render that in python ? 

Do I stilll have to do what I want in C++, or can I create a part or the whole panel applet in python.
And how to make it appears on the screen ! 

Any help or pointer or RTFM would be appreciated. 


Thanks in advance,

OPQ
-------------- next part --------------
-----------------------------------------------------------------

Ce message est confidentiel ; son contenu ne represente en aucun

cas un engagement de la part de Dexia Credit Local ou de Dexia

CLF Banque. Toute publication, utilisation ou diffusion, meme

partielle, doit etre autorisee prealablement par l'emetteur. Si

vous n'etes pas destinataire de ce message, merci d'en avertir

immediatement l'expediteur.



This message is confidential ; its contents do not constitute a

commitment by Dexia Credit Local or Dexia CLF Banque. Any

unauthorised disclosure, use or dissemination, either whole or

partial, is prohibited. If you are not the intended recipient of

the message, please notify the sender immediately.

-----------------------------------------------------------------

Consultez notre site internet www.dexia-clf.fr

La cle d'une gestion optimisee du secteur public local

-----------------------------------------------------------------


More information about the PyQt mailing list