[PyKDE] Mixing PyGTK and PyKDE

Jim Bublitz jbublitz at nwinternet.com
Wed Aug 14 22:00:01 BST 2002


On 14-Aug-02 Martin Preishuber wrote:
> I have an existing PyGTK application (ECLiPt SSH Shell, a small
> applet for starting SSH connections) and I want to create a
> small PyKDE applet in the system tray which basically just opens
> the main window of the PyGTK window. I managed to create a small
> PyKDE application, but somehow it's not possible to mix PyGTK
> and PyKDE code, because PyGTK needs the mainloop() call to
> handle all events and this mainloop() blocks execution of PyKDE
> code ... is there any possibility to work around this problem ?

You could look at QObject/QApplication eventFilter/processOneEvent
and see if there's any way to use those to accomplish what you
want (KApplication inherits those). I think what I'd consider
instead is having the PyKDE program fork the PyGTK program and use
some sort of IPC (like sockets) to pass events between the two.

PyKDE has a pretty large memory footprint for writing applets; I
expect PyGTK is pretty big too.

Jim




More information about the PyQt mailing list