Let say I have a file a/b/c.py with following content.
import mymodule
a = mymodule.MyClass()
print(a.scriptpath)
I want a.scriptpath to print a/b/c.py. Essentially, what I am asking: Is there a way for MyClass.__init__ or mymodule.__init__.py to know from which file they are being called?