Module gpickle
source code
Read and write NetworkX graphs.
Note that NetworkX graphs can contain any hashable Python object as
node (not just integers and strings). So writing a NetworkX graph
as a text file may not always be what you want: see write_gpickle
and gread_gpickle for that case.
This module provides the following :
Python pickled format:
Useful for graphs with non text representable data.
write_gpickle(G, path)
read_gpickle(path)
Date:
Author:
Aric Hagberg (hagberg@lanl.gov)
Dan Schult (dschult@colgate.edu)
|
__credits__ = '
'
|
|
__revision__ = ' $$ '
|
Write graph object in Python pickle format.
This will preserve Python objects used as nodes or edges.
>>> write_gpickle(G,"file.gpickle")
See cPickle.
|
Read graph object in Python pickle format
>>> G=read_gpickle("file.gpickle")
See cPickle.
|