def format_dot(dotfilename, format=None):
 cmd = (u"dot -T%s -O '%s'" % (format, dotfilename))
 try:
  CommandLine(cmd).run()
 except IOError as ioe:
  if (u'could not be found' in str(ioe)):
   raise IOError(u"Cannot draw directed graph; executable 'dot' is unavailable")
  else:
   raise ioe
 else:
  logger.info((u'Converting dotfile: %s to %s format' % (dotfilename, format)))

def format_dot ( dotfilename , format = None ) : cmd = ( u"dot -T%s -O '%s'" % ( format , dotfilename ) ) try : CommandLine ( cmd ) . run ( ) except IOError as ioe : if ( u'could not be found' in str ( ioe ) ) : raise IOError ( u"Cannot draw directed graph; executable 'dot' is unavailable" ) else : raise ioe else : logger . info ( ( u'Converting dotfile: %s to %s format' % ( dotfilename , format ) ) )
dump a directed graph .