471,326 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,326 software developers and data experts.

introspection question

Hi Guys,

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

Alex
Jan 7 '08 #1
4 920
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
Jan 7 '08 #2
Nice thank you. But anyway to make it look pretty?

On 07/01/2008, Peter Otten <__*******@web.dewrote:
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/python-list
Jan 7 '08 #3
2008/1/7, Alex K <sp*********@gmail.com>:
Nice thank you. But anyway to make it look pretty?
pprint.pprint(inspect.getmembers(someobject))
On 07/01/2008, Peter Otten <__*******@web.dewrote:
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/python-list
--
http://mail.python.org/mailman/listinfo/python-list

--
-- Guilherme H. Polo Goncalves
Jan 7 '08 #4
Alex K wrote:

Please don't top-post.
On 07/01/2008, Peter Otten <__*******@web.dewrote:
>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
Jan 7 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Benjamin Rutt | last post: by
reply views Thread by Steven T. Hatton | last post: by
4 posts views Thread by Steven T. Hatton | last post: by
1 post views Thread by James Geurts | last post: by
3 posts views Thread by James Stroud | last post: by
14 posts views Thread by Dave Rahardja | last post: by
4 posts views Thread by mirandacascade | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.