I have the following directory structure
foo/
__init__.py
settings.py
bar/
__init__.py
myfile.py
In myfile.py I have:
import settings
I get the following error: ImportError: No module named settings
, why? How can I efectively import the settings
file from myfile.py
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…