In my program I have a tkinter Entry widget named keyE. The user enters a "product" key here. Later, I try to retrieve the users input using the .get() feature, and save it to a variable, key_input, like this: key_input=keyE.get(), however, I never can seem to get a value. PyScripter keeps showing that no value is ever assigned to key_input. Doing some research, people seem to add (END, "1.0" to the parameters for get, but in doing to I get an error saying there are too many parameters, even if i add just a single parameter. Any thoughts or ideas? The entire class its part of is shown below. Not sure if its all relevant, but perhaps somewhat useful. Lines I thought were most relevant are commented.
class PageOne(tk.Frame):
def __init__(self, parent, controller):
tk.Frame.__init__(self, parent)
actTotalFrame =tk.Frame(self)
topBarAct = Frame(actTotalFrame)
softLogo = Label(topBarAct,image=softLogoRaw)
versionNum = Label(topBarAct,image=versionNumRaw)
ActivateT=Text(actTotalFrame, width=45,height=5)
keyE= tk.Entry(actTotalFrame) #entry box here
submitButton=Button(actTotalFrame, text = "Submit",command= lambda: controller.show_frame(PageThree), width = 40)
returnButton=Button(actTotalFrame, text = "Return",command= lambda: controller.show_frame(StartPage), width = 40)
global statusB
statusB =Label(actTotalFrame, text="Waiting for user input", bd=1, relief=SUNKEN, anchor=W)
softLogo.pack(side =LEFT)
versionNum.pack(side=RIGHT)
ActivateT.insert(END, "In order to use all the features included\nin this program, especially all the ones\nthat arent useful anyways, you need to have\nspent the money to buy the 'Paid version'. If\nyou did that, you can enter the key below: ")
topBarAct.pack(side=TOP)
ActivateT.pack(side=TOP,padx=5,pady=5)
keyE.pack()
global key_input
key_input=keyE.get()#trying to read the value here, to another variable named key_input, but this always remains null
submitButton.pack()
returnButton.pack()
statusB.pack (side=BOTTOM, fill=X)
actTotalFrame.pack()