Object "dumping"

Tyler Eaves tyler at cg1.org
Sun Feb 2 22:20:38 EST 2003


try something like:

attribs = dir(object)
attribs.sort()
for i in attribs:
    exec('print str(object.'+i+')')
  


-- 
Tyler Eaves

"There are 10^11 stars in the galaxy. That used to be a huge number. But
it's only a hundred billion. It's less than the national deficit! We used to
call them astronomical numbers. Now we should call them economical numbers."
                                                  
						  --Richard Feynman




More information about the Python-list mailing list