title: Running IntVar.get() from tkinter button not returning values
body: <p>I'm trying to return values of checkboxes that are selected in a tkinter GUI. The issue is that it seems to be running the Button(Command = "") before the button is clicked on, and therefore not returning that any boxes have been checked. </p>
  
  <p>Here's a very stripped down version of the code with only 1 variable.</p>
  
  <pre><code>window = TK()
  
  var1 = IntVar()
  Checkbutton(window, text = "All", variable = var1).grid(row=1, column = 0, sticky = W)
  
  runbtn = Button(window, text = "Run Report", command = print(var1.get()))
  runbtn.grid(row=17, column=0, pady="5")
  
  mainloop()
  </code></pre>
  
  <p>I've just set the command to print the variable state for this instance, so I can see if it's registering the checkbox input correctly. However, it prints out a "0" as soon as the program is run, without waiting for the button to be clicked. When I set the button to run another file, the button behaves correctly and only runs that file when clicked. </p>
  
  <p>I'm unsure what I'm doing wrong here in order to be able to return the value of the checkboxes, after the user has been able to select them and click the runbtn.</p>