Simple question

Reply

Join Date: Sep 2006
Posts: 3
Reputation: prinitor is an unknown quantity at this point 
Solved Threads: 0
prinitor prinitor is offline Offline
Newbie Poster

Simple question

 
0
  #1
Sep 5th, 2006
Hi,:p

Im totally unfamiliar with python - and need a little help.
Im trying to add one command to superkaramba theme - it must be done in python file

I know how that command looks when given from command line (bash)
command is:

dcop knotify default notify eventname appname 'You got mail' '/home/server/superkaramba/popcheck/gotmail.wav' ' ' 3 0

I tried something like this ( It was just a guest - so don't laught: :rolleyes

playCommand = ["dcop knotify default notify eventname appname","<p>%s</p>" %('/home/server/superkaramba/popcheck/gotmail.wav'), ' ',3,0]
( it ofcourse was not right )

next step will be:
karamba.executeInteractive(widget, playCommand)

So I will very much aproxiate If someone can give me the right syntax to use
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 3
Reputation: prinitor is an unknown quantity at this point 
Solved Threads: 0
prinitor prinitor is offline Offline
Newbie Poster

Re: Simple question

 
0
  #2
Sep 6th, 2006
Might be it is easier if I include that function as it is described:

void notify(QString event,QString fromApp,QString text,QString sound,QString file,int present,int level)


Please, someone help me with this??
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 1,542
Reputation: Ene Uran has a spectacular aura about Ene Uran has a spectacular aura about 
Solved Threads: 172
Ene Uran's Avatar
Ene Uran Ene Uran is offline Offline
Posting Virtuoso

Re: Simple question

 
0
  #3
Sep 6th, 2006
Looks a lot more like C or C++ rather than Python!
drink her pretty
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 3
Reputation: prinitor is an unknown quantity at this point 
Solved Threads: 0
prinitor prinitor is offline Offline
Newbie Poster

Re: Simple question

 
0
  #4
Sep 6th, 2006
Originally Posted by Ene Uran View Post
Looks a lot more like C or C++ rather than Python!
Superkarampa uses two kind of files .theme and .py
Python files has command import karamba - so there are some karamba specifig funktions - like: karamba.executeInteractive(widget, command), which i want to use.
So it is possible to command directly for example KDE applications - use sound , browsers, email clients etc..

That command:
void notify(QString event,QString fromApp,QString text,QString sound,QString file,int present,int level)
is for dcop ( DCOP is KDE's interprocess communication (IPC)/remote procedure call (RPC) technology). It is nice because with that users default aplications are used.

I know that Kdialog can be used in python very much same way (used it myself)
forexample command line command:

kdialog --title "Input dialog" --inputbox "What name would you like to use" "default Name".

can be "translated to python"

default_name = "Default Name"
command = ["kdialog", "--title", "What name would you like to use", "--inputbox","<p>%s</p>" %("Account username:"),default_name]


and then ececuted by karamba:
commandpid = karamba.executeInteractive(widget, command)

That command which I like to use:
dcop knotify default notify eventname appname 'You got mail!' '/path/to/gotmail.wav' '' 3 0


Is too complicated ( for me ) to figure out because it is a compination of strings and int's ( and I have no experiment of python )
the beginning:

dcop knotify default - can be thought as application

next there is command:
notify
- with following information
eventname - string
appname - string
text - string
soud - string
present - int
level int

I have problem to figure out how to write it so that strings and int's are right


Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC