[issue32442] Result of pathlib.Path.resolve() with UNC path is not very useful

2017-12-28 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: @Eric You’re correct, this is not the exact output. I tested the commands with a different path, but didn’t format them correctly when I convert them to use a generic example. Sorry for the confusion. @Eryk I found my problem. I was doing some os.rename an

[issue32442] Result of pathlib.Path.resolve() with UNC path is not very useful

2017-12-28 Thread Eryk Sun
Eryk Sun added the comment: > the UNC path is not really useful anywhere in the Python > standard library UNC paths can be used almost anywhere in the file API. What specifically isn't working? > there’s no way to turn the it (back) into network drive once you > call resolve() Without usi

[issue32442] Result of pathlib.Path.resolve() with UNC path is not very useful

2017-12-28 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure how pathlib.Path('Z:\foo') gives an answer with 'foo' in it, since '\f' is a formfeed. Is this the exact output that you're showing? Can you try with r'Z:\foo', 'Z:\\foo', or 'Z:/foo' and see what that produces? -- nosy: +eric.smith _

[issue32442] Result of pathlib.Path.resolve() with UNC path is not very useful

2017-12-28 Thread Tzu-ping Chung
New submission from Tzu-ping Chung : The behaviour of os.path.abspath() and pathlib.Path.resolve() is a different when dealing with a path on a UNC share (on Windows): >>> import os, pathlib >>> path = pathlib.Path('Z:\foo') >>> path.resolve() WindowsPath('//host/share/foo')