Last change
on this file since 55 was
43,
checked in by mmc, 18 years ago
|
- Added a new Rappture.result() function to the Python library.
This makes it easy to finalize results. See examples/graph
for example use.
- Added examples/graph to illustrate a simple tool with a string
and two numbers for input.
- Fixed the XY graph to show crosshairs and pop-up info when
you mouse over particular points.
- Fixed Rappture::exec so that it doesn't add stray newlines when
a program has lots (more than 8k) of output.
- Fixed the analyzer to recognize the <tool><analyzer> tag.
When set to "last", this automatically clears the last result.
Handy for programs like SPICE, where you don't compare much,
but keep running one new simulation after another.
- Fixed <string> entries to enable the Simulate button after
each editing keystroke.
|
File size:
897 bytes
|
Line | |
---|
1 | # ---------------------------------------------------------------------- |
---|
2 | # COMPONENT: result - provides a simple way to report results |
---|
3 | # |
---|
4 | # This routine encapsulates the action of reporting results |
---|
5 | # back to Rappture. |
---|
6 | # ====================================================================== |
---|
7 | # AUTHOR: Michael McLennan, Purdue University |
---|
8 | # Copyright (c) 2005 Purdue Research Foundation, West Lafayette, IN |
---|
9 | # ====================================================================== |
---|
10 | import time |
---|
11 | |
---|
12 | def result(lib): |
---|
13 | """ |
---|
14 | Use this function to report the result of a Rappture simulation. |
---|
15 | Pass in the XML object representing the initial driver with |
---|
16 | results substituted into it. |
---|
17 | """ |
---|
18 | |
---|
19 | runfile = 'run%d.xml' % time.time() |
---|
20 | fp = open(runfile,'w') |
---|
21 | fp.write(lib.xml()) |
---|
22 | fp.close() |
---|
23 | |
---|
24 | # pass the name of the run file back to Rappture |
---|
25 | print '=RAPPTURE-RUN=>%s' % runfile |
---|
Note: See
TracBrowser
for help on using the repository browser.