pathlib.Path.cwd() returns a different value depending on what computer I use (two Windows PCs - one at work, one at home).
Project structure (see https://github.com/jonathanchukinas/file_read_exercise.git)
- file_read_exercise/
- bin/
- init.py
- read_excel_file.py
- data/
- init.y
- my_data.xlsx
- init.py
- main.py
- bin/
main.py and read_excel_file.py both contain:
from pathlib import Path
print(Path.cwd())
At work, each python file returns the absolute path to the top-level directory.
At home, each python file returns the absolute path to its own directory.
I've been through the documentation and I've googled and searched stack overflow and can't find an answer to this question:
How does cwd() work so that I can better predicts its results?