Skip to content

fontlab_glyport.execution.ExecutionContext

ExecutionContext

Serialize active scopes and retain owned modules until explicit close.

Providers are zero-argument callables returning ModuleType. Shared script globals are opt-in; ordinary runs use a fresh dictionary.

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
__enter__ function (self)
__exit__ function (self, exc_type, exc, tb)
__init__ function (self, source_root: str | Path, profile: str, adapters: dict[str, Callable[[], ModuleType]] | None=None, *, s…
add_diagnostic function (self, diagnostic: ReceiptDiagnostic) -> None
cancel function (self) -> None Signal cooperative cancellation to owned external process operations.
close function (self) -> None Run close hooks, then unload retained modules; repeated calls are harmless.
configure_cocoa function (self, request: str) -> None Choose native imports after host adapter construction, before execution.
import_module function (self, name: str, package: str | None=None) -> ModuleType
on_close function (self, hook: Callable[[], object]) -> None Register <code>hook</code> to run once, newest first, at the start of close().
on_run_end function (self, hook: Callable[[], object]) -> None Register cleanup for every run, including failed script execution.
run function (self, path: str | Path) -> Stage Execute an owned script, recording exits and restoring output streams.
wrap function (self, callback: Callable) -> Callable Retain this context for a callback invoked after the script returns.