graphit/graph_io/io_pgf_format.py
def read_graph(graph_file, graph=None):
    """
    Import graph from Graph Python Format file
    
    GPF format is the modules own file format consisting out of a serialized
    nodes and edges dictionary.
    The format is feature rich wth good performance but is not portable.
    
    :param graph_file:    File path to read from
    :type graph_file:     :py:str
    :param graph:        Graph object to import to or Graph by default
    :type graph:         Graph instance
    :return:             Graph instance
    """
    
    if not graph:
        graph = Graph()

    # Import graph from serialized Graph Python Format
    with open(graph_file) as f:
        code = compile(f.read(), "GPF_file", 'exec')
        exec(code)
    
    return graph

    Import graph from Graph Python Format file
    
    GPF format is the modules own file format consisting out of a serialized
    nodes and edges dictionary.
    The format is feature rich wth good performance but is not portable.
    
    :param graph_file:    File path to read from
    :type graph_file:     :py:str
    :param graph:        Graph object to import to or Graph by default
    :type graph:         Graph instance
    :return:             Graph instance
    
Import graph from Graph Python Format file
GPF format is the modules own file format consisting out of a serialized
nodes and edges dictionary.
The format is feature rich wth good performance but is not portable.
Import graph from Graph Python Format file GPF format is the modules own file format consisting out of a serialized nodes and edges dictionary . The format is feature rich wth good performance but is not portable .
def read_graph(graph_file, graph=None):
    if not graph:
        graph = Graph()
    with open(graph_file) as f:
        code = compile(f.read(), "GPF_file", 'exec')
        exec(code)
    return graph
def read_graph ( graph_file , graph = None ) : if not graph : graph = Graph ( ) with open ( graph_file ) as f : code = compile ( f . read ( ) , "GPF_file" , 'exec' ) exec ( code ) return graph
Import graph from Graph Python Format file
GPF format is the modules own file format consisting out of a serialized
nodes and edges dictionary.
Import graph from Graph Python Format file GPF format is the modules own file format consisting out of a serialized nodes and edges dictionary .
"""
    Import graph from Graph Python Format file
    
    GPF format is the modules own file format consisting out of a serialized
    nodes and edges dictionary.
    The format is feature rich wth good performance but is not portable.
    
    :param graph_file:    File path to read from
    :type graph_file:     :py:str
    :param graph:        Graph object to import to or Graph by default
    :type graph:         Graph instance
    :return:             Graph instance
    """ # Import graph from serialized Graph Python Format
None
graph_file
File path to read from
File path to read from
graph
Graph object to import to or Graph by default
Graph object to import to or Graph by default