title: Python: How do i store a text input from the user on Tkinter?
body: <p>This is what i tried so far to get the user's input:</p>
  
  <pre><code>master = Tk()
  master.title('Title')
  
  v = StringVar()
  
  L1 = Label(master, text = 'Name')
  L1.pack(side = LEFT)
  
  E1 = Entry(master, textvariable = v, bd = 5)
  E1.pack(side = RIGHT)
  
  def userinput():
      a = raw_input(v.get())
      print a
  
  
  b = Button(master, text = 'Submit', command = userinput)
  b.pack(side = BOTTOM)
  
  
  master.mainloop()
  </code></pre>
  
  <p>The real question is, how can i store the v.get() raw_input into a variable outside the function? Thx!</p>