modern_urwid.resource.registry
Handles storing Python modules
Classes
Simple registry for Python modules |
- class modern_urwid.resource.registry.ModuleRegistry
Bases:
objectSimple registry for Python modules
- get(name: str) ModuleType
Get a registered module
- Parameters:
name (str) – The name of the module
- Raises:
UnknownModule – Raises if a module is not found with the given name
- Returns:
The Python module, if registered
- Return type:
- register(name: str, module: ModuleType)
Store the given module in the registry
- Parameters:
name (str) – The name of the module
module (types.ModuleType) – The Python module to register