Message341953
Maybe I am doing something wrong here but:
On Windows 10:
> python --version
Python 3.7.1
> python
>>> from pathlib import Path
>>> Path("test.py").resolve()
WindowsPath('test.py')
>>> Path("test.py").absolute() # this is undocumented in https://docs.python.org/3.7/library/pathlib.html
WindowsPath('C:/Users/Name/Desktop/test.py')
On Ubuntu 18.04 LTS:
$ python3.7 --version
Python 3.7.3
$ python3.7
>>> from pathlib import Path
>>> Path("test.py").resolve()
PosixPath('/home/name/test.py')
>>> Path("test.py").absolute() # same as above undocumented
PosixPath('/home/name/test.py')
Why in Windows does this fail, but not Linux? Why is .absolute() undocumented? I've looked around trying to figure out what the intended behavior is but there is conflicting information.
Resolve seems to not work correctly on Windows. Bug? |
|
Date |
User |
Action |
Args |
2019-05-09 02:17:50 | alexjacobson95 | set | recipients:
+ alexjacobson95, paul.moore, tim.golden, zach.ware, eryksun, steve.dower |
2019-05-09 02:17:50 | alexjacobson95 | set | messageid: <1557368270.63.0.171172492568.issue36860@roundup.psfhosted.org> |
2019-05-09 02:17:50 | alexjacobson95 | link | issue36860 messages |
2019-05-09 02:17:50 | alexjacobson95 | create | |
|