Hi,
I verified, but there is no "dir()" support in Owlready2. Currently, you may want to use individual.get_properties() for listing asserted properties on an individual.
However, adding dir() support would be a nice addition, and I'm thinking about it.
> FYI, I'm using "has some Role" in Protégé SubClassOf to define the
> attribute "has", and was hoping to recover "has" in one way or another.
Do you mean you are working on a Class and not an Instance/Individual? Owlready2 export some restrictions on Classes (those with "some") as Class properties, but here too, there is no dir() support. On Classes, I think you'll have to scan all restrictions in Class.is_a and Class.equivalent_to, and search for "some" restriction.
Best regards,
Jean-Baptiste Lamy
MCF, LIMICS, Université Paris 13
> Hi,
>
> I'm trying to use introspection on owlready-generated objects. When I use
> "dir" on an object, I don't see the attributes I'm defining in my ontology
> (as the "has_topping" used in the documentation example). What am I doing
> wrong? FYI, I'm using "has some Role" in Protégé SubClassOf to define the
> attribute "has", and was hoping to recover "has" in one way or another.
>
> Thanks in advance.
>
> Bye,
>
> Pierre
>
>
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
>
http://owlready.8326.n8.nabble.com/Introspection-with-owlready2-tp168.html> To start a new topic under Owlready, email
[hidden email]
> To unsubscribe from Owlready, visit