Friday, August 13, 2010

Tricks for debugging a wxPython GUI

The other day, it took me quite some time to debug an issue that would have taken much less time had I used these two tools sooner:
  • The wxPython Widget Inspection Tool that shows how GUI elements are related, and,
  • The traceback module that makes it easy to see who is calling a method by putting this line in a method: import traceback; traceback.print_stack().
Hopefully writing this down makes it easier to remember these tools for the next occasion.

No comments: