def display_pygraphviz(graph, path, format=None, prog=None, args=''):
 if (format is None):
  filename = path.name
  format = os.path.splitext(filename)[1].lower()[1:]
 if (not format):
  format = None
 graph.draw(path, format, prog, args)
 path.close()
 nx.utils.default_opener(filename)

def display_pygraphviz ( graph , path , format = None , prog = None , args = '' ) : if ( format is None ) : filename = path . name format = os . path . splitext ( filename ) [ 1 ] . lower ( ) [ 1 : ] if ( not format ) : format = None graph . draw ( path , format , prog , args ) path . close ( ) nx . utils . default_opener ( filename )
internal function to display a graph in os dependent manner .