Hello,
I'm trying to execute a Python script from a Java class using Jython. I'm running into the following error:
Exception in thread "main" Traceback (innermost last):
File "<string>", line 1, in ?
File "C:\PorkyPortal\diagram-generator\.\tilemaker.py", line 13, in ?
ImportError: no module named PIL
I've tried to solve the problem with these instructions:
http://jython.sourceforge.net/cgi-bi...=faq06.002.htp
Here is the code I'm using:
PythonInterpreter interp = new PythonInterpreter();
Properties props = new Properties();
props.setProperty("python.path", "C:\\Python24\\Lib; C:\\Python24\\Lib\\site-packages\\PIL; C:\\Python24\\Scripts\\");
PythonInterpreter.initialize(System.getProperties( ), props, new String[] {""});
interp.exec("import tilemaker");
interp.exec("import Image");
interp.exec("import glob");
interp.exec("img = tilemaker.prepare(AlternateExample.png, FFFFFF, chatty = False);");
interp.exec("img2 = tilemaker.subdivide(img, level = 0, quadrant=(0, 0), size=(128, 128),filename=outputName + '-%d-%d-%d.jpg', quality = None, chatty = False)");
Any suggestions?