Geert Vancompernolle wrote:
I have the following path construction: ...
./src/__init__.py
/main.py
/modules/__init__.py
/application.py
/ui/__init__.py
/mainwindow/__init__.py
/mainwindow.py
I want to call ... 'MainWindow' in module 'mainwindow', from 'application'.
I'm having the following import statement in 'applications.py':
from .. ui.mainwindow.mainwindow import MainWindow
If you run the application with the command:
python -m src.modules.application ...
rather than
python src/modules/application.py ...
your import should work.
You need to make the package layering to application explicit.
Similarly, you can start Idle with:
python -m idlelib.idle ...
--Scott David Daniels
[email protected]
--
http://mail.python.org/mailman/listinfo/python-list