Package org.sikuli.script.runners
Class JythonRunner
java.lang.Object
org.sikuli.script.runners.AbstractScriptRunner
org.sikuli.script.runners.AbstractLocalFileScriptRunner
org.sikuli.script.runners.JythonRunner
- All Implemented Interfaces:
IScriptRunner
- Direct Known Subclasses:
RobotRunner
public class JythonRunner extends AbstractLocalFileScriptRunner
Executes Sikuliscripts written in Python/Jython.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.sikuli.script.support.IScriptRunner
IScriptRunner.EffectiveRunner, IScriptRunner.Options -
Field Summary
-
Constructor Summary
Constructors Constructor Description JythonRunner() -
Method Summary
Modifier and Type Method Description voiddoClose()protected intdoEvalScript(String script, IScriptRunner.Options options)protected voiddoInit(String[] param)protected booleandoRedirect(PrintStream stdout, PrintStream stderr)protected voiddoRunLines(String lines, IScriptRunner.Options options)protected intdoRunScript(String scriptFile, String[] argv, IScriptRunner.Options options)Executes the jythonscriptString[]getExtensions()returns the list of possible script file extensions, first is the defaultString[]getFileEndings()Usually the same as getExtensions() but with the leading dot.StringgetName()Gets the name of the ScriptRunner.StringgetType()return the type of script this handler can execute.booleanisAbortSupported()Checks if abort is supported by this script runner implementation.booleanisSupported()Checks if the current platform supports this runner.Methods inherited from class org.sikuli.script.runners.AbstractLocalFileScriptRunner
canHandle, prepareFileLocationMethods inherited from class org.sikuli.script.runners.AbstractScriptRunner
abort, canHandleFileEnding, close, doAbort, evalScript, execAfter, execBefore, getDefaultExtension, getEffectiveRunner, hasExtension, init, isAborted, isReady, isRunning, log, redirect, reset, runLines, runScript
-
Field Details
-
NAME
- See Also:
- Constant Field Values
-
TYPE
- See Also:
- Constant Field Values
-
EXTENSIONS
-
-
Constructor Details
-
JythonRunner
public JythonRunner()
-
-
Method Details
-
isSupported
public boolean isSupported()Checks if the current platform supports this runner.- Specified by:
isSupportedin interfaceIScriptRunner- Overrides:
isSupportedin classAbstractScriptRunner- Returns:
- true if platform supports this runner, false otherwise
-
getName
Gets the name of the ScriptRunner. Should be unique. This value is needed to distinguish between different ScriptRunners.- Returns:
- Name to identify the ScriptRunner or null if not available
-
getExtensions
returns the list of possible script file extensions, first is the default- Returns:
- array of strings
-
getType
Description copied from interface:IScriptRunnerreturn the type of script this handler can execute.- Returns:
-
isAbortSupported
public boolean isAbortSupported()Description copied from interface:IScriptRunnerChecks if abort is supported by this script runner implementation.- Specified by:
isAbortSupportedin interfaceIScriptRunner- Overrides:
isAbortSupportedin classAbstractScriptRunner- Returns:
- true is abort is supported, false otherwise
-
getFileEndings
Description copied from interface:IScriptRunnerUsually the same as getExtensions() but with the leading dot.Some files (e.g. $py.class) might have a somewhat unusual but very specific file ending.
- Specified by:
getFileEndingsin interfaceIScriptRunner- Overrides:
getFileEndingsin classAbstractScriptRunner- Returns:
- An Array containing the supported line endings
-
doInit
- Overrides:
doInitin classAbstractScriptRunner
-
doClose
public void doClose()- Overrides:
doClosein classAbstractScriptRunner
-
doEvalScript
- Overrides:
doEvalScriptin classAbstractScriptRunner
-
doRunScript
Executes the jythonscript- Overrides:
doRunScriptin classAbstractScriptRunner- Parameters:
scriptFile-argv- arguments to be populated into sys.argvoptions-- Returns:
- The exitcode
-
doRunLines
- Overrides:
doRunLinesin classAbstractScriptRunner
-
doRedirect
- Overrides:
doRedirectin classAbstractScriptRunner
-