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
All Methods Static Methods Instance Methods Concrete Methods 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 Detail
-
get
public static JythonSupport 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
public boolean interpreterRedirect(PrintStream stdout, PrintStream stderr)
-
interpreterExecString
public boolean interpreterExecString(String script)
-
interpreterExecCode
public void interpreterExecCode(File compiledScript)
-
interpreterExecFile
public void interpreterExecFile(String script)
-
getSysPath
public void getSysPath()
-
setSysPath
public void setSysPath()
-
addSysPath
public void addSysPath(File fFolder)
-
addSysPath
public void addSysPath(String fpFolder)
-
appendSysPath
public void appendSysPath(String fpFolder)
-
putSysPath
public void putSysPath(String fpFolder, int n)
-
insertSysPath
public void insertSysPath(File fFolder)
-
removeSysPath
public void removeSysPath(File fFolder)
-
hasSysPath
public boolean hasSysPath(String fpFolder)
-
getSysPathEntry
public int getSysPathEntry(File fFolder)
-
showSysPath
public void showSysPath()
-
addSitePackages
public void addSitePackages()
-
reloadImported
public void reloadImported()
-
prepareRobot
public boolean prepareRobot()
-
getCurrentLine
public String getCurrentLine()
-
runJar
public int runJar(String fpJarOrFolder)
-
checkCallback
public boolean checkCallback(Object[] args)
-
runLoggerCallback
public boolean runLoggerCallback(Object[] args)
-
runObserveCallback
public boolean runObserveCallback(Object[] args)
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
public boolean runCallback(Object[] args)
-
-