This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.
Read graph object in Python pickle format.
Pickles are a serialized byte stream of a Python object [R324]. This format will preserve Python objects used as nodes or edges.
path : file or string
File or filename to write. Filenames ending in .gz or .bz2 will be uncompressed.
G : graph
A NetworkX graph
[R324] (1, 2) http://docs.python.org/library/pickle.html
>>> G=nx.path_graph(4) >>> nx.write_gpickle(G,"test.gpickle") >>> G=nx.read_gpickle("test.gpickle")