Class PythonScriptExecutor

java.lang.Object
org.springframework.integration.scripting.jsr223.AbstractScriptExecutor
org.springframework.integration.scripting.jsr223.PythonScriptExecutor
All Implemented Interfaces:
ScriptExecutor

public class PythonScriptExecutor extends AbstractScriptExecutor
A ScriptExecutor that implements special handling required for Python to emulate behavior similar to other JSR223 scripting languages.

Script evaluation using the Jython implementation results in a null return value for normal variable expressions such as x=2. As a work around, it is necessary to get the value of 'x' explicitly following the script evaluation. This class performs simple parsing on the last line of the script to obtain the variable name, if any, and return its value.

Since:
2.1
Author:
David Turanski, Gary Russell
  • Constructor Details

    • PythonScriptExecutor

      public PythonScriptExecutor()
  • Method Details