title: wxPython OnExit() not stoping thread?
body: <p>I'm trying to create a thread, and end it when the frame of a wxPython app is closed. Here's my code:</p>
  
  <pre><code>#! /usr/bin/env python
  
  import time, wx
  from threading import Thread
  
  class UpdateThread(Thread):
      def __init__(self):
          self.stopped = False
          Thread.__init__(self)
      def run(self):
          while not self.stopped:
              self.updateExchange()
              time.sleep(1)
      def updateExchange(self):
          print("Updated...")
  
  class tradeWindow(wx.Frame):
      def __init__(self, parent, id):
          wx.Frame.__init__(self, parent, id, "Exchange", size = (500, 190))
          panel = wx.Panel(self)
      def OnExit(self):
          tickThread.stopped # I've also tried: tickThread.stopped = True
  
  tickThread = UpdateThread()
  tickThread.start()
  if __name__ == "__main__":
      app = wx.PySimpleApp()
      frame = tradeWindow(parent = None, id = -1)
      frame.Show()
      app.MainLoop()
  </code></pre>
  
  <p>But when I close the frame, it keeps printing.</p>