def load(jar): def _load(abspath): if os.path.exists(abspath): if not abspath in sys.path: sys.path.append(abspath) return True return False if _load(jar): return True path = getBundlePath() if path: jarInBundle = os.path.join(path, jar) if _load(jarInBundle): return True path = ExtensionManager.getInstance().getLoadPath(jar) if path and _load(path): return True return False
def load(jar): import os from org.sikuli.script import ExtensionManager def _load(abspath): if os.path.exists(abspath): if not abspath in sys.path: sys.path.append(abspath) return True return False if _load(jar): return True path = getBundlePath() if path: jarInBundle = path + java.io.File.separator + jar if _load(jarInBundle): return True path = ExtensionManager.getInstance().getUserExtPath() jarInExtPath = path + java.io.File.separator + jar if _load(jarInExtPath): return True return False