#NEWLINE# def dump_dot( self , f ) : #NEWLINE# #INDENT# f . write ( 'digraph {\n' ) #NEWLINE# for node in self . _nodes : #NEWLINE# #INDENT# attr_names = set ( node ) #NEWLINE# attr_names . remove ( 'name' ) #NEWLINE# html = ( '<b>%s</b>' % ( node [ 'name' ] , ) ) #NEWLINE# for attr_name in sorted ( attr_names ) : #NEWLINE# #INDENT# html += ( '<br/>  <i>%s</i>' % ( attr_name , ) ) #NEWLINE# #UNINDENT# f . write ( ( '  "%s" [ label=<%s> ]\n' % ( node [ 'name' ] , html ) ) ) #NEWLINE# #UNINDENT# for edge in self . _edges : #NEWLINE# #INDENT# f . write ( ( '  "%s" -> "%s"\n' % ( edge . start [ 'name' ] , attr_name . end [ 'name' ] ) ) ) #NEWLINE# #UNINDENT# for rank_constraint in self . _rank_constraints : #NEWLINE# #INDENT# f . write ( ( ( '  {rank=same; ' + ', ' . join ( [ ( '"%s"' % ( c , ) ) for c in rank_constraint ] ) ) + '}\n' ) ) #NEWLINE# #UNINDENT# f . write ( '}\n' )