I have a messages folder(package) with __init__.py
file and another module messages_en.py
inside it. In __init__.py
if I import
If it is a path problem, you should use the level
argument (from docs):
__import__(name, globals={}, locals={}, fromlist=[], level=-1) -> module
Level is used to determine whether to perform
absolute or relative imports. -1 is the original strategy of attempting
both absolute and relative imports, 0 is absolute, a positive number
is the number of parent directories to search relative to the current module.