@open_file(1, mode='w')
def write_dot(G, path):
 P = to_pydot(G)
 path.write(P.to_string())
 return

@ open_file ( 1 , mode = 'w' ) def write_dot ( G , path ) : P = to_pydot ( G ) path . write ( P . to_string ( ) ) return
write networkx graph g to graphviz dot format on path .