Commit 1de8e72e authored by jclamber's avatar jclamber

update test program

git-svn-id: http://svn.oamp.fr/repos/unsio/trunk@175 ce2cc22f-6084-46ce-a062-084b172ee5dc
parent 5a760fc0
......@@ -5,18 +5,21 @@ import numpy as np
import sys, getopt
def main(argv):
prog = argv.pop(0) # program name
file=''
comp=''
prop=''
try:
opts,args=getopt.getopt(argv,"hicp:v",["in=","comp=","prop="])
opts,args=getopt.getopt(argv,"hi:c:p:",["in=","comp=","prop="])
except getopt.GetoptError:
print "here"
print 'test.py -i <inputfile> -c <component> -p <properties>'
print prog,' -i <inputfile> -c <component> -p <properties>'
sys.exit(2)
for opt, arg in opts:
if opt == '-h':
print 'test.py -i <inputfile> -c <component> -p <properties>'
print prog,' -i <inputfile> -c <component> -p <properties>'
sys.exit()
elif opt in ("-i", "--in"):
file = arg
......@@ -37,7 +40,7 @@ def compute(file,comp,prop):
print ok
# get data
ok,data=uns.getData(comp,prop)
ok,data=uns.getArrayF(comp,prop)
print ok
print data
......@@ -53,4 +56,4 @@ def compute(file,comp,prop):
if __name__ == "__main__":
main(sys.argv[1:])
main(sys.argv[0:])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment