how to flatten class trees?

Shae Erisson shapr at uab.edu
Sat Aug 5 12:57:52 EDT 2000


Harry George wrote:
> 
> I have a collection of classes with lots of inheritance (so far only
> single inheritance; maybe multiple in the future).  It is hard to
> remember where a given data member or method is defined.  I want to
> print out, for each class, all the data members and where they were
> defined.  E.g.:

<snip>

> Is there a service/tool/script/module already available to do this?
> If not, would you recommend working from __dict__ or from "parser" to
> do it?

pyclbr.py (python class browser) from IDLE might work for you. You
should get the latest non-CVS version of IDLE as the 2.0 beta version in
the CVS tree is broken.
There's also a structure browser in the python-mode for (x)emacs, but
I'm pretty sure it's written in elisp.
-- 
Shae Matijs Erisson - http://www.webwitches.com/~shae/
VirtualPairProgramming Wanted - Linux/Emacs/Python/Speak Freely
.fi: rakastan ohjelmointia - python kengittää aasia



More information about the Python-list mailing list