aboutsummaryrefslogtreecommitdiff
path: root/swig/python/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'swig/python/test.py')
-rw-r--r--swig/python/test.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/swig/python/test.py b/swig/python/test.py
index f491a39..4d994ac 100644
--- a/swig/python/test.py
+++ b/swig/python/test.py
@@ -1,15 +1,22 @@
#!/usr/bin/python
-import xtract
+try:
+ import xtract
+except ImportError:
+ print 'Failed to load the library "jxtract"'
+
+print '\nRunning libxtract Python bindings test...\n'
len = 5
a = xtract.floatArray(len)
+temp = []
for i in range(0, len):
a[i] = 2 * i
+ temp.append(str(a[i]))
-retval,result = xtract.xtract_mean(a,len,None)
-
-print result
+print 'The mean of ' + ', '.join(temp) + ' is: %.2f' % \
+ xtract.xtract_mean(a,len,None)[1]
+print '\nFinished!\n'