Is there a function that can print a python class' heirarchy in tree form, like git log --graph
does for git commits?
Example of what I'd like to do:
class A(object): pass
class B(A): pass
class C(B): pass
class D(A): pass
class E(C, D): pass
printtree(E)
Example of what the output might look like (but variations are fine). Bonus points if the mro can also be read off directly from the graph, as I've done here from top to bottom, but if not that's fine as well.
E
|\
C |
| D
B |
|/
A
|
object