New submission from tzellman <tzellman+jython@...>:
I am using the Jython 2.5 release posted on SourceForge.
I am embedding the interpreter inside my Java code.
Code that worked perfectly under Jython 2.2 is now failing with an
ImportError. Jython is failing to find Java-based modules after I import
* from a parent package. For example:
from my.java.package import *
from my.java.package.checks import *
from my.java.package.actions import *
Jython fails with this error message:
"ImportError: No module named checks"
If I instead strip out the * imports and import objects directly from
the modules, everything works normally.
A little more insight into what I am doing: I create the interpreter,
then pass it a string of Python code that essentially loads a
directory/module where Jython plug-in scripts are located. Those scripts
then import java modules available within the current Java process.
----------
components: Library
messages: 4824
nosy: tzellman
severity: normal
status: open
title: odd behavior when importing * from Java packages/modules when using the embedded interpreter
type: behaviour
_______________________________________
Jython tracker <report@...>
<http://bugs.jython.org/issue1383>
_______________________________________
|