networkx.read_pajek
networkx.parse_pajek
Enter search terms or a module, class or function name.
Write in Pajek format to path.
G : graph
A networkx graph
path : file or string
File or filename to write. Filenames ending in .gz or .bz2 will be compressed.
Examples
>>> G=nx.path_graph(4) >>> nx.write_pajek(G, "test.net")