#NEWLINE# def export( self , filename = None , format = 'graphviz' ) : #NEWLINE# #INDENT# 'Export the graph in GraphViz dot language.' #NEWLINE# if ( format != 'graphviz' ) : #NEWLINE# #INDENT# raise 'Unsupported Export Format.' #NEWLINE# #UNINDENT# if filename : #NEWLINE# #INDENT# fh = open ( filename , 'w' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# fh = sys . stdout #NEWLINE# #UNINDENT# fh . write ( self . get_graphviz_source ( ) )