def finalize(self):
        if not self.helpbase:
            return

        # generate interesting filenames
        resultfile   = self.helpbase + '.chm'
        projectfile  = self.helpbase + '.hhp'
        contentfile  = self.helpbase + '.hhc'
        indexfile    = self.helpbase + '.hhk'

        # generate a reasonable title
        title        = self.helpbase

        # get the default topic file
        (topname,topnext,topprev,topup,topfile) = self.nodelist[0]
        defaulttopic = topfile

        # PROJECT FILE
        try:
            fp = open(projectfile,'w')
            print>>fp, '[OPTIONS]'
            print>>fp, 'Auto Index=Yes'
            print>>fp, 'Binary TOC=No'
            print>>fp, 'Binary Index=Yes'
            print>>fp, 'Compatibility=1.1'
            print>>fp, 'Compiled file=' + resultfile + ''
            print>>fp, 'Contents file=' + contentfile + ''
            print>>fp, 'Default topic=' + defaulttopic + ''
            print>>fp, 'Error log file=ErrorLog.log'
            print>>fp, 'Index file=' + indexfile + ''
            print>>fp, 'Title=' + title + ''
            print>>fp, 'Display compile progress=Yes'
            print>>fp, 'Full-text search=Yes'
            print>>fp, 'Default window=main'
            print>>fp, ''
            print>>fp, '[WINDOWS]'
            print>>fp, ('main=,"' + contentfile + '","' + indexfile
                        + '","","",,,,,0x23520,222,0x1046,[10,10,780,560],'
                        '0xB0000,,,,,,0')
            print>>fp, ''
            print>>fp, '[FILES]'
            print>>fp, ''
            self.dumpfiles(fp)
            fp.close()
        except IOError, msg:
            print projectfile, ':', msg
            sys.exit(1)

        # CONTENT FILE
        try:
            fp = open(contentfile,'w')
            print>>fp, '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">'
            print>>fp, '<!-- This file defines the table of contents -->'
            print>>fp, '<HTML>'
            print>>fp, '<HEAD>'
            print>>fp, ('<meta name="GENERATOR"'
                        'content="Microsoft&reg; HTML Help Workshop 4.1">')
            print>>fp, '<!-- Sitemap 1.0 -->'
            print>>fp, '</HEAD>'
            print>>fp, '<BODY>'
            print>>fp, '   <OBJECT type="text/site properties">'
            print>>fp, '     <param name="Window Styles" value="0x800025">'
            print>>fp, '     <param name="comment" value="title:">'
            print>>fp, '     <param name="comment" value="base:">'
            print>>fp, '   </OBJECT>'
            self.dumpnodes(fp)
            print>>fp, '</BODY>'
            print>>fp, '</HTML>'
            fp.close()
        except __HOLE__, msg:
            print contentfile, ':', msg
            sys.exit(1)

        # INDEX FILE
        try:
            fp = open(indexfile  ,'w')
            print>>fp, '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">'
            print>>fp, '<!-- This file defines the index -->'
            print>>fp, '<HTML>'
            print>>fp, '<HEAD>'
            print>>fp, ('<meta name="GENERATOR"'
                        'content="Microsoft&reg; HTML Help Workshop 4.1">')
            print>>fp, '<!-- Sitemap 1.0 -->'
            print>>fp, '</HEAD>'
            print>>fp, '<BODY>'
            print>>fp, '<OBJECT type="text/site properties">'
            print>>fp, '</OBJECT>'
            self.dumpindex(fp)
            print>>fp, '</BODY>'
            print>>fp, '</HTML>'
            fp.close()
        except IOError, msg:
            print indexfile  , ':', msg
            sys.exit(1)
dataset/ETHPy150Open Southpaw-TACTIC/TACTIC/src/context/client/tactic-api-python-4.0.api04/Tools/Scripts/texi2html.py/HTMLHelp.finalize