title: tkinter get values from dynamic checkboxes
body: <p>I am trying to create a number of dynamic checkboxes from data in a XML file.</p>
  
  <p>I have no problems creating the button themselves, but I cant get the values generated by them.</p>
  
  <p>Here is what I got so far...</p>
  
  <pre><code>#!/usr/bin/python3
  from tkinter import *
  from tkinter import ttk
  import xml.etree.ElementTree as ET
  
  root = Tk()
  
  def Readstatus():
      print(var.get())
  
  listTree = ET.parse('list.xml')
  listRoot = listTree.getroot()
  
  var = dict()
  count=1
  for child in listRoot:
      var[child]=IntVar()
      chk = Checkbutton(root, text='Text'+str(count), variable=var[child], command=Readstatus)
      count += 1
      chk.pack()
  
  root.mainloop()
  </code></pre>
  
  <p>Any help would be greatly apreciated!</p>
  
  <p>Gilles</p>