Let's suppose I have the following file hierarchy:
program/
├─ main.py
└─ util/
└─ settings.py
main.py has the following import:
import .util.settings
Is there any way for code in settings.py to determine the path of the module that imported it (main.py)?