Message12778

Author ruud
Recipients ruud
Date 2019-11-19.12:52:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1574167933.15.0.698699708178.issue2832@roundup.psfhosted.org>
In-reply-to
Content
There seems to be something broken with file handling in modules; below I isolated the problem:
 - create a subfolder 'test'
 - in the folder test, touch an __init__.py 
 - in the folder test, create a file 'trial.py' with the following contents:

from __future__ import print_function
def hello():
    print('Hello world!')

Now run Jython:
java -Dpython.console -jar Jython-standalone-2.7.2b2.jar
>>> import test
>>> test.trial.hello()
Traceback (most recent call last):
  File "<stdin>", line 1 in <module>
AttributeError: module' object has no attribute 'trial'

With Jython 2.7.1 (or 2.7.2a1):
java -Dpython.console -jar Jython-standalone-2.7.1.jar
>>> import test
>>> test.trial.hello()
Hello World!
>>> 


Using Jython standalone on [Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_231 / Windows 7
History
Date User Action Args
2019-11-19 12:52:13ruudsetrecipients: + ruud
2019-11-19 12:52:13ruudsetmessageid: <1574167933.15.0.698699708178.issue2832@roundup.psfhosted.org>
2019-11-19 12:52:13ruudlinkissue2832 messages
2019-11-19 12:52:12ruudcreate