boodebr A little library from boodebr.org
Module boodebr.util.modules
Functions
Load a module, given a full name like
AAA.BBB.CCC.
Returns module.
ExampleIf
AAA.BBB.CCC has a function named
DDD, it can be loaded and referenced with:
mod = load_module('AAA.BBB.CCC')
func = getattr(mod, 'DDD')
Using
__import__("AAA.BBB.CCC") or
imp.load_module() will NOT do the same thing.
blog comments powered by