Log Output Example

Location: examples/webapp/log/

This example demonstrates the <log> output type – a textual record of simulation results displayed as preformatted text.

Script

import sys
import rappture2web.rp_library as Rappture

rx = Rappture.PyXml(sys.argv[1])

rx['output.log'] = """****** ADEPT/F - 2.1   Sat Jul 30 19:39:36 2005 ******

   1 *title  input generated by adeptwr
   2 mesh  nx=250 xres=0.5
   3 misc  tempk=300

 ******execution time =        0.1 cpu seconds."""

rx.close()

Key concepts

  • Assign a multi-line string directly to output.log.

  • The log is displayed as monospaced text in the output panel.

  • This is useful for echoing solver output or progress information.

Running

rappture2web examples/webapp/log/