I have a messages folder(package) with __init__.py file and another module messages_en.py inside it. In __init__.py if I import
__init__.py
messages_en.py
Adding the globals argument is sufficient for me:
__import__('messages_en', globals=globals())
In fact, only __name__ is needed here:
__name__
__import__('messages_en', globals={"__name__": __name__})