Python object inspector?
other than using a fully integrated IDE with a debugger for python (like Eclipse), is there a little tool to achieve this:
- when starting the program, I want to be able to hook it (similar to inserting a print statement) and call a window with an object inspector (tree view)
- after closing the window, the program should resume
No need to polish, not even be absolutely stable, it could be introspection example code for some widget library like wx. Regardless of the platform, it would be nice (not a PyObjC program, or something similar on Windows).
Any ideas?
Edit: Yes, I know about pdb, but I'm looking for a graphical tree of all current objects.
However, here's a good introduction to how to use pdb (in this case in Django): pdb + Django
source to share
Winpdb - it is independent of the platform graphical GPL-Python debugger with the object inspector.
It supports network remote debugging, multithreading, namespace modification, inline debugging, encrypted communication, and is 20x faster than pdb.
Some other features:
- GPL license. Winpdb is free software.
- Compatible with CPython 2.3 up to 2.6 and Python 3000
- Compatible with wxPython 2.6 to 2.8
- Platform independent and tested on Ubuntu Jaunty and Windows XP.
- User Interfaces: rpdb2 is console based, while winpdb requires wxPython 2.6 or newer.
Here is a screenshot that shows the local object tree in the upper left corner.
(source: winpdb.org )
source to share
Python Debugging Techniques is worth reading. and his Reddit comment is worth reading too. I actually found some good debugging tricks from Brian's comment. such as this comment and this comment .
Of course WingIDE is cool (for general Python coding and debugging Python code) and I use it every day. unlucky for WingIDE still can't embed IPython at this time.
source to share