I’m trying to run a python script from a different location than where it is located but I need to reference files where the python script is located. I tried the following:
os.chdir(os.getcwd())
But unfortunately that gets the current working dir of where I ran the script from, not where the script currently lives.
Thanks
You can use
to get the directory your script is located in.