This forum has been archived. All content is frozen. Please use KDE Discuss instead.

execute KDE programs from a python program

Tags: None
(comma "," separated)
alexxxm
Registered Member
Posts
9
Karma
0
Hi everybody,

I have a python/Tkinter program that should launch a KDE program (dolphin) under certain conditions. I'm not sure if the command line should be just 'dolphin &' or if I have to prepend something (I heard about dcop, dont know if it is relevant... don't flame me if it is!)
Anyway it roughly works, only with huge lags for any actions it performs, and with many warnings e.g.

QObject: Cannot create children for a parent that is in a different thread.
(Parent is Soprano::Client::LocalSocketClient(0x1dcb8e8), parent's thread is QThread(0x196da00), current thread is KLoadFileMetaDataThread(0x1dd7ae0)

The relevant part of the code is simply this:

filebrowser='/usr/bin/dolphin'
text.insert(INSERT, cd, hyperlink.add(lambda arg=cd: os.system(filebrowser+' \"'+arg+'\" & 2> /dev/null')))

cd is the directory name, and I'm using the class HyperlinkManager from http://effbot.org/zone/tkinter-text-hyperlink.htm


do you have any hint?


thanks!


alessandro
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
When you run Dolphin, is this under a KDE session? Does Dolphin when launched normally through KDE behave properly?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
alexxxm
Registered Member
Posts
9
Karma
0
yes, you're right: when I launch Dolphin from the prompt I get those same errors...
and yes, I'm running it under KDE (Fedora fc13)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Those are more warnings than error messages - and assuming Dolphin does load - can be safely ignored. Does Dolphin load when launched normally?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot]