Closed lundstrj closed 5 years ago
Not a big fan?
Actually, I am. I was looking for an example of how to write a graph to a file when I arrived in your pull request. I did comment on something, but I think I deleted that a little later when I noticed that 'write_graph' is already part of the graph class.
A fair point indeed! I changed the code to use graph_write instead (after checking that the code in ElementTree outputs a string).
Fair warning, I'm on a borrowed laptop without development tools so I just edited the code with the in browser editor. Haven't actually executed it.
(If you like this better, I'll update the readme pull request to match.)
I have edited the README to add an example of writing to a file.
Added a write_to_file function to enable easy file output of the demo graphs in demo.py