How to parse a DOT file in Python

前端 未结 6 2295
别跟我提以往
别跟我提以往 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-15 00:34

    You could start by loading the file using https://code.google.com/p/pydot/ . From there it should be relatively simply to write the code to traverse the in-memory graph according to an input string.

提交回复
热议问题