fontlab_glyport.execution.ExecutionContext · declarations 001
Back to fontlab_glyport.execution.ExecutionContext
__enter__
__enter__()
__exit__
__exit__(exc_type, exc, tb)
__init__
__init__(source_root: str | Path, profile: str, adapters: dict[str, Callable[[], ModuleType]] | None = None, *, sink: Callable[[str], object] | None = None, cache_dir: str | Path | None = None, shared_globals: bool = False, dependency_paths: tuple[Path, ...] = (), implicit_imports: tuple[str, ...] = ()) -> None
cancel
cancel() -> None
Signal cooperative cancellation to owned external process operations.
close
close() -> None
Run close hooks, then unload retained modules; repeated calls are harmless.
Hooks run while the context is still usable (wrap works). A failing
hook, even one exiting the process, does not stop later hooks or
teardown. Afterwards the first process exit/interrupt is re-raised as
is; otherwise PartialFailure carries every hook error in run order.
configure_cocoa
configure_cocoa(request: str) -> None
Choose native imports after host adapter construction, before execution.
import_module
import_module(name: str, package: str | None = None) -> ModuleType
on_close
on_close(hook: Callable[[], object]) -> None
Register hook to run once, newest first, at the start of close().
on_run_end
on_run_end(hook: Callable[[], object]) -> None
Register cleanup for every run, including failed script execution.
run
run(path: str | Path) -> Stage
Execute an owned script, recording exits and restoring output streams.
wrap
wrap(callback: Callable) -> Callable
Retain this context for a callback invoked after the script returns.