Hello, I'm pretty new to Python, and I've been making simple projects to practice in. The issue I've run into though is I'm creating a GUI (Using Tkinter with Python 2.6) to take a text input and bring out "Name". What I want to do though is keep that "Name" variable through out, as if I assigned a variable to a raw_input. I just can't figure out what to use to do the same thing. Can anyone point me in the right direction?
Below is what I have so far, the creation of the GUI and an initial print statement. Thanks in advance.
#!usr/bin/python
from Tkinter import *
def Naming():
name = text.get()
print name
root.destroy()
root = Tk()
root.geometry=("100x100+100+50")
text = Entry(root, bg="white")
text.pack()
text.focus_force()
nameButton = Button(root, text="Accept", command=Naming)
nameButton.pack(side=BOTTOM, anchor=S)
root.mainloop()