Esempio n. 1
0
#        experiment.param["countme"] = num
    experiment.param["project"] = "PPP" + str(num)

experiments = m.find_all(Experiment(project="PPP1"))
for num, experiment in enumerate(experiments):
    print experiment._params
    
e1.data = {"hlkk": "lkjlkjkl#äjkljysdsa"}

m.save(e1)


o = {}

from xdapy import Entity
print Entity.__subclasses__()

o["otherObj"] = type("otherObj", (Entity,), {'declared_params': {'myParam': 'string'}})

print [s.__name__ for s in Entity.__subclasses__()]
oo = o["otherObj"](myParam="Hey")
m.save(oo)

#m.session.session.commit()

#    m.session.delete(e1)
#m.session.session.commit()

xml = m.toXML()
print ""
print xml
Esempio n. 2
0
print ""
obs_1.print_tree()
print ""
trial1_1.print_tree()

#exp_neptune.attach("C", obs_1)

from xdapy.structures import Context

print m.find_all(Context)
#m.delete(obs_1)
#print m.find_all(Context)

m.delete(*m.find_all(Context))


print m.find_all(Context)
print m.find_all(Experiment)


contx = m.find_first(Context)
#m.registerConnection(Experiment, Observer, "Observer")

exp_monorail.attach("Observer", obs_1)

from xdapy.io import XmlIO
xmlio = XmlIO(m, Entity.__subclasses__())
print xmlio.write()

db.drop_tables()