Set variable with entry widget before calling a function : <p>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. </p>

<pre><code>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)
</code></pre>

<p>When I run the code, the error is always that start and end are not defined.</p>
