Message1517
A "$_PyInner.class" file can be generated by jythonc. In Jython 2.2 beta 1 if you have one of these files in a Python package directory, then the directory is treated as a Java package and none of the "__init__.py" files in the directory are executed. (I do not believe that a directory that contains both ".class" files and ".py" will successfully import either.)
The problem is the org.python.core. PathPackageManager.PackageExistsFileFilter.accept() method. This method is called with each file in the directory. If the file name ends with ".class", then the directory is treated as a Java package. If the file name ends with either ".py" or "$py.class", then the directory is treated as a Python package. The accept method needs to also test to see if the file name ends with "$_PyInner.class" like this:
public boolean accept(File dir, String name) {
if (name.endsWith(".py") || name.endsWith("$py.class") || name.endsWith("$_PyInner.class")) {
this.python = true;
} else if (name.endsWith(".class")) {
this.java = true;
}
return false;
}
|
|
Date |
User |
Action |
Args |
2008-02-20 17:17:46 | admin | link | issue1671373 messages |
2008-02-20 17:17:46 | admin | create | |
|