This should be very very simple but how do I get the following basic code to output the entered variable so that I can then pass it on to the rest of the program.
from Tkinter import *
root = Tk()
InputStrings = StringVar()
Entry(root, textvariable=InputStrings).pack()
def GetString():
print InputStrings.get()
Button(root, text='Print', command=OutputText).pack()
root.mainloop()
def OutputText():
OutString=InputStrings.get()
print OutString
root.withdraw()
root.quit()
GetString()
print OutString
When I add OutString to the def it gives other errors. Do I really need the OutputText module -can't it just be returned from the GetString module?
OutputText()andGetString()aren't modules, they're functions. I think it'd be good to go through a short tutorial on Python. Here's one that I like: How to Think Like a Computer Scientist.