title: How to assign value for a variable from user input in python Tkinter?
body: <pre><code>from tkinter import *
  from tkinter.messagebox import *
  
  def userinput():
      v=StringVar()
      a=input(v.get)
      return(a)
  
  sub = Tk()
  
  Label(sub, text = "Your name :").grid(row=0)
  
  num1 = Entry(sub)
  num1.grid(row=0,column=1)
  
  name2=userinput()
  
  Button(sub, text="Proceed", command=sub.destroy).grid(row=1,column=3)
  
  
  mainloop()
  print name2
  </code></pre>
  
  <p>When I run this code i get the following in the shell:</p>
  
  <p>(bound method StringVar.get of (tkinter.StringVar object at 0x02E48D30))</p>