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
My solution is:
import os print(os.path.dirname(os.path.abspath(__file__)))