Converting dot to png in python

前端 未结 7 2013
轻奢々
轻奢々 2020-12-02 22:58

I have a dot file generated from my code and want to render it in my output. For this i have seen on the net that the command is something like this on cmd

7条回答
  •  清歌不尽
    2020-12-02 23:31

    You can try:

    import os
    os.environ["PATH"] += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38/bin/'
    os.system('dot -Tpng random.dot -o random.png')
    

提交回复
热议问题