Short question
Is it possible to call a module obtained from python's dir () function?
Background
I am working on creating a special test runner and would like to be able to choose which modules to run based on the string filter. See my examples below for perfect use.
module_a.py
def not_mykey_dont_do_this(): print 'I better not do this' def mykey_do_something(): print 'Doing something!' def mykey_do_somethingelse(): print 'Doing something else!'
module_b.py
import module_a list_from_a = dir(module_a)
Exit
Doing something! Doing something else!
source share