source: trunk/examples/zoo/loader2/tool.xml @ 6683

Last change on this file since 6683 was 6683, checked in by dkearney, 7 years ago

adding an example of using a loader to allow users to chose an example excel spreadsheet or upload their own. the uploaded file data is stored in the driver.xml. the simulation checks whether the user chose an example excel spreadsheet or uploaded thier own. if the user uploaded their own file, we write it to disk, then parse it using a pandas dataframe and finally load it into a Rappture Curve.

File size: 1.1 KB
Line 
1<?xml version="1.0"?>
2<run>
3<tool>
4  <title>loadxls</title>
5  <about>
6    Example of using a loader to store and access a file uploaded by a user.
7  </about>
8  <command>
9    python @tool/loadxls.py @driver
10  </command>
11</tool>
12<input>
13  <loader>
14    <about>
15      <label>Data file</label>
16      <description>Use this to pick a data file, or upload your own.</description>
17    </about>
18    <example>*.xml</example>
19    <upload>
20      <to>input.string(datafile)</to>
21    </upload>
22    <default>sinewave.xml</default>
23  </loader>
24
25  <string id="datafile">
26    <about>
27      <label>Datafile</label>
28      <description>Datafile chosen/uploaded by the user</description>
29      <enable>no</enable>
30    </about>
31  </string>
32  <number id="mass">
33    <about>
34      <label>Mass</label>
35    </about>
36    <units>kg</units>
37    <default>10g</default>
38  </number>
39  <number id="temp">
40    <about>
41      <label>Temperature</label>
42    </about>
43    <units>K</units>
44    <default>194K</default>
45  </number>
46  <number id="energy">
47    <about>
48      <label>Energy</label>
49    </about>
50    <units>eV</units>
51    <default>44eV</default>
52  </number>
53</input>
54</run>
Note: See TracBrowser for help on using the repository browser.