Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

Pajek

Pajek

Read graphs in Pajek format.

This implementation handles directed and undirected graphs including those with self loops and parallel edges.

read_pajek(path[, encoding]) Read graph in Pajek format from path.
write_pajek(G, path[, encoding]) Write graph in Pajek format to path.
parse_pajek(lines) Parse Pajek format graph from string or iterable.
generate_pajek(G) Generate lines in Pajek graph format.