>>> g = pydot.graph_from_dot_data(open('test.dot', 'r').read())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/pydot.py", line 220, in graph_from_dot_data
return dot_parser.parse_dot_data(data)