Posted By

manatlan on 09/14/09


Tagged

ironpython tech


Versions (?)

IronPython : show attributs/values of an object


 / Published in: Python
 

  1. def show(obj):
  2. if obj!=None:
  3. for i in dir(obj):
  4. v=getattr(obj,i)
  5. if "builtin_function_or_method" not in str(type(v)) and not i.startswith("__"):
  6. print "%s.%s (%s)= %s" % (obj.__class__.__name__,i,type(v), v)
  7. else:
  8. print "SHOW NONE !!!"

Report this snippet  

You need to login to post a comment.