'Requires:
nothing
Returns:
nothing
Logic:
Form a string of attributes and values. If you are not in a field
block, write this string to the output file. Otherwise, call on
the handle_sec_def method to handle this string.'

def __write_section(self, line):

    my_string = self.__mark_start
    if self.__found_first_sec:
        my_string += 'mi<tg<close_____<section\n'
    else:
        self.__found_first_sec = 1
    my_string += ('mi<tg<open-att__<section<num>%s' % str(self.__section_num))
    my_string += ('<num-in-level>%s' % str(self.__section_num))
    my_string += '<type>rtf-native'
    my_string += '<level>0'
    keys = self.__section_values.keys()
    if (len(keys) > 0):
        for key in keys:
            my_string += ('<%s>%s' % (key, self.__section_values[key]))
    my_string += '\n'
    my_string += self.__mark_end
    if (self.__state == 'body'):
        self.__write_obj.write(my_string)
    elif (self.__state == 'sec_in_field'):
        self.__handle_sec_def(my_string)
    elif (self.__run_level > 3):
        msg = 'missed    a    flag\n'
        raise self.__bug_handler, msg
