[issue41448] pathlib behave differ between OS

2020-07-31 Thread Mond Wan
Mond Wan added the comment: Thanks for the clarifications on PurePosixPath(). Now, I know which library I should use to solve my problem. For resolve() with strict True, I have tried on both platform. They will both raise exception if that file does not exists

[issue41448] pathlib behave differ between OS

2020-07-31 Thread Mond Wan
Mond Wan added the comment: Moreover, output from PurePosixPath.as_posix() is not that straightforward? Please take a look below example from python3.6 + linux + docker ``` >>> winPath = r'\workspace\xxx\test_fixture\user-restore-success.zip' >>> pWIN = pat

[issue41448] pathlib behave differ between OS

2020-07-31 Thread Mond Wan
Mond Wan added the comment: Let me clarify my expectation. # For `as_posix()` * PureWindowsPath can translate both POSIX path, and WINDOW path to POSIX path via `as_posix()` * Therefore, I expect PurePosixPath can translate both platform path to POSIX path via `as_posix()` * I just

[issue41448] pathlib behave differ between OS

2020-07-31 Thread Mond Wan
Change by Mond Wan : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue41448> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue41448] pathlib behave differ between OS

2020-07-31 Thread Mond Wan
New submission from Mond Wan : I have tried 2 functions with different behavior across platform # as_posix() In linux platform, as_posix() cannot process window path nicely * From linux + docker + python:3.8 ``` Python 3.8.0 (default, Oct 17 2019, 05:36:36) [GCC 8.3.0] on linux >>>