import urllib.parse returns "ImportError:No module named parse" for jython 2.7.0
Question: I am using jython 2.7.0 with Java 1.7.0_45 on Windows 7. I call my module with
the following Java code

    
    
        try{
            python.exec("import sys");
            python.exec("sys.path.append('c:/Python')");
            python.exec("import myModule");
            python.set("var1", new PyString(remote));
            python.exec("myModule.score(var1)");
        } catch (org.python.core.PyException e) {
            System.out.println (e.toString()); 
            System.out.println ("\n");           
        }
    

The Python code for myModule.score begins with

    
    
    import json
    import urllib.parse
    

This causes the error

    
    
    import urllib.parse
    ImportError: No module named parse
    

I am suspecting this is related to Python's format changing between versions
and functions becoming deprecated. I was wondering if someone knew which
version of Python jython 2.7.0 uses and what the correct syntax would be to
call urllib.parse (which works fine in Python 3.5).


Answer: Jython 2.7 uses the Python 2.7 standard library. The version number is
specifically designed to correlate with the CPython version number.

