Find out where a class is used throughout a program.

dieter dieter at handshake.de
Wed Sep 4 16:08:10 EDT 2013


Azureaus <lo0446 at my.bristol.ac.uk> writes:
> ...
> is there a way of finding out / visualising where a particular class is called/used throughout a program?

I do not know a simple and reliable way.

When I face such a situation, I use standard operating system
utilities (e.g. "grep -r" under *nix) to search for occurrences of
the class name in the source tree. This often gives good
results when the class name has been well chosen.

Recently (within the last 2 months), I have seen the announcement
(on "...python.announce") of a tracing tool (I forgot the package's
name; maybe, it has been "CodeInspector"). When I have understood
the announcement correctly, then it traces concrete runs
and allows you to explore where objects (e.g. classes) have
been used *in these runs*.




More information about the Python-list mailing list