All docs
Runtime·
function
find_runtime
locate the installed LSD runtime, or return None
Python
find_runtime(env: Optional[Mapping[str, str]] = None) -> Optional[Runtime]
Returns Runtime | None — the discovered install, or None if not located
Parameters#
| name | type | default | description |
|---|---|---|---|
env |
Optional[Mapping[str, str]] |
None |
environment to search; defaults to os.environ. Pass a dict to override (used in tests) |
Example#
Python
from lsdtools import find_runtime
rt = find_runtime()
if rt is None:
raise SystemExit("LSD is not installed")
print(rt.executable)
Override the environment (e.g. in tests):
Python
rt = find_runtime({"LSD_RUNTIME": r"C:\LSD Desktop"})
Notes#
Search order, first hit wins: the LSD_RUNTIME / LSD_HOME env vars, Windows registry uninstall
entries named "LSD Desktop", well-known install dirs (%ProgramFiles%\LSD Desktop …), then an
LSDCli / LSDDesktop executable on PATH. Returns None when nothing matches. Cross-platform
safe — the registry step is skipped off Windows.
See also#
API: Runtime · source · executable
Guides: Install LSD · CLI commands
By LSD Team · Last updated Jul 17, 2026
Ask on Discord
View as Markdown