title: How to proper inherit values into thread class with wxPython
body: <p>I have a wxPython gui that is controlling some hardware.
  I need a button to disable while a function is running. The function also receives an argument value</p>
  
  <p>let's say that I have this function that is bound to a button press:</p>
  
  <pre><code>    def button_press(self, event):
  
         in_val = self.num_in.GetValue() #grabs a value from a NumCtrl
         TheThread(in_val) #initiates the thread with argument
         btn = event.GetEventObject() 
         btn.Disable() #disables button
  </code></pre>
  
  <p>this function goes to the following thread class:</p>
  
  <pre><code>    class TheThread(Thread):
  def __init__(self, in_val):
  
      """Init Worker Thread Class."""
      Thread.__init__(self)
  
      self.run(in_val)
  
  def run(self, in_val):
      print val
      time.sleep(5)
  
      wx.CallAfter(Publisher.sendMessage, "ctrl")
      """
      threadsafe method to call a pub.subscribe that runs a 
      function to re-enable button
      """
  </code></pre>
  
  <p>This works improperly, as the gui freezes during the function run period, and the button does not properly disable.</p>
  
  <p>How do I properly inherit this argument to allow this to run properly?
  Maybe something involving self.start() method?</p>