Module Expr Str Import alias identifier ImportFrom alias alias alias Assign NameStore ListLoad Str Str Str Str FunctionDef arguments args NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Str orelse Assign NameStore AttributeLoad NameLoad attr Expr Yield BinOpMod Str Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Call NameLoad Num BinOpAdd Call NameLoad NameLoad Num For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Dict Assign NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareNotEq Call AttributeLoad NameLoad attr Str body AugAssignAdd NameStore BinOpMod Str TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad Expr Yield NameLoad If Call AttributeLoad NameLoad attr body Expr Yield Str orelse Expr Yield Str For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr keyword NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad TupleLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareNotEq Call AttributeLoad NameLoad attr Str body AugAssignAdd NameStore BinOpMod Str TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad Expr Yield NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str For NameStore Call NameLoad NameLoad body AugAssignAdd NameStore Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list Call NameLoad Num keyword Str FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Assign NameStore GeneratorExp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Return Call NameLoad NameLoad decorator_list Call NameLoad Num keyword Str FunctionDef arguments args NameParam defaults body Expr Str Import alias If Call NameLoad NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad ListComp Call AttributeLoad NameLoad attr Str comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr While NameLoad body TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler body Break If Call AttributeLoad Call AttributeLoad NameLoad attr attr Str body TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Num handlers ExceptHandler type NameLoad body Pass orelse Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad orelse If Call AttributeLoad Call AttributeLoad NameLoad attr attr Str body Assign NameStore Dict Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr For NameStore Call NameLoad Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad TryExcept body Assign NameStore ListComp Call AttributeLoad NameLoad attr Str comprehension NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad NameLoad attr Str handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assign TupleStore NameStore NameStore SubscriptLoad NameLoad Slice Num Num Expr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Dict Str NameLoad TryExcept body Assign TupleStore NameStore NameStore NameStore SubscriptLoad NameLoad Slice Num Num Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Dict Str Str Str Call NameLoad NameLoad Call NameLoad NameLoad NameLoad handlers ExceptHandler body Pass Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice Num Num SubscriptLoad NameLoad Slice Num Num Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad orelse If BoolOpOr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Call AttributeLoad Call AttributeLoad NameLoad attr attr Str body If Call AttributeLoad Call AttributeLoad NameLoad attr attr Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad Call AttributeLoad NameLoad attr attr Str body Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body TryExcept body Assign NameStore ListComp Call AttributeLoad NameLoad attr Str comprehension NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad NameLoad attr Str handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad If CompareLt Call NameLoad NameLoad Num body Continue Assign TupleStore NameStore NameStore SubscriptLoad NameLoad Slice Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Dict TryExcept body Assign NameStore SubscriptLoad NameLoad Slice Num Num Expr Call AttributeLoad NameLoad attr Dict Str Call NameLoad SubscriptLoad NameLoad Index Num handlers ExceptHandler body Pass Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice Num Num SubscriptLoad NameLoad Slice Num Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad If CompareIn Str NameLoad body Assign NameStore BinOpMod Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Import alias Expr Call AttributeLoad NameLoad attr Str decorator_list
N/A N/A 
*****
Pajek
*****
Read graphs in Pajek format.

This implementation handles directed and undirected graphs including
those with self loops and parallel edges.

Format
------
See http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm
for format information.

 N/A networkx nx networkx.utils is_string_like open_file make_str N/A __all__ N/A read_pajek parse_pajek generate_pajek write_pajek generate_pajek N/A N/A G N/A N/A N/A Generate lines in Pajek graph format.

    Parameters
    ----------
    G : graph
       A Networkx graph

    References
    ----------
    See http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm
    for format information.
     N/A N/A N/A G name N/A N/A name NetworkX N/A N/A name N/A G name N/A N/A N/A *vertices %s N/A N/A G order N/A nodes N/A list G N/A nodenumber N/A dict N/A zip nodes N/A range 1 N/A N/A len nodes 1 N/A n nodes N/A N/A na N/A N/A N/A G node get n N/A N/A x N/A N/A na get x 0.0 N/A y N/A N/A na get y 0.0 N/A id N/A int N/A N/A na get id N/A nodenumber N/A n N/A N/A nodenumber N/A n id N/A shape N/A N/A na get shape ellipse N/A s N/A N/A join N/A map make_qstr N/A id n x y shape N/A N/A k v N/A N/A na items N/A N/A N/A N/A N/A v strip N/A N/A s N/A  %s %s N/A N/A make_qstr k N/A make_qstr v N/A N/A s N/A N/A N/A G is_directed N/A N/A N/A *arcs N/A N/A N/A *edges N/A N/A u v edgedata N/A N/A G edges data True N/A N/A d N/A N/A edgedata copy N/A value N/A N/A d pop weight 1.0 N/A s N/A N/A join N/A map make_qstr N/A N/A nodenumber N/A u N/A nodenumber N/A v value N/A N/A k v N/A N/A d items N/A N/A N/A N/A N/A v strip N/A N/A s N/A  %s %s N/A N/A make_qstr k N/A make_qstr v N/A N/A s N/A write_pajek N/A N/A G path encoding N/A UTF-8 N/A N/A Write graph in Pajek format to path.

    Parameters
    ----------
    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")

    References
    ----------
    See http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm
    for format information.
     N/A line N/A generate_pajek G N/A N/A line N/A N/A N/A path write N/A N/A line encode encoding N/A N/A open_file 1 mode wb read_pajek N/A N/A path encoding N/A UTF-8 N/A N/A Read graph in Pajek format from path.

    Parameters
    ----------
    path : file or string
       File or filename to write.
       Filenames ending in .gz or .bz2 will be uncompressed.

    Returns
    -------
    G : NetworkX MultiGraph or MultiDiGraph.

    Examples
    --------
    >>> G=nx.path_graph(4)
    >>> nx.write_pajek(G, "test.net")
    >>> G=nx.read_pajek("test.net")

    To create a Graph instead of a MultiGraph use

    >>> G1=nx.Graph(G)

    References
    ----------
    See http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm
    for format information.
     N/A lines N/A N/A N/A line decode encoding N/A line path N/A N/A parse_pajek lines N/A N/A open_file 0 mode rb parse_pajek N/A N/A lines N/A N/A N/A Parse Pajek format graph from string or iterable.

    Parameters
    ----------
    lines : string or iterable
       Data in Pajek format.

    Returns
    -------
    G : NetworkX graph

    See Also
    --------
    read_pajek()

     N/A shlex N/A N/A is_string_like lines N/A N/A lines N/A iter N/A N/A lines split N/A lines N/A iter N/A N/A N/A line rstrip N/A line lines N/A G N/A N/A nx MultiDiGraph N/A lines N/A N/A N/A N/A l N/A next lines N/A N/A N/A N/A N/A N/A N/A N/A N/A l lower startswith *network N/A N/A N/A N/A N/A label name N/A N/A l split None 1 N/A N/A N/A ValueError N/A N/A N/A N/A N/A N/A G graph N/A name name N/A N/A N/A N/A N/A N/A l lower startswith *vertices N/A N/A nodelabels N/A N/A N/A l nnodes N/A N/A l split N/A i N/A range N/A int nnodes N/A N/A l N/A next lines N/A N/A N/A splitline N/A N/A N/A x decode utf-8 N/A x N/A N/A shlex split N/A N/A N/A make_str l encode utf-8 N/A N/A N/A AttributeError N/A N/A splitline N/A N/A shlex split N/A str l N/A N/A id label N/A splitline N/A 0 2 N/A N/A N/A G add_node label N/A N/A nodelabels N/A id label N/A N/A N/A G node N/A label N/A id id N/A N/A N/A N/A x y shape N/A splitline N/A 2 5 N/A N/A N/A N/A N/A G node N/A label update N/A x y shape N/A float x N/A float y shape N/A N/A N/A N/A N/A extra_attr N/A zip N/A splitline N/A 5 2 N/A splitline N/A 6 2 N/A N/A N/A N/A N/A G node N/A label update extra_attr N/A N/A N/A N/A N/A N/A N/A l lower startswith *edges N/A N/A N/A N/A l lower startswith *arcs N/A N/A N/A N/A N/A N/A l lower startswith *edge N/A N/A G N/A N/A nx MultiGraph G N/A N/A N/A N/A N/A l lower startswith *arcs N/A N/A G N/A N/A G to_directed N/A l lines N/A N/A N/A N/A splitline N/A N/A N/A x decode utf-8 N/A x N/A N/A shlex split N/A N/A N/A make_str l encode utf-8 N/A N/A N/A AttributeError N/A N/A splitline N/A N/A shlex split N/A str l N/A N/A N/A len splitline 2 N/A N/A N/A N/A ui vi N/A splitline N/A 0 2 N/A u N/A N/A nodelabels get ui ui N/A v N/A N/A nodelabels get vi vi N/A edge_data N/A N/A N/A N/A w N/A splitline N/A 2 3 N/A N/A N/A edge_data update N/A weight N/A float N/A w N/A 0 N/A N/A N/A N/A N/A extra_attr N/A zip N/A splitline N/A 3 2 N/A splitline N/A 4 2 N/A N/A N/A edge_data update extra_attr N/A N/A N/A G add_edge u v edge_data N/A G N/A make_qstr N/A N/A t N/A N/A N/A Return the string representation of t.
    Add outer double-quotes if the string has a space.
     N/A N/A N/A is_string_like t N/A N/A t N/A str t N/A N/A t N/A N/A t N/A "%s" t N/A t N/A teardown_module N/A N/A module N/A N/A N/A os N/A N/A N/A os unlink test.net N/A