examining python objects

rurpy at yahoo.com rurpy at yahoo.com
Tue Nov 22 12:01:15 EST 2005


Colin J. Williams wrote:
> rurpy at yahoo.com wrote:
> > Bruno Desthuilliers wrote:
> >
> >>rurpy at yahoo.com a écrit :
> >>
> >>>Is there a function/class/module/whatever I can use to
> >>>look at objects?  I want something that will print the object's
> >>>value (if any) in pretty-printed form, and list all it's attributes
> >>>and their values.  And do all that recursively.
> >>>I want to be able to find out everything about an object that
> >>>Python can introspectively find out.
> >>
> >>Then check the inspect module
> >
> >
> > I want a callable, ready-to-use class or function.
> > Inspect provides soime funtions that would be useful for wrinting
> > such a class or function, but does not provide one.
> >
> > I seems that nobody who has written or used such a tool reads
> > this group, or feels like responding.
> >
> > FWIW, (for anyone looking for something similar in the future)
> > I found http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/137951
> > which will format and print an object's attributes.  By combining that
> > and pprint in the Python distrib, I think can coble up what I am
> > looking
> > for.
> >
> > Still, it is discouraging that such a basic thing is not provided with
> > python, or at lleast easily available in some library.
> >
> In the interactive mode, you might try >> help(object)

I want all the information about the object I can get through
introspection.  help() give some (a lot more than I realized,
so thanks) but not everything.




More information about the Python-list mailing list