Thread: Help with Pygtk button
i'm build simple pygtk window , still learning go. want have button execute shell script when clicked. please give me example of how , please include comments in example explain it.
in advanced any 1 can give.
you can find lots , lots of tutorials online on pygtk , how create window , widgets such buttons, more sufficient.
executing script can use subprocess.popen.
i'm taking thin air.. reserve myself errors... subprocess has lots of functionality, 1 can play around lot module.code:// include subprocess module import subprocess function exec_script(): // need pass command array cmd = ['sh', 'path/to/script.sh'] // run script process = subprocess.popen(cmd)
option creating gtk-applications use start of application. play around applications interface in graphical enviroment using glade. in case need install it.
then start new project with:code:sudo apt-get install quickly
beforehand, might wanna cd (change directory) in terminal @ create application, typing command @ once create folder in homedir containing project. if (just example) projectfolder in homefolder, create new folder with:code:quickly create ubuntu-application <name-of-project>
then run create... command above create project in directory ~/projectscode:mkdir projects cd projects
find more documentation on quickly here
best of luck!
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Help with Pygtk button
Ubuntu
Comments
Post a Comment