Interface PythonEvaluator

All Known Implementing Classes:
PythonEvaluatorJpy

public interface PythonEvaluator
The PythonEvaluator encapsulates the evaluation around a Python library instance.
  • Method Details

    • evalStatement

      void evalStatement(String s)
      Evaluate the provided statement. Not suitable for use with scripts; because multiple statements will be ignored.
      Parameters:
      s - the string to evaluate
    • evalScript

      void evalScript(String s)
      Evaluate the provided statements. If you've got a multi-line script; you must use this version.
      Parameters:
      s - the string to evaluate
    • runScript

      void runScript(String scriptFile) throws FileNotFoundException
      Runs a Python script.
      Parameters:
      scriptFile - the file to execute
      Throws:
      FileNotFoundException - if scriptFile was not found
    • set

      void set(String name, Object value)
      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.