[issue40693] pathlib.Path will be broken with os.chdir command.

2020-05-19 Thread Y Ono
Y Ono added the comment: It's the same as when executing `os.path.abspath`. -- ___ Python tracker <https://bugs.python.org/issue40693> ___ ___ Python-bugs-list m

[issue40693] pathlib.Path will be broken with os.chdir command.

2020-05-19 Thread Y Ono
New submission from Y Ono : ``` import os from pathlib import Path os.chdir(Path(__file__).parent) print(Path(__file__).absolute()) ``` I put the code into a file in `/tmp/test.py`, and execute it from `/tmp/` directory like below. Then the output showed `/tmp/scripts/scripts/test.py