can somebody give example python script that execute debian
package when button is clicked.
here is the example picture (i`ve created the glade files with Glade Interface Designer):
Thanks for any attention.A little help would be usefull, since this
program is to help those who tottally offline.

Recommended Answers

All 3 Replies

You would use a simple bash file for this and create an icon to the bash file. You could use python, but it would simply call bash to run the program.

You would use a simple bash file for this and create an icon to the bash file. You could use python, but it would simply call bash to run the program.

Thanks for the reply.
Actually i`am already create a simple python script to execute bash,
1.python (call shell script):

import subprocess
subprocess.call(["sh 1","args"],shell=True)

2.shell script (example here it execute nautilus):

#!/bin/sh
nautilus

but how to set signal to the glade file so when i press button "execute" it run python file that execute shell script.
Thanks for the help, i appreciate that since many user in my place
tottaly offline mode so when they install ubuntu they need to connect to internet to install the codec,meanwhile my program is simple..to create an automatic installer for them.

If you are talking about an icon on the desktop that a user can click on to execute the program, that depends on the desktop you are using. I would suggest asking this on the Ubuntu forum, telling them which desktop you are using, Gnome, KDE, XFCE, etc. and which version of Ubuntu Hardy, Ibex, etc. http://ubuntuforums.org/ Sorry, that's the best advice that I can give.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.