10"""In-process Python run of inp/input.json (generated by ./run.sh / the C++ driver)."""
12from __future__
import annotations
15from pathlib
import Path
17HERE = Path(__file__).resolve().parent
21 for p
in [HERE, *HERE.parents]:
22 if (p /
"python" /
"peridem" /
"__init__.py").is_file():
24 raise SystemExit(
"PeriDEM repo root not found")
28sys.path.insert(0, str(ROOT /
"python"))
29for _b
in (ROOT /
"build/linux/python", ROOT /
"build/python"):
30 if (_b /
"peridem").is_dir():
31 sys.path.insert(0, str(_b))
34from peridem.__main__
import example_script
39 default_deck=
"inp/input.json",