Package com.illumon.iris.db.util
Interface PythonEvaluator
- All Known Implementing Classes:
PythonEvaluatorJpy
public interface PythonEvaluator
The
PythonEvaluator encapsulates the evaluation around a Python library instance.-
Method Summary
Modifier and TypeMethodDescriptionvoidevalScript(String s) Evaluate the provided statements.voidEvaluate the provided statement.Gets the Python interpreter version string.voidRuns a Python script.voidSets the variable within our session.
-
Method Details
-
evalStatement
Evaluate the provided statement. Not suitable for use with scripts; because multiple statements will be ignored.- Parameters:
s- the string to evaluate
-
evalScript
Evaluate the provided statements. If you've got a multi-line script; you must use this version.- Parameters:
s- the string to evaluate
-
runScript
Runs a Python script.- Parameters:
scriptFile- the file to execute- Throws:
FileNotFoundException- if scriptFile was not found
-
set
Sets the variable within our session.- Parameters:
name- the name of the variable to set.value- the value of the variable.
-
getPythonVersion
String getPythonVersion()Gets the Python interpreter version string.- Returns:
- The Python interpreter version string.
-