Message8040
java test code:
import java.io.IOException;
import java.util.Properties;
import org.python.core.Py;
import org.python.core.PyString;
import org.python.core.PySystemState;
import org.python.util.PythonInterpreter;
public class Tester {
public static void main(String[] args) throws IOException {
Properties props = new Properties();
Properties baseProps = PySystemState.getBaseProperties();
props.put("python.path", "/duitang/dist/sys/jython/Lib");
props.put("python.home", "/duitang/dist/sys/jython");
PySystemState.initialize(baseProps, props, new String[0]);
PySystemState sys = new PySystemState();
PythonInterpreter interp = new PythonInterpreter(Py.newStringMap(), sys);
String rootPath = "/duitang/dist/app/trunk/java/japa/src/main/webapp";
sys.path.append(new PyString(rootPath));
interp.exec("import gzip");
}
}
error message:
Exception in thread "main" Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/duitang/dist/sys/jython/Lib/gzip.py", line 10, in <module>
import io
File "/duitang/dist/sys/jython/Lib/io.py", line 63, in <module>
from _io import (DEFAULT_BUFFER_SIZE, BlockingIOError, UnsupportedOperation,
ImportError: cannot import name BlockingIOError |
|
Date |
User |
Action |
Args |
2013-06-06 08:22:44 | jiang_dsa | set | recipients:
+ jiang_dsa |
2013-06-06 08:22:44 | jiang_dsa | set | messageid: <1370506964.25.0.259346438808.issue2059@psf.upfronthosting.co.za> |
2013-06-06 08:22:44 | jiang_dsa | link | issue2059 messages |
2013-06-06 08:22:43 | jiang_dsa | create | |
|