Read graph in GML format from path.
Parameters: | path : filename or filehandle
relabel : bool, optional
|
---|---|
Returns: | G : MultiGraph or MultiDiGraph |
Raises: | ImportError :
|
Notes
Requires pyparsing: http://pyparsing.wikispaces.com/ The GML specification says that files should be ASCII encoded, with any extended ASCII characters (iso8859-1) appearing as HTML character entities.
References
GML specification: http://www.infosun.fim.uni-passau.de/Graphlet/GML/gml-tr.html
Examples
>>> G=nx.path_graph(4)
>>> nx.write_gml(G,'test.gml')
>>> H=nx.read_gml('test.gml')