Skip to content

Instantly share code, notes, and snippets.

@BernardoGO
Created November 29, 2015 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BernardoGO/0ef1b00631f18a40a974 to your computer and use it in GitHub Desktop.
Save BernardoGO/0ef1b00631f18a40a974 to your computer and use it in GitHub Desktop.
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