|
Versions Of This Snippet::
Download a raw-text version of this code by clicking on "Download Version"
Latest Snippet Version: :1.0
#!/usr/bin/python
# peter bauer
# peba@inode.at
import subprocess
from Tkinter import *
import os
def run(param):
param = param + "&"
retcode = os.system (param)
root = Tk()
root.title('Buttons')
root.resizable(width=FALSE, height=FALSE)
commands=["xterm","xclock","gedit"]
index=0
while index <= len(commands)-1:
Button(root, text=commands[index], command=lambda num=index:run(commands[num])).pack(side="left")
index+=1
root.mainloop()
Submit a new versionYou can submit a new version of this snippet if you have modified it and you feel it is appropriate to share with others..
|
||||||||||||||||||||||||||
