title: Tkinter button - import and run module
body: <p>I would like to run a python program (ex: program.py) when clicking a button in a tkinter window in a separate program.  However, when I import the class from the module, it runs.  How do I get the button to run the module when clicked? Any assistance is greatly appreciated.</p>
  
  <p>Other Module to Run (program.py):</p>
  
  <pre><code>class sampleProgram():
      def DoSomething():
          print('Do Something')
  </code></pre>
  
  <p>Module with tkinter button:</p>
  
  <pre><code>from program import DoSomething
  
  class Window(Frame)
      def __init__(self,master = None):
          &lt;Stuff In Window&gt;
  
      def addWidgets(self):
          &lt;Widgets To Add&gt;
  
      def init_window(self):
          self.pack(fill=BOTH, expand=1)
          RunButton = Button(self, text="Run", command=&lt;**What Goes Here To Run sampleProgram?**&gt;)
  </code></pre>