Line | |
---|
1 | # ---------------------------------------------------------------------- |
---|
2 | # EXAMPLE: Rappture <integer> elements |
---|
3 | # ====================================================================== |
---|
4 | # AUTHOR: Martin Hunt, Purdue University |
---|
5 | # Copyright (c) 2015 HUBzero Foundation, LLC |
---|
6 | # |
---|
7 | # See the file "license.terms" for information on usage and |
---|
8 | # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
---|
9 | # ====================================================================== |
---|
10 | |
---|
11 | import Rappture |
---|
12 | import sys |
---|
13 | |
---|
14 | # open the XML file containing the run parameters |
---|
15 | rx = Rappture.PyXml(sys.argv[1]) |
---|
16 | |
---|
17 | n = rx['input.(points).current'].value |
---|
18 | rx['output.integer(outn).about.label'] = "Echo of points" |
---|
19 | rx['output.integer(outn).current'] = n |
---|
20 | |
---|
21 | # save the updated XML describing the run... |
---|
22 | rx.close() |
---|
Note: See
TracBrowser
for help on using the repository browser.