'Start the reactor.'

def run(self, installSignalHandlers=True):

    self._postQueue = Queue()
    if (not hasattr(self, 'wxapp')):
        log.msg('registerWxApp()    was    not    called    on    reactor,    registering    my    own    wxApp    instance.')
        self.registerWxApp(wxPySimpleApp())
    self.interleave(self._runInMainThread, installSignalHandlers=installSignalHandlers)
    if installSignalHandlers:
        self.callLater(0, self._installSignalHandlersAgain)
    self.addSystemEventTrigger('after', 'shutdown', self._stopWx)
    self.addSystemEventTrigger('after', 'shutdown', (lambda : self._postQueue.put(None)))
    if runtime.platform.isMacOSX():
        t = ProcessEventsTimer(self.wxapp)
        t.Start(2)
    self.wxapp.MainLoop()
    wxapp = self.wxapp
    del self.wxapp
    if (not self._stopping):
        self.stop()
        wxapp.ProcessPendingEvents()
        while 1:
            try:
                f = self._postQueue.get(timeout=0.01)
            except Empty:
                continue
            else:
                if (f is None):
                    break
                try:
                    f()
                except:
                    log.err()
