title: Tkinter. StringVar(). How I can update the Label in my code.
body: <p>I have a problem with updating the Label widget (lab1_datum_in).
  I would like to change the Label text every time I change radiobuttons.
  Really do not know what is wrong.
  Could anyone help?
  My interpreter is Python 3.4</p>
  
  <p>Thanks in advance!</p>
  
  <pre><code>import tkinter
  
  root = tkinter.Tk()
  
  # Creating radiobuttons
  v = tkinter.IntVar()
  v.set(1)  # initializing the choice
  
  transformation_types = [
      ("WGS84  --&gt;  ED50(North of 62N)",1),
      ("WGS84  --&gt;  ED50(South of 62N)",2),
      ("ED50(North of 62N)  --&gt;  WGS84",3),
      ("ED50(South of 62N)  --&gt;  WGS84",4),
      ]
  
  datum_in_text = tkinter.StringVar()
  datum_in_text.set('WGS84')
  
  
  def ChangeDatumText():
      if v.get() == 1:
          global datum_in_text
          datum_in_text.set('WGS84')
  
      elif v.get() == 2:
          global datum_in_text
          datum_in_text.set('WGS84')
  
      elif v.get() == 3:
          global datum_in_text
          datum_in_text.set('ED50(North of 62N')
  
      elif v.get() == 4:
          global datum_in_text
          datum_in_text.set('ED50(North of 62N')
  
  
  for txt, val in transformation_types:
      tkinter.Radiobutton(root,
                          text=txt,
                          padx=20,
                          variable=v,
                          command=ChangeDatumText,
                          value=val).grid()
  
  lab1_datum_in = tkinter.Label(root, text=datum_in_text.get()).grid(row=9, column=1)
  
  
  root.mainloop()
  </code></pre>