import problems with jython 2.5

View: New views
1 Messages — Rating Filter:   Alert me  

import problems with jython 2.5

by Guy Avni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hello

 

I’ve recently moved from jython 2.2 to 2.5 and running into import troubles:

 

I added “ -Dpython.path=”<path to my library>” “ at  the bottom of the jython file (as the end of the line that starts with “${JAVA_CMD[@]} $JAVA_OPTS …”

 

And tried ran into trouble doing the following:

 

== file a.py ==

Import <lib>.b as b

 

Def a(): …

 

== file b.py ==

Import <lib>.a as a

 

Def b(): …

 

== command line ==

Import a

 

The output was:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "b.py", line 1, in <module>
    import <lib>.a as a
  File "<path to lib>/a.py", line 1, in <module>
    import <lib>.b as b
  File "<path to lib>/b.py", line 1, in <module>
    import <lib>.a as a
AttributeError: 'module' object has no attribute 'a'

 

Am I doing something wrong or is this a bug in jython 2.5 (the same code worked in jython 2.2)

 

thanks

Guy


------------------------------------------------------------------------------

_______________________________________________
Jython-users mailing list
Jython-users@...
https://lists.sourceforge.net/lists/listinfo/jython-users