Collecting plots in an HTML file

Many runs of simviz1.py can be automated, many results are generated, and we need a way to browse the results
Idea: collect all plots in a common HTML file and let the script automate the writing of the HTML file
html = open('tmp_mruns.html', 'w')
html.write('<HTML><BODY BGCOLOR="white">\n')

m = m_min
while m <= m_max:
    case = 'tmp_m_%g' % m
    cmd = 'python simviz1.py %s -m %g -case %s' % \
          (simviz1_options, m, case)
    failure, output = commands.getstatusoutput(cmd)

    html.write('<H1>m=%g</H1> <IMG SRC="%s">\n' \
         % (m,os.path.join(case,case+'.png')))

    m += dm
html.write('</BODY></HTML>\n')
Only 4 additional statements!

previousnexttable of contents