How to parse a DOT file in Python

前端 未结 6 2287
别跟我提以往
别跟我提以往 2020-12-15 00:11

I have a transducer saved in the form of a DOT file. I can see a graphical representation of the graphs using gvedit, but what if I want to convert the DOT file to an execut

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-15 00:57

    Install the graphviz library. Then try the following:

    import graphviz
    graphviz.Source.from_file('graph4.dot')
    

提交回复
热议问题