# -*- coding: utf-8 -*- from pathlib import Path import sys HERE = Path(__file__).resolve().parent SCRIPTS_ROOT = HERE.parent ROOT = HERE.parents[1] if str(ROOT).startswith("/opt/workbuddy") or str(HERE).startswith("/opt/workbuddy"): ROOT = Path("/opt/workbuddy") for p in (HERE, SCRIPTS_ROOT, ROOT): s = str(p) if s not in sys.path: sys.path.insert(0, s)