I am trying to execute class and functions written in python from java via jython. It runs fine until in python we encountered "import clr" which is pythonnet.
Can anyone tell how to run the python scripts from java using jython or any thing else which use "import clr"
python code: file.py
import clr
java code using jython:
Properties props = new Properties();
Properties preprops = System.getProperties();
PythonInterpreter.initialize(preprops, props, new String[0]);
PythonInterpreter interp = new PythonInterpreter();
interp.exec("<absoulute_path//file.py>");
Error:
Exception in thread "main" Traceback (most recent call last):
File "<string>", line 3, in <module>
ImportError: No module named clr
Jython does not provide Python C APIs, so there's no way you could build and use Python.NET with it.