opengen package

Subpackages

Submodules

opengen.definitions module

opengen.definitions.original_icasadi_dir()

Directory where the original icasadi files are found (for internal use)

opengen.definitions.templates_dir()

Directory where the templates are found (for internal use, mainly)

opengen.definitions.templates_subdir(subdir=None)

Directory where the templates are found and subfolder relative to that path (for internal use, mainly)

Module contents

Top-level package for OpEn with lazy submodule imports.

This module defers importing heavy subpackages to attribute access to avoid circular import problems during package initialization.

Lazy submodule imports defer the loading of Python modules and their attributes until they are first accessed, reducing startup time and memory usage. This is achieved using PEP 562 (__getattr__ and __dir__) to intercept attribute access and load the underlying code only when necessary.