How to find out which functions exist?
mrstephengross
mrstephengross at hotmail.com
Wed Oct 24 11:09:02 EDT 2007
> import module
> from inspect import getmembers, isclass
> classes = getmembers(module, isclass)
Ok, this makes sense. How can I do it inside the .py file I'm working
on? That is, consider this:
class A:
pass
class B:
pass
import inspect
print inspect.getmembers(<this file>, inspect.isclass) # how can I
express <this file> ?
Thanks again,
--Steve
More information about the Python-list
mailing list