Write the graph G in GML format to the file or file handle path.
Parameters: | path : filename or filehandle
|
---|
Notes
GML specifications indicate that the file should only use 7bit ASCII text encoding.iso8859-1 (latin-1).
For nested attributes for graphs, nodes, and edges you should use dicts for the value of the attribute.
Examples
>>> G=nx.path_graph(4)
>>> nx.write_gml(G,"test.gml")
Filenames ending in .gz or .bz2 will be compressed.
>>> nx.write_gml(G,"test.gml.gz")