My python File has the code as:
class myPythonClass():
def abc(self):
print "calling abc"
tmpb = {}
tmpb = {'status' : 'SUCCESS'}
return tmpb
and my java code is:
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.execfile("/home/Desktop/abc.py");
interpreter.set("myvariable", file1);
PyObject answer = interpreter.eval("myPythonClass().abc(myvariable)");
System.out.println(answer.toString());
In my python file if i dont give brackets for class name then my java code executes python file.
But if my python file starts with class myPythonClass():
then its not working.
Can anyone help me out in this?