This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.
Read simple undirected graphs in graph6 format from path.
path : file or string
File or filename to write.
G : Graph or list of Graphs
If the file contains multiple lines then a list of graphs is returned
If the string is unable to be parsed in graph6 format
Graph6 specification: http://cs.anu.edu.au/~bdm/data/formats.txt for details.
>>> nx.write_graph6(nx.Graph([(0,1)]), 'test.g6') >>> G = nx.read_graph6('test.g6') >>> sorted(G.edges()) [(0, 1)]