class diagram viewer application for python3 source

纵然是瞬间 提交于 2019-12-19 18:15:55

问题


Is there any application which can generate from python3 source something like the below link (i don't care about the representation rather the perfect content)

http://www.codeproject.com/KB/IP/Searcharoo_3/ClassDiagram.png


回答1:


Yes there is: with pylint comes pyreverse that will generate class diagrams (not as pretty as the one in reference I am afraid, but clear and useful.) There is a dependency with graphviz.

From command line:

To analyse a full or part of a package

$ pyreverse -o png -p <project name>

To analyse one specific file:

$ pyreverse -o png -p myproject \path\to\myproject\myfile.py 

Example output: Class Diagram

Example output: Packages



来源:https://stackoverflow.com/questions/36432630/class-diagram-viewer-application-for-python3-source

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!