Package org.sikuli.script.runnerSupport
Class JythonSupport
java.lang.Object
org.sikuli.script.runnerSupport.JythonSupport
- All Implemented Interfaces:
IRunnerSupport
public class JythonSupport extends Object implements IRunnerSupport
-
Method Summary
Modifier and Type Method Description voidaddSitePackages()voidaddSysPath(File fFolder)voidaddSysPath(String fpFolder)voidappendSysPath(String fpFolder)booleancheckCallback(Object[] args)voidexecuteScriptHeader(List<String> codeBefore)FileexistsSysPathJar(String fpJar)FileexistsSysPathModule(String modname)intfindErrorSource(Throwable throwable, String filename)StringfindModule(String modName, Object packPath, Object sysPath)static JythonSupportget()StringgetCurrentLine()List<String>getSysArgv()voidgetSysPath()intgetSysPathEntry(File fFolder)booleanhasSysPath(String fpFolder)voidinsertSysPath(File fFolder)voidinterpreterCleanup()voidinterpreterClose()ObjectinterpreterEval(String expression)voidinterpreterExecCode(File compiledScript)voidinterpreterExecFile(String script)booleaninterpreterExecString(String script)voidinterpreterFillSysArgv(File pyFile, String[] argv)org.python.util.PythonInterpreterinterpreterGet()For experts, who want to tweak the Jython interprter instance
Usage: org.sikuli.script.runnerSupport.JythonSupport.get().interpreterGet()booleaninterpreterRedirect(PrintStream stdout, PrintStream stderr)static booleanisSupported()Stringload(String fpJarOrFolder)Stringload(String fpJar, boolean scriptOnly)StringloadModulePrepare(String modName, String modPath)voidlog(int level, String message, Object... args)booleanprepareRobot()voidputSysPath(String fpFolder, int n)voidreloadImported()voidremoveSysPath(File fFolder)booleanrunCallback(Object[] args)intrunJar(String fpJarOrFolder)intrunJar(String fpJarOrFolder, String imagePath)booleanrunLoggerCallback(Object[] args)booleanrunObserveCallback(Object[] args)Run callback for observers.voidsetSysArgv(List<String> args)voidsetSysPath()voidshowSysPath()
-
Method Details
-
log
-
get
-
isSupported
public static boolean isSupported() -
interpreterGet
public org.python.util.PythonInterpreter interpreterGet()For experts, who want to tweak the Jython interprter instance
Usage: org.sikuli.script.runnerSupport.JythonSupport.get().interpreterGet()- Returns:
- the singleton Jython interpreter instance (org.python.util.PythonInterpreter)
-
interpreterCleanup
public void interpreterCleanup() -
interpreterClose
public void interpreterClose() -
interpreterRedirect
-
interpreterEval
-
interpreterExecString
-
interpreterExecCode
-
interpreterExecFile
-
executeScriptHeader
-
getSysPath
public void getSysPath() -
setSysPath
public void setSysPath() -
addSysPath
-
addSysPath
-
appendSysPath
-
putSysPath
-
insertSysPath
-
removeSysPath
-
hasSysPath
-
getSysPathEntry
-
showSysPath
public void showSysPath() -
addSitePackages
public void addSitePackages() -
reloadImported
public void reloadImported() -
findModule
-
loadModulePrepare
-
existsSysPathModule
-
existsSysPathJar
-
interpreterFillSysArgv
-
getSysArgv
-
setSysArgv
-
prepareRobot
public boolean prepareRobot() -
getCurrentLine
-
findErrorSource
-
runJar
-
runJar
-
load
-
load
-
checkCallback
-
runLoggerCallback
-
runObserveCallback
Description copied from interface:IRunnerSupportRun callback for observers.- Specified by:
runObserveCallbackin interfaceIRunnerSupport- Parameters:
args- is array for two elements. First is a callback object. Second is an event.- Returns:
- true if the callback was ran correctly. False in other cases.
-
runCallback
-