#NEWLINE# def write_exports( exports , stream ) : #NEWLINE# #INDENT# if ( sys . version_info [ 0 ] >= 3 ) : #NEWLINE# #INDENT# stream = codecs . getwriter ( 'utf-8' ) ( stream ) #NEWLINE# #UNINDENT# cp = configparser . ConfigParser ( ) #NEWLINE# for ( k , v ) in exports . items ( ) : #NEWLINE# #INDENT# cp . add_section ( k ) #NEWLINE# for entry in v . values ( ) : #NEWLINE# #INDENT# if ( entry . suffix is None ) : #NEWLINE# #INDENT# s = entry . prefix #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# s = ( '%s:%s' % ( entry . prefix , entry . suffix ) ) #NEWLINE# #UNINDENT# if entry . flags : #NEWLINE# #INDENT# s = ( '%s [%s]' % ( s , ', ' . join ( entry . flags ) ) ) #NEWLINE# #UNINDENT# cp . set ( k , entry . name , s ) #NEWLINE# #UNINDENT# #UNINDENT# cp . write ( stream )