Message414504
> e = Path(r'F:\ceven\test2')
Using forward slashes in the string literal is preferred, e.g. Path('F:/ceven/test2'). This avoids the problem of backslash escapes in string literals. The Path constructor parses the path and stores it internally as component parts. When the path object is needed as a string, os.fspath() returns the path using the platform's preferred path separator. A WindowsPath or PureWindowsPath uses backslash as the path separator. For example:
>>> os.fspath(pathlib.PureWindowsPath('F:/ceven/test2'))
'F:\\ceven\\test2' |
|
Date |
User |
Action |
Args |
2022-03-04 02:30:52 | eryksun | set | recipients:
+ eryksun, paul.moore, tim.golden, zach.ware, steve.dower, vincent.fung |
2022-03-04 02:30:52 | eryksun | set | messageid: <1646361052.68.0.443397087971.issue46916@roundup.psfhosted.org> |
2022-03-04 02:30:52 | eryksun | link | issue46916 messages |
2022-03-04 02:30:52 | eryksun | create | |
|