I have a pretty simple python class that preprocesses some files, after which I want to read those files into java. The Python class looks like this
class Preprocess(object):
dataFolder = None
prepFolder = None
def __init__(self, dataFolder, prepFolder):
self.dataFolder = dataFolder
self.prepFolder = prepFolder
def preprocess(self):
*Do some complex preprocess shizzle*
Intuitively I would type something like this.
public class Main {
public static void main(String[] args) {
String dataFolder,prepFolder;
PythonInterpreter py = new PythonInterpreter();
PyClass prep = new PyClass("Preprocess",new PyString(dataFolder),new PyString(prepFolder));
prep.callMethod("preprocess");
}
}
Now this obviously doesn't work. How would I have to use the PythonInterpreter for this to work?