for l in file(fo + '.tmp3').readlines(): idx = l.find('Current Status') if idx != -1: status = l.split(':')[1].strip() break capslink = '' celink = ce str = '' for ifile in files: if os.path.exists('%s/%s' % (outdirdest, ifile)): capslink = HTMLMarkup(ifile, link='%s/%s.outputdir/%s' % (outputsdir, testcasename, ifile)) str = str + ' ' + capslink celink = HTMLMarkup(ce, underline=1) report.addParagraph('%d %s %s %s' % (i, HTMLMarkup(status, bold=1), str, celink)) except IOError: # FILE NOT FOUND report.addParagraph('%d %s %s %s' % (i, HTMLMarkup('*error*', bold=1), '', ce)) report.endDocument() repfile = '%s/report.html' % (tdir, ) file(repfile, 'w').write(report.buffer()) print 'created HTML report:', repfile