from pathlib import Path print(__file__) print(Path(__file__)) print(Path(__file__).resolve()) print(Path(__file__).resolve().parent.parent)
import sys import os current_work_dir = os.path.dirname(__file__) sys.path.append(os.path.abspath(os.path.join(current_work_dir, '../')))