tags:

views:

90

answers:

1

Hi,

I need to call a function from a python script and pass in parameters into it. I have a test python script which I can call and run from java using Jepp - this then adds the person.

Eg Test.py

import Finding
from Finding import *

f = Finding()
f.addFinding("John", "Doe", 27)

Within my Finding class I have addFinding(firstname, lastName, age)

However, I wish to be able to do this from within java. Should I be using the jep.invoke() method. Does anyone have a hello world example of such a thing being done or forward me to some good examples?

Does anyone have any suggestions please?

Thanks in advance

A: 

Easier way to run python code in java is to use jython.

EDIT: Found an article with examples in the jython website.

nosklo