title: tkk passing parameters to callbacks
body: <p>I'm working on a tkinter ttk interface to automate/facilitate some relatively complex reporting.</p>
  
  <p>I have a function which performs a complex data scan across a directory. To execute the function you click a button widget in the toolbar:</p>
  
  <pre><code>fileMenu.add_command(label="Generate Report",command=ScanActiveProjects)
  </code></pre>
  
  <p>However I would like to reuse the code in this function by adding an additional parameter (simple=True/False) so that I can map a partial and a complete execution of the function to individual buttons. </p>
  
  <p>I thought that I could do this fairly simply like this:</p>
  
  <pre><code>fileMenu.add_command(label="Generate Management Report",command=ScanActiveProjects(simple=True)
  fileMenu.add_command(label="Generate Detailed Report",command=ScanActiveProjects(simple=False)
  </code></pre>
  
  <p>The result of this is that the button is automatically pressed on starting up the program - which I don't understand. So my questions are:</p>
  
  <p>1) Why is the button automatically pressed when adding the (simple=True)/(simple=False)parameters?</p>
  
  <p>2) How can I bind a callback function to a button but have the button provide a specific constructor parameter?</p>