write_gpickle¶
-
write_gpickle
(G, path, protocol=2)[source]¶ Write graph in Python pickle format.
Pickles are a serialized byte stream of a Python object [1]. This format will preserve Python objects used as nodes or edges.
Parameters: Examples
>>> G = nx.path_graph(4) >>> nx.write_gpickle(G, "test.gpickle")
References
[1] http://docs.python.org/library/pickle.html