snakeoil.modules module

dynamic import functionality

exception snakeoil.modules.FailedImport(trg, e)[source]

Bases: ImportError

Raised when a requested target cannot be imported

snakeoil.modules.load_any(name)[source]

load an attribute or a module from a namespace

snakeoil.modules.load_attribute(name)[source]

load an attribute from a module

Parameters:

name – python dotted namespace path of the attribute to load from a module for example.

Raise:

FailedImport if importing fails, or the requested attribute cannot be found

Returns:

attribute resolved from name