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(),
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 all bound
If i start a python shell. Is there a way to list the currently defined
classes, methods,
variables?
--
http://mail.python.org/mailman/listinfo/python-list
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
yes that works.
but, it gives one list, which contains everything.
now about inferring types? :)
--
http://mail.python.org/mailman/listinfo/python-list
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 ;-)
Regards,
Bengt
Awesome just what i was looking for
now sheepishly i shall RTFM :)
--
http://mail.python.org/mailman/listinfo/python-list
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