2
I have the following structure on a project
PacoteRaiz/
__init__.py
Pacote1/
__init__.py
Modulo1.py
Pacote2/
__init__.py
Modulo2.py
If I want to use some function that is inside Modulo1.py in Modulo2.py, how should I proceed? I tried to do this within Modulo2.py
from PacoteRaiz.Pacote1 import Modulo1
This gives error, "Import: No module named Pacoteroot/Pacote1/Modulo1". Does anyone know how to do it correctly?
Hello! Very grateful to answer! Well, I did what you said and gave the same mistake! Giving a read on the Internet, I need to add in sys.path the directory where the application is hosted?
– julien nascimento
Hello, really what was missing was to add to sys,path the package paths and your reply helped to arrive at the expected result, thank you!
– julien nascimento