libb.get_module

get_module(modulename)[source]

Import a dotted module name and return the innermost module.

Handles the quirk where __import__('a.b.c') returns module a.

Parameters:

modulename (str) – Dotted module name to import.

Returns:

The imported module.

Return type:

ModuleType

Example:

>>> m = get_module('libb.module')
>>> m.__name__
'libb.module'