I would like to see what is the best way to determine the current script directory in Python.
I discovered that, due to the many ways of calling Python code, it is ha
The os.path... approach was the 'done thing' in Python 2.
os.path...
In Python 3, you can find directory of script as follows:
from pathlib import Path cwd = Path(__file__).parents[0]