Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Python Simple GUI to run another script
from Tkinter import *
root = Tk()
S = Label(root, text ="grupo:")
S.pack()
T = Text(root, height=2, width=30)
def callback():
global T
print "click!"
import os
os.system("python simple.py -g " + T.get(1.0, END))
T.pack()
T.insert(END, "51")
B = Button(root, height=2, width=30, text ="gerar", command=callback)
B.pack();
mainloop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.