From b88756456f937c3dee720e79c393eddbb1dd82dd Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 20 Jun 2013 01:07:29 +0000 Subject: [PATCH] Enable the use of the WIT in the simple sample. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/simple/simple.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/samples/simple/simple.py b/samples/simple/simple.py index d0bdeace..11e096cf 100644 --- a/samples/simple/simple.py +++ b/samples/simple/simple.py @@ -6,6 +6,13 @@ import wx +USE_WIT = False + +AppBaseClass = wx.App +if USE_WIT: + from wx.lib.mixins.inspection import InspectableApp + AppBaseClass = InspectableApp + class MyFrame(wx.Frame): """ @@ -78,12 +85,15 @@ class MyFrame(wx.Frame): print("Having fun yet?") -class MyApp(wx.App): +class MyApp(AppBaseClass): def OnInit(self): frame = MyFrame(None, "Simple wxPython App") self.SetTopWindow(frame) print("Print statements go to this stdout window by default.") + if USE_WIT: + print("Press Ctrl-Alt-I (Cmd-Opt-I on Mac) to launch the WIT.") + self.InitInspection() frame.Show(True) return True