Reply to topic

execute KDE programs from a python program

alexxxm
Registered Member
Posts
7
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
18586
Karma
83
OS
When you run Dolphin, is this under a KDE session? Does Dolphin when launched normally through KDE behave properly?


System Settings and Device Actions KCM maintainer
Image
alexxxm
Registered Member
Posts
7
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
18586
Karma
83
OS
Those are more warnings than error messages - and assuming Dolphin does load - can be safely ignored. Does Dolphin load when launched normally?


System Settings and Device Actions KCM maintainer
Image

 
Reply to topic

Bookmarks



Who is online

Registered users: Alexa [Bot], asevens, Baidu [Spider], Bing [Bot], bjoernbalazs, Exabot [Bot], Google [Bot], GordieGii, Hans, isadora, koriun, lueck, Majestic-12 [Bot], mmistretta, MSNbot Media, nezumi, Yahoo [Bot]