Python Script Execution
Python4j Python Script Execution
Script execution overview
Initialization
Python variable input and output
try(PythonGIL pythonGIL = PythonGIL.lock()) {
List<PythonVariable> inputs = new ArrayList<>();
inputs.add(new PythonVariable<>("x", PythonTypes.STR, "Hello "));
inputs.add(new PythonVariable<>("y", PythonTypes.STR, "World"));
String code = "print(x + y)";
PythonExecutioner.exec(code, inputs, null);
}Execution in a multi threaded environment
Was this helpful?