A variable isDevelopment
is inside the manager/__init__.py
file:
isDevelopment = True
Within the same directory a file fusion.py
attempts to import it at the file level:
from . import isDevelopment
Note: pycharm
is ambivalent to it: the import is not flagged in any case:
When attempting to import it from some other location e.g. ..
pycharm does complain:
When running
python3 manager/fusion.py
the following occurs:
ImportError: cannot import name 'isDevelopment' from '__main__'
Another attempt per one of the suggestions:
from ..manager import isDevelopment
This results in:
ValueError: attempted relative import beyond top-level package
Why is this attempted import
not working - and what needs to be changed?