title: How do I store a text entry as a variable in Tkinter?
body: <p>So.....</p>
  
  <p>I want my program to launch a Tkinter GUI Window, which gives the user text boxes to enter values as strings or as integers.....
  The code below does that</p>
  
  <pre><code>    from Tkinter import *
  
  
      def add_text():
         label1 = Label(root, text="You have entered the information to the average speed checker")
         label1.pack()
  
      root = Tk()
      root.title("Average Speed Checker")
      root.geometry("450x165")
  
      veh_reg_label = Label(root, text="Vehicle Registration:")
      veh_reg_label.pack()
  
      veh_reg_text_box = Entry(root, bd=1)
      veh_reg_text_box.pack()
  
      distance_label = Label(root, text="Distance")
      distance_label.pack()
  
      distance_text_box = Entry(root, bd=1)
      distance_text_box.pack()
  
      time_label = Label(root, text="Time")
      time_label.pack()
  
      time_text_box = Entry(root, bd=1)
      time_text_box.pack()
  
      enter_button = Button(root, text="Enter", command=add_text)
      enter_button.pack()
  
      root.mainloop()
  </code></pre>
  
  <p>However.....
  There is one problem: I can't seem to find a (simple  ;) ) way of storing this text entry as a variable, which means that I am not able to continue with my program by making it calculate if a car is over a certain speed when travelling a distance of road etc etc.....</p>