Return to Snippet

Revision: 17755
at September 14, 2009 03:25 by manatlan


Initial Code
def show(obj):
    if obj!=None:
        for i in dir(obj):
            v=getattr(obj,i)
            if "builtin_function_or_method" not in str(type(v)) and not i.startswith("__"):
                print "%s.%s (%s)= %s" % (obj.__class__.__name__,i,type(v), v)
    else:
        print "SHOW NONE !!!"

Initial URL

                                

Initial Description

                                

Initial Title
IronPython : show attributs/values of an object

Initial Tags

                                

Initial Language
Python