Skip to content

Instantly share code, notes, and snippets.

@beattidp
Created February 13, 2026 17:55
Show Gist options
  • Select an option

  • Save beattidp/d1f1b152eb424345ced7625c8e580132 to your computer and use it in GitHub Desktop.

Select an option

Save beattidp/d1f1b152eb424345ced7625c8e580132 to your computer and use it in GitHub Desktop.
wxPython PyCrust simplest way I found to optionally add this in when needed
PYCRUST = True
if __name__ == "__main__":
app = wx.App()
wx.Log.SetActiveTarget(wx.LogStderr())
# Top-level reference to my Frame
fr = myFrame()
fr.Show()
# inspect the running wxPython app in
# separate frame when PYCRUST is True
if PYCRUST==True:
from wx.py.crust import CrustFrame
crust = CrustFrame(None)
crust.Show()
app.MainLoop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment