Finally, i decide to make this:<br><br>from metatag import MetaTag<br>from htmltools import TagHTML<br><br>class Structure(object):<br> class A(TagHTML):<br> pass<br> class B(TagHTML):<br> pass<br><br> def get(self):<br>
__all__ = dir(self)<br> classes = filter(lambda k: type(getattr(self, k)) == type(TagHTML) , __all__)<br> methods = filter(lambda k: str(type(getattr(self, k))) == "<type 'instancemethod'>" , __all__)<br>
return classes, methods<br><br><br>So i can Lis Methods and Classes, and then use setattr or whatever needed. <br><br>There is a think left, i can't jus compare this:<br><br>if type(somethingA) == type(somthingB): <br>
<br>I transform type() to a string and then compare them.. (like in the code below)<br><br>Thanks<br><br>