Python – Change to Current Script Directory Posted onMarch 6, 2019July 12, 2022AuthorMrNetTek Change directory to where script is running cwd = os.path.dirname(os.path.realpath(__file__)) os.chdir(cwd)