How to use pyreverse on Windows

点点圈 提交于 2020-01-01 03:18:26

问题


I would like to create diagram class using pyreverse. I download it, and when I use this command:

pyreverse.bat -c PyreverseCommand -a1 -s1 -f ALL -o png  test.py

I get an error "The name 'dot' is not recognized....". What is "dot", how can I create diagram class? Thanks for answers.


回答1:


dot is part of Graphviz (http://www.graphviz.org/About.php). You need to install Graphviz and then modify your PATH so Windows (what I assume you are using) can find it. "the command pyreverse generates the diagrams in all formats that graphviz/dot knows." (http://www.logilab.org/blogentry/6883.)

Once installed dot executable can be found in C:\Program Files (x86)\Graphviz2.36\bin\

To make sure it was installed properly run the comand

C:\Program Files (x86)\Graphviz2.36\bin>dot -Txxx

And you should see something like: "Format: "xxx" not recognized. Use one of: bmp canon cmap cmapx cmapx_np dot emf emfplus eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg metafile pdf pic plain plain-ext png pov ps ps2 svg svgz tif tiff tk vml vmlz vrml wbmp xdot xdot1.2 xdot1.4"*

You can download Graphviz here: http://www.graphviz.org/Download_windows.php



来源:https://stackoverflow.com/questions/21420715/how-to-use-pyreverse-on-windows

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