Mercurial > hg > libxtract
view swig/python/test.py @ 94:a60dea3e59a9
Minor documentation change
author | Jamie Bullock <jamie@postlude.co.uk> |
---|---|
date | Mon, 24 Sep 2007 10:26:26 +0000 |
parents | 35a3bb5c3ffd |
children | 1cbbe5b5e461 |
line wrap: on
line source
#!/usr/bin/python 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])) print 'The mean of ' + ', '.join(temp) + ' is: %.2f' % \ xtract.xtract_mean(a,len,None)[1] print '\nFinished!\n'