Duplicate of: In Python, how do I get the path and name of the file that is currently executing?
I would like to find out the path to the currently executing script. I have tried os.getcwd() but that only returns the directory I ran the script from not the actual directory the script is stored.