Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What options are there for visualising class relationships in a Python program

I am maintaining a Python program, and am struggling to understand the relationships between the various classes. I think it would be helpful to see a diagram of how the classes interact.

What options are there available that might allow me to do this?

like image 601
David Sykes Avatar asked Jun 04 '10 07:06

David Sykes


2 Answers

Just my 2 cents.

Case tools like Enterprise Architect can generate class diagrams from python code, however for the purpose of understanding I prefer to coarsely model the classes and relationships by hand.

I too use UML when I want to understand new code, to get a coarse overview of the collaborations between classes, and to get a view of inheritance heirachies.

Most IDEs have means to explore the code, but I find small cohesive UML diagrams easier to digest and memorize.

I also find domain models easier to understand when on a class diagram.

like image 93
chickeninabiscuit Avatar answered Oct 15 '22 10:10

chickeninabiscuit


If you are seeking IDEs that have that feature, then:

  1. Komodo
  2. Pydev for eclipse
like image 45
Amirshk Avatar answered Oct 15 '22 08:10

Amirshk