gMAC os get path of current folder code example Example: pathlib path get directory of current file import pathlib pathlib.Path(__file__).parent.absolute()