[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

introspection question

Alex K

1/7/2008 2:25:00 PM

Hi Guys,

What would be the simplest way of enumerating all methods and members
(including inherited) of a given object? Thank you.

Alex
4 Answers

Peter Otten

1/7/2008 2:41:00 PM

0

Alex K wrote:

> What would be the simplest way of enumerating all methods and members
> (including inherited) of a given object? Thank you.

inspect.getmembers()

Peter

Alex K

1/7/2008 2:47:00 PM

0

Nice thank you. But anyway to make it look pretty?

On 07/01/2008, Peter Otten <__peter__@web.de> wrote:
> Alex K wrote:
>
> > What would be the simplest way of enumerating all methods and members
> > (including inherited) of a given object? Thank you.
>
> inspect.getmembers()
>
> Peter
> --
> http://mail.python.org/mailman/listinfo/p...
>

Peter Otten

1/7/2008 3:15:00 PM

0

Alex K wrote:

Please don't top-post.

> On 07/01/2008, Peter Otten <__peter__@web.de> wrote:
>> Alex K wrote:
>>
>> > What would be the simplest way of enumerating all methods and members
>> > (including inherited) of a given object? Thank you.
>>
>> inspect.getmembers()

> Nice thank you. But anyway to make it look pretty?

Maybe

$ /usr/bin/pydoc -p8080

Otherwise you'd have to explain what you are trying to do.

Peter

Guilherme Polo

1/7/2008 3:15:00 PM

0

2008/1/7, Alex K <spaceoutlet@gmail.com>:
> Nice thank you. But anyway to make it look pretty?
>

pprint.pprint(inspect.getmembers(someobject))

> On 07/01/2008, Peter Otten <__peter__@web.de> wrote:
> > Alex K wrote:
> >
> > > What would be the simplest way of enumerating all methods and members
> > > (including inherited) of a given object? Thank you.
> >
> > inspect.getmembers()
> >
> > Peter
> > --
> > http://mail.python.org/mailman/listinfo/p...
> >
> --
> http://mail.python.org/mailman/listinfo/p...
>


--
-- Guilherme H. Polo Goncalves