Sourcecode
import sys
from RASCH import *
# initialize libRASCH
ra = RASCH()
if not ra:
print "can't initialize libRASCH"
sys.exit()
[err_num, err_text] = ra.get_error()
if err_num != 1:
print "while initializing libRASCH, error #%d occured:\n " "%s\n" % err_num, err_text
sys.exit()
# get some infos
[value, name, desc] = ra.get_info(info='num_plugins')
if (value):
print name, "("+desc+"):", value
# find all measurements in a directory
meas = ra.get_all_meas(sys.argv[1])
print "measurements found in " + sys.argv[1] + ":\n"
cnt = 1
for item in meas:
print "%d: %s" % (cnt, item)
cnt = cnt + 1
Output of the example
#plugins (): 30
measurements found in ./database:
1: ./database/JesusOlivan2003-12-EMG2.edf
2: ./database/100s.hea
|