1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
"""
A Python wrapper for the graphviz Agraph data structure.
Quick example::
>>> from pygraphviz import *
>>> G=AGraph()
>>> G.add_node('a')
>>> G.add_edge('b','c')
>>> print G # doctest: +SKIP
strict graph {
a;
b -- c;
}
<BLANKLINE>
See pygraphviz.AGraph for detailed documentation.
"""
# Copyright (C) 2004-2010 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Manos Renieris, http://www.cs.brown.edu/~er/
# Distributed with BSD license.
# All rights reserved, see LICENSE for details.
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
# Release data
from . import release
if release.revision is None:
# we probably not running in an svn directory
try:
# use release data stored at installatation time.
from . import version
__version__ = version.__version__
__revision__ = version.__revision__
__date__ = version.__date__
except ImportError:
# version.py was not created or no longer exists
__version__ = release.version
__revision__ = release.revision
__date__ = release.date
else:
# use dynamic values, even if version.py exists
__version__ = release.version
__revision__ = release.revision
__date__ = release.date
__author__ = '%s <%s>\n%s <%s>\n%s <%s>' % \
( release.authors['Hagberg'] + release.authors['Schult'] + \
release.authors['Renieris'] )
__license__ = release.license
from .agraph import AGraph, Node, Edge, Attribute, ItemAttribute, DotError
__all__=[
'AGraph',
'Node',
'Edge',
'Attribute',
'ItemAttribute',
'DotError'
]
from pygraphviz.tests.test import run as test
|