One of the UML tools for python includes the option of displaying the generated UML class diagrams (obtained by doing reverse engineering from the python code) in ASCII so that they can be easily integrated in the code itself as documentation. The Java Ascii Versatile Editor can be used to “beautify” the created UML ascii diagrams if needed.
Here is one example of what you can get:
More info in the tool page . And of course, if you want to know other textual-based approaches for UML check this full list of textual UML tools
ICREA Research Professor at Internet Interdisciplinary Institute (UOC). Leader of the SOM Research Lab focusing on the broad area of systems and software engineering. Home page.