Hi guys, the queries doesn't work.
with onto3:
class farmaco(Thing):
pass
for i in farmaco.direct_instances():
querys = list(my_world.sparql('''PREFIX onto: <
http://test.org/codifa.owl#>
SELECT ?q { onto:''' + i.name + ''' onto:contiene ?q
?q onto:interazione onto:''' + PA + ''' .}'''))
for y in querys:
print(y)
controllo1 = 1
querys2 = list(my_world.sparql('''PREFIX onto: <
http://test.org/codifa.owl#>
SELECT ?q { ?q onto:contiene onto:'''+ y + ''' .}'''))
for yy in querys2:
print(yy)
farmaci_incompatibili.append(yy)