Loads the template into memory for further processing.
If you prefer lazy-evaluation, do not call this method. Instead, run the desired operations with the template, and the necessary resources will be loaded on-the-fly. Use this method only if you really want to preload the template.
Source code in src/officialeye/_api/template/template.py
| def load(self) -> None:
"""
Loads the template into memory for further processing.
If you prefer lazy-evaluation, do not call this method.
Instead, run the desired operations with the template, and the necessary resources will be loaded on-the-fly.
Use this method only if you really want to preload the template.
"""
if self._external_template is not None:
# the template has already been loaded, nothing to do
return
# noinspection PyProtectedMember
future = self._context._submit_task(template_load, "Loading template...", self._path)
self._external_template = future.result()
assert self._external_template is not None
assert isinstance(self._external_template, ExternalTemplate)
|