| | |
Simple question
![]() |
•
•
Join Date: Sep 2006
Posts: 3
Reputation:
Solved Threads: 0
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
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
•
•
Join Date: Sep 2006
Posts: 3
Reputation:
Solved Threads: 0
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
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
![]() |
Similar Threads
- Quick Question: Is J# the same thing as Java? (Java)
- Simple array question (C++)
- This has to be a simple question to answer. (Visual Basic 4 / 5 / 6)
- Ribbon Question (Motherboards, CPUs and RAM)
- Simple question (Windows Servers and IIS)
- Simple Question (Linux Servers and Apache)
- A simple question about CMOS batteries (Motherboards, CPUs and RAM)
- XP Pro (re)activation question (Windows NT / 2000 / XP)
Other Threads in the Python Forum
- Previous Thread: Graphics and Game commands:
- Next Thread: making python code and java code work together
| Thread Tools | Search this Thread |
abrupt ansi anti apache approximation array assignment avogadro backend beginner binary book builtin calculator character code converter countpasswordentry curved customdialog dan08 dictionaries dictionary dynamic examples exe file float format function gnu graphics gui heads homework import inches input java launcher library line lines linux list lists loop mouse mysql mysqlquery number numbers numeric output parsing path phonebook plugin pointer port prime programming progressbar projects py2exe pygame pysimplewizard python random recursion redirect scrolledtext software statictext statistics string strings sum table terminal text textarea thread threading time tlapse trick tricks tuple tutorial twoup ubuntu unicode urllib urllib2 variable wordgame write wxpython xlib






