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
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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."
|
||||
)
|
||||
Reference in New Issue
Block a user