load a graph from a dot file
Sage allows me to get the representation of a Graph, G, in the dot language by using the method
I can even have this string written directly to a file by using:
Is there a way of reloading G from such a file? I tried doing
G = Graph('my_graph_file.dot')
G = Graph(open('my_graph_file.dot'))
G = Graph(open('my_graph_file.dot').read())
Where the contents of 'my_graph_file.dot' are:
graph MyGraph{
foo -- {bar}
bar -- {foo; bas}
bas -- {bar}
}
But none of these worked.