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
Simply add the following:
from sys import * path_to_current_file = sys.argv[0] print(path_to_current_file)
Or:
from sys import * print(sys.argv[0])