use instead of __file__ in python
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
這邊甚麼都沒有
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))