#NEWLINE# def get_attrs_flag( attrs ) : #NEWLINE# #INDENT# 'Convert an attribute array to a renderer flag.' #NEWLINE# attrs_flag = 0 #NEWLINE# if ( 'bold' in attrs ) : #NEWLINE# #INDENT# attrs_flag |= ATTR_BOLD #NEWLINE# #UNINDENT# if ( 'italic' in attrs ) : #NEWLINE# #INDENT# attrs_flag |= ATTR_ITALIC #NEWLINE# #UNINDENT# if ( 'underline' in attrs ) : #NEWLINE# #INDENT# attrs_flag |= ATTR_UNDERLINE #NEWLINE# #UNINDENT# return attrs_flag