1 Mar 19:54
Re: looking for jython tutorial for importing non-standard library java class
Andrea <mariofutire <at> googlemail.com>
2009-03-01 18:54:54 GMT
2009-03-01 18:54:54 GMT
Andrea wrote:
>
> import sys
> sys.path.append('/home/andrea/foo/jython/andrea.jar')
> import org
> t=org.foo.Test()
> print t
> print t.print()
>
I've tried
import org.foo.Test
>>>> ImportError: No module named foo
import org.foo
>>>> ImportError: No module named foo
from org.foo import Test
>>>> ImportError: No module named foo
But I've discovered that if I use a different name org->com it works.
Originally I thought that the first part of the package had to be a new name, but now I have a
different view
If, at that point (with "org", after the above errors), I do "import xyz" I get
>>> import xyz
*sys-package-mgr*: processing new jar, '/home/andrea/foo/jython/andrea.jar')
Traceback (most recent call last):
(Continue reading)
RSS Feed