source: branches/uq/examples/zoo/integer/integer.py @ 5783

Last change on this file since 5783 was 5783, checked in by mmh, 9 years ago

add python example

File size: 790 bytes
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
11import Rappture
12import sys
13
14# open the XML file containing the run parameters
15rx = Rappture.PyXml(sys.argv[1])
16
17n = rx['input.(points).current'].value
18rx['output.integer(outn).about.label'] = "Echo of points"
19rx['output.integer(outn).current'] = n
20
21# save the updated XML describing the run...
22rx.close()
Note: See TracBrowser for help on using the repository browser.