Created
November 29, 2015 20:15
-
-
Save BernardoGO/0ef1b00631f18a40a974 to your computer and use it in GitHub Desktop.
Python Simple GUI to run another script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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