Ejemplo n.º 1
0
 def tearDownClass(cls):
     if not MANUAL:
         cls.app.test_frame.Destroy()
         wx.CallAfter(cls.app.Exit)
     elif INSPECT:
         from wx.lib import inspection
         inspection.InspectionTool().Show()
     cls.app.MainLoop()
Ejemplo n.º 2
0
 def tearDownClass(cls):
     if not MANUAL:
         cls.app.test_frame.Destroy()
         # see fixme in runall.py. Is this needed in Phoenix?
         # wx.CallAfter(cls.app.Exit)
     elif INSPECT:
         from wx.lib import inspection
         inspection.InspectionTool().Show()
     cls.app.MainLoop()
Ejemplo n.º 3
0
 def inspect(event):
     from wx.lib import inspection
     inspection.InspectionTool().Show()
Ejemplo n.º 4
0
        notebook.AddPage(explorer, 'Explorer')
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(notebook, 1, wx.ALL|wx.EXPAND, 5)
        panel.SetSizer(sizer)

    # Empties temp and destroys the main frame which quits the wxPython application
    def OnExitApp(self, event):
        tmp_cats =[f for f in os.listdir(
                tmp_img_pth) if os.path.isfile(os.path.join(tmp_img_pth, f))]
        for f in tmp_cats:
            os.remove(os.path.join(tmp_img_pth, f))
        self.Destroy()

    def OnCloseFrame(self, event):
        dialog = wx.MessageDialog(self, message = "Are you sure you want to quit?", caption = "Caption", style = wx.YES_NO, pos = wx.DefaultPosition)
        response = dialog.ShowModal()

        if (response == wx.ID_YES):
            self.OnExitApp(event)
        else:
            event.StopPropagation()

if __name__ == "__main__":
    app = wx.App()
    frame = Main()
    frame.Show()
    import wx.lib.inspection as wxli
    wxli.InspectionTool().Show()
    app.MainLoop()
    #app.MainLoop()