This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.
Read graph in YAML format from path.
YAML is a data serialization format designed for human readability and interaction with scripting languages [R330].
path : file or string
File or filename to read. Filenames ending in .gz or .bz2 will be uncompressed.
G : NetworkX graph
[R330] (1, 2) http://www.yaml.org
>>> G=nx.path_graph(4) >>> nx.write_yaml(G,'test.yaml') >>> G=nx.read_yaml('test.yaml')