use instead of __file__ in python

source

import inspect
from pathlib import Path
Path(inspect.getfile(inspect.currentframe()))
from . import __file__ as initpy_file_path
Path(os.path.dirname(initpy_file_path))
撰寫於 2022-06-13