Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A(object):
- def __call__(self):
- print "ran a"
- class B(object):
- def __call__(self):
- print "ran b"
- class C(object):
- def __call__(self):
- print "ran c"
- import sys
- getattr(sys.modules[__name__], 'A')
- import sys
- import types
- this_module = sys.modules[__name__]
- [x for x in
- [getattr(this_module, x) for x in dir(this_module)]
- if type(x) == types.ClassType]
Add Comment
Please, Sign In to add comment