Issue2059

classification
Title: Jython 2.7a2-cannot import name BlockingIOError
Type: behaviour Severity: normal
Components: Library Versions: Jython 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: jiang_dsa
Priority: Keywords:

Created on 2013-06-06.08:22:44 by jiang_dsa, last changed 2013-06-06.08:22:44 by jiang_dsa.

Files
File name Uploaded Description Edit Remove
Screenshot-2013-06-06 16:08:51.png jiang_dsa, 2013-06-06.08:22:43
Messages
msg8040 (view) Author: yunpeng jiang (jiang_dsa) Date: 2013-06-06.08:22:43
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_dsacreate