[PyKDE] Re: Help getting started with applets

ian reinhart geiser geiseri at yahoo.com
Thu Apr 11 18:52:37 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

We are actually talking about this in KDE.  The current plan is to make a 
wrapper KPart and Kicker applet that will load PyKDE applets...

I am not sure what the progress on this is.

I can crank out a kicker applet in about 5 min, the hard part would be loading 
the pyqt code.  is anyone here an embedding expert that would want to attack 
at least kicker applets with me first?

if we can do a kicker applet any kpart would be trivial.

- -ian reinhart geiser

On Thursday 11 April 2002 01:30 pm, Jim Bublitz wrote:
> On 11-Apr-02 Chris Burn <chris_burn at bigfoot.com> wrote:
> > Hi, I've just got PyQt and PyKDE built and it all looks good.
> > I want to write a panel applet but I don't know how to get
> > started. I know how in C from the tutorial :
> > http://developer.kde.org/documentation/tutorials/dot/panel-applets
> > .html
> > but I can't think how to do this with PyKDE and I can't find any
> > docs/tutorials/examples for applets.
> >
> > Could anyone give me some pointers? Perhaps port the first hello
> > world  example from the link to pyKDE? That would be great.
>
> Basically everything you need is already in PyKDE2, but there are
> two nasty problems to overcome: 1. You need to embed the Python
> interpreter into your application for this to run (something has to
> run the Python code) 2. You need to create a .so library so KDE can
> load your applet.
>
> Without going into a lot of detail at the moment, the way I'd
> approach this (since I've already done something similar and know
> it works) is:
>
> a. Build a .so lib that embeds the Python interpreter (which is a
> static lib) - I have this done but the build process is very
> specific to my setup at the moment, so I can't distribute it easily.
>
> b. Create a .so library following the tutorial steps for loading
> your applet, but expand the 'init' function to load the Python
> interpreter .so as a plugin.
>
> I haven't looked at this very closely, but if the QString
> (configFile) that's passed in will support it, it should be
> possible to create a mechanism which will allow loading any Python
> applet via a single general .so lib, which I can put together and
> distribute with PyKDE2.
>
> There are pretty much two options: you can pursue this yourself, in
> which case contact me directly and I'll try and provide some code
> to get you started, or I'll get to this but it will take some time.
> I'm just getting ready to start doing my tax return, so the next 4
> days are shot, and I've also started on the PyKDE2 release for
> KDE3.0 final. I can try and put something together in 2 or 3 weeks,
> since I have most of the pieces already. Getting the
> automake/autoconfig stuff setup is the hardest part.
>
> Another possible approach is to write the applet .so as in the the
> tutorial, and have it exec Python with command line args that load
> your app, but I haven't tried this.
>
> Jim
>
>
>
> _______________________________________________
> PyKDE mailing list    PyKDE at mats.gmd.de
> http://mats.gmd.de/mailman/listinfo/pykde
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8tb9dPy62TRm8dvgRAg+UAJ4tAs7kBDPpDLu1Z94Ypn4xLJ1BxACdFZ6l
rJsxkWvwsEWo4teLET6ccP0=
=KbVr
-----END PGP SIGNATURE-----


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





More information about the PyQt mailing list