Module Loading

moderngl_window.utils.module_loading.import_string(dotted_path: str) Any[source]

Import a dotted module path and return the attribute/class designated by the last name in the path. Raise ImportError if the import failed.

Parameters:

dotted_path – The path to attempt importing

Returns:

Imported class/attribute