Maybe what you're looking for is __import__()? >>> help(__import__) Help on built-in function __import__ in module __builtin__:
__import__(...) __import__(name, globals, locals, fromlist) -> module Import a module. The globals are only used to determine the context; they are not modified. The locals are currently unused. The fromlist should be a list of names to emulate ``from name import ...'', or an empty list to emulate ``import name''. When importing a module from a package, note that __import__('A.B', ...) returns package A when fromlist is empty, but its submodule B when fromlist is not empty. -- http://mail.python.org/mailman/listinfo/python-list