I have a python component that works independently and runs as a windows service. A particular file of this python does a specific job which i need to invoke using my java class. Since it's a production environment, .py file is not provided. To invoke a method "run" from .py file i am using the below code:
PyInterpreter py = new PyInterpreter();
py.execfile("C:\\Users\\narendrar\\Desktop\\hello.py");
PyInstance hello = py.createClass("Hello", "None");
hello.invoke("run");
I want to perform similar operation, but with a compiled python file.