I made a GUI with Tkinter to allow someone to enter one string and two integers which would then run a code when a button was pressed to extract data from one file to another but I keep getting an issue and I'm not sure how to get around it.
def copy(Orn, Orc, Stage):
for a in range(1, 10):
for b in range(1,Stage):
import Tkinter as T
top= T.Tk()
L1=T.Label(text="Order Number").grid(row=0, column=0)
E1=T.Entry().grid(row=0,column=1)
L2=T.Label(text="Number of Compounds").grid(row=1,column=0)
E2=T.Entry().grid(row=1,column=1)
L3=T.Label(text="Number of Stages").grid(row=2,column=0)
E3=T.Entry().grid(row=2, column=1)
B1=T.Button(text="Extract", command=copy(E1, E2, E3)).grid(row=3,column=0)
top.mainloop()
I get the error range() integer end argument expected, got NoneType.
How do I get the entry value to be an integer? I also tried:
e3=E3.get()
as was shown in someone's similar question but then I get the error: NoneType object has no attribute get.
What am I missing?