Re: How to list currently defined classes, methods etc

2005-12-02 Thread Colin J. Williams
Deep wrote: > I have been looking a bit and am stuck at this point. > > Given a string, how do i find what is the string bound to. > Let me give an example. > > def deep(): > print "Hello" > > now inspect.ismethod(deep) returns true. (As it should). > But if I am trying to make a list of al

Re: How to list currently defined classes, methods etc

2005-12-02 Thread Kent Johnson
Deep wrote: > I have been looking a bit and am stuck at this point. > > Given a string, how do i find what is the string bound to. > Let me give an example. > > def deep(): > print "Hello" > > now inspect.ismethod(deep) returns true. (As it should). > But if I am trying to make a list of al

Re: How to list currently defined classes, methods etc

2005-12-02 Thread Deep
I have been looking a bit and am stuck at this point. Given a string, how do i find what is the string bound to. Let me give an example. def deep(): print "Hello" now inspect.ismethod(deep) returns true. (As it should). But if I am trying to make a list of all bound methods), i use dir(), w

Re: How to list currently defined classes, methods etc

2005-11-30 Thread Alex Martelli
Deep <[EMAIL PROTECTED]> wrote: > yes that works. > but, it gives one list, which contains everything. > now about inferring types? :) You may want to look at module inspect in the standard library. Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: How to list currently defined classes, methods etc

2005-11-30 Thread Deep
Awesome just what i was looking for now sheepishly i shall RTFM :) -- http://mail.python.org/mailman/listinfo/python-list

Re: How to list currently defined classes, methods etc

2005-11-30 Thread Bengt Richter
On Wed, 30 Nov 2005 20:55:46 -0500, Peter Hansen <[EMAIL PROTECTED]> wrote: >Deep wrote: >> If i start a python shell. Is there a way to list the currently defined >> classes, methods, >> variables? > >Does this work? > > >>> dir() > >>> help(__name__) might be interesting for the OP too ;-) R

Re: How to list currently defined classes, methods etc

2005-11-30 Thread Deep
yes that works. but, it gives one list, which contains everything. now about inferring types? :) -- http://mail.python.org/mailman/listinfo/python-list

Re: How to list currently defined classes, methods etc

2005-11-30 Thread Peter Hansen
Deep wrote: > If i start a python shell. Is there a way to list the currently defined > classes, methods, > variables? Does this work? >>> dir() -Peter -- http://mail.python.org/mailman/listinfo/python-list