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