title: Tkinter Checkbutton doesn't change my variable
body: <p>I'm trying to use a Checkbutton with a function, my_var never changes but it always call my function.</p>
  
  <p>here the code:</p>
  
  <pre><code>my_var = False
  def controllo_carta():
      global my_var
      print str(my_var)
  
  [...]
  
  c = tk.Checkbutton(toolbar, text="press me",onvalue=True,offvalue=False,variable=my_var,command=controllo_carta)
  c.select()
  c.pack(side=tk.LEFT,padx=2,pady=2)
  
  print 'my var:' + str(my_var)
  
  [...]
  </code></pre>
  
  <p>where is my mistake?</p>
  
  <p>thanks!</p>