From: Ruud v. d. B. <re...@bu...> - 2019-11-19 12:52:30
|
New submission from Ruud van den Brink <ru...@si...>: 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 ---------- messages: 12778 nosy: ruud severity: major status: open title: Regression error on module import type: crash versions: Jython 2.7.2 _______________________________________ Jython tracker <re...@bu...> <https://bugs.jython.org/issue2832> _______________________________________ |