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
this solution is robust even in executables
import inspect, os.path filename = inspect.getframeinfo(inspect.currentframe()).filename path = os.path.dirname(os.path.abspath(filename))