I have written a function, which needs two variables (start, end). Now I'm trying to build a GUI around this function. I want to set two variables with an entry widget and a button which starts the function.
start = StringVar()
end = StringVar()
Label(root, text="Begin").grid(row=0)
Label(root, text="End").grid(row=1)
e1 = Entry(root, textvariable=start)
e2 = Entry(root, textvariable=end)
e1.grid(row=0, column=1)
e2.grid(row=1, column=1)
b1 = Button(root, text="Test_Button", command=getshift())
b1.grid(row=2, column=1)
When I run the code, the error is always that start and end are not defined.