def read_dot(path):
 try:
  import pygraphviz
 except ImportError:
  raise ImportError('read_dot() requires pygraphviz ', 'http://pygraphviz.github.io/')
 A = pygraphviz.AGraph(file=path)
 return from_agraph(A)

def read_dot ( path ) : try : import pygraphviz except ImportError : raise ImportError ( 'read_dot() requires pygraphviz ' , 'http://pygraphviz.github.io/' ) A = pygraphviz . AGraph ( file = path ) return from_agraph ( A )
return a networkx graph from a dot file on path .