Re: examining python objects
rurpy@yahoo.com wrote:[color=blue]
> Bruno Desthuilliers wrote:
>[color=green]
>>rurpy@yahoo.c om a écrit :
>>[color=darkred]
>>>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.[/color]
>>
>>Then check the inspect module[/color]
>
>
> 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/Coo.../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.
>[/color]
In the interactive mode, you might try >> help(object)
Colin W.
rurpy@yahoo.com wrote:[color=blue]
> Bruno Desthuilliers wrote:
>[color=green]
>>rurpy@yahoo.c om a écrit :
>>[color=darkred]
>>>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.[/color]
>>
>>Then check the inspect module[/color]
>
>
> 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/Coo.../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.
>[/color]
In the interactive mode, you might try >> help(object)
Colin W.
Comment