SyntaxFix
Write A Post
Hire A Developer
Questions
The best solution (for python >= 3.4) when executing from any directory is:
from pathlib import Path two_up = Path(__file__).resolve().parents[1]