Files
simple/pysim_simple_server/shell.py
T
catarrh ac18c3e2cf rename OTAMan → SIMple (v2.3.0)
- package pysim_otaman_server → pysim_simple_server; distribution and
  console script pysim-otaman-server → pysim-simple-server
- PWA branding SIMple: title, header, manifest, help EN/RU, GitHub links
- localStorage keys otaman_* → simple_* (clean break, no migration)
- export filenames simple-cards.json / simple-custom-files.json
- service worker cache simple-v189
- README/docs/setup/start scripts updated; no 'otaman' left in the tree
2026-09-19 08:25:20 +03:00

22 lines
717 B
Python

import importlib.util
import os
import sys
def load_pysim_app():
import pySim
pysim_dir = os.path.dirname(pySim.__file__)
candidates = [
os.path.join(os.path.dirname(pysim_dir), 'pySim-shell.py'),
os.path.join(os.path.dirname(sys.executable), 'pySim-shell.py'),
]
for path in candidates:
if os.path.exists(path):
spec = importlib.util.spec_from_file_location("pySim_shell", path)
mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(mod)
return mod
raise ImportError(
"pySim-shell.py not found. Make sure pysim is installed "
"(pip install pysim) and pySim-shell.py is on the PATH."
)