boodebr A little library from boodebr.org


files/feed-icon-14x14.png Recently Edited
boodebr.util.modules edit
frank, 04 August 2008 (created 03 August 2008)
Module boodebr.util.modules
boodebr : boodebr.util : boodebr.util.modules

Module-related utilities.
Functions
load_module(name)
Load a module, given a full name like AAA.BBB.CCC.

Returns module.

Example

If 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 Disqus