Commits

anatoly techtonik committed 895d7b1

simplify entrypoint code

  • Participants
  • Parent commits 2ce14ee

Comments (0)

Files changed (1)

 del wxdebuglib
 
 import wx
+import wxdebuglib.gui.mainframe
 
 class wxApp(wx.App):
     def OnInit(self):
         return True
 
 
-class App(object):
-    def __init__(self):
-        self.wxApp = wxApp(redirect=False)
-        self.init()
-        self.mainframe.Show()
-        self.wxApp.MainLoop()
-
-    def init(self):
-        import wxdebuglib.gui.mainframe
-        self.mainframe = wxdebuglib.gui.mainframe.MainFrame()
-    
-    def quit(self):
-        self.wxApp.ProcessIdle()
-        self.wxApp.Exit()
-
 def start():
-    App()
+    app = wxApp(redirect=False)
+    mainframe = wxdebuglib.gui.mainframe.MainFrame()
+    mainframe.Show()
+    app.MainLoop()
 
 if __name__ == '__main__':
     start()