hi,
I would like to iterate through the values of a variable which is supposed to contain the ids of a class.
Here are the steps :
from owlready2 import *
onto_path.append("Ontologie_v1")
onto = get_ontology("
http://www.idexationsemantique.bf/index_semantique.owl")
onto.load()
onto.Personne.iri gives out "
http://www.idexationsemantique.bf#Personne"
pers = onto.Personne() #Gives an identifiant of name personne1
pers = onto.Personne() #Gives an identifiant of name personne2
for s in pers2:
... print(s)
Gives out "TypeError: 'Personne' object is not iterable"
My final goal is to iterate through all the values of data properties like in relational database and display them on my page
value = onto.personne1.possede = ["Loc"]
value = onto.personne2.possede = ["Mixte"]
Display all data properties through the variable "values" on my website page.
Any help will be welcome.
Thank you