본문 바로가기

Python

Change working directory to current location

반응형

    abspath = os.path.dirname(os.path.realpath(__file__))
    os.chdir(Path(abspath).absolute())