This may seem like a newbie question, but it is not. Some common approaches don\'t work in all cases:
This means using path = os.path.abs
path = os.path.abs
First, you need to import from inspect and os
inspect
os
from inspect import getsourcefile from os.path import abspath
Next, wherever you want to find the source file from you just use
abspath(getsourcefile(lambda:0))