title: global variable error while using tkinter
body: <p>i am using tkinter in python to build a GUI.But i keep getting global variable error</p>
  
  <pre><code>from tkinter import *
  window=Tk()
  global e1_value
  def ext_data():
     global e1_value
     print(e1_value.get())
  b1 = Button(window,text="Execute",comamand=ext_data())
  b1.grid(row=0,column=0)
  e1_value=StringVar()
  e1 = Entry(window,textvariable=e1_value)
  e1.grid(row=0,column=1)
  t1=Text(window,height=0,width=30)
  t1.grid(row=0,column=2)
  window.mainloop()
  </code></pre>
  
  <p>can anyone help me out 
  Thanks</p>