Is it possible for me to import the file "imagensAlertLoginExist.py" into the file "alertLogin.py"? If possible how do I import?
I had never experienced this problem, so I always made my imports like this:
from folder1.folder2 import file
or:
from folder1.folder2.file import class
or like this:
from folder1.folder2.file import method
However, the file I want to import (imagesAlertLoginExist.py) is not in the same folder or level below my main code (alertLogin.py), therefore, this file (imagesAlertLoginExist.py) is not visible to my main code. How do I, when importing, specify that the module I want to import is in a folder above?
Taking the minimum example into consideration, it is as if the module I want to import was in folder0.
file structure:
main.py
templates
images
alertLoginExist
imagensAlertLoginExist.py
interfaces
alertLogin.py