Get currently executing file path

import pathlib
pathlib.Path(__file__).parent.resolve()

Know more: