I have got a problem with relative import while developing an application that contains two packages I implemented, one for functionality and other for GUI.
Here's the actual application "architecture" layout:
main.py
functionality/
|__init__.py
|functionality.py
|config/
|__init__.py
|conf.py
gui/
|__init__.py
|gui.py
I import the config
module inside the functionality.py
file and use it without any problem. But when I import the functionality module to the main.py
file and run it, I get the following error:
from config import conf
ImportError: No module named 'config'
I have searched for this problem and read several Python books, but I didn't find any solution.
Thank you in advance!