Message8040

Author jiang_dsa
Recipients jiang_dsa
Date 2013-06-06.08:22:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1370506964.25.0.259346438808.issue2059@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2013-06-06 08:22:44jiang_dsasetrecipients: + jiang_dsa
2013-06-06 08:22:44jiang_dsasetmessageid: <1370506964.25.0.259346438808.issue2059@psf.upfronthosting.co.za>
2013-06-06 08:22:44jiang_dsalinkissue2059 messages
2013-06-06 08:22:43jiang_dsacreate