Horje
pathlib path forward or back slahses Code Example
pathlib path forward or back slahses
>>> import pathlib
>>> p = pathlib.PureWindowsPath(r'\dir\anotherdir\foodir\more')
>>> print(p)    
\dir\anotherdir\foodir\more
>>> print(p.as_posix())
/dir/anotherdir/foodir/more
>>> str(p)
'\\dir\\anotherdir\\foodir\\more'
>>> str(p.as_posix())
'/dir/anotherdir/foodir/more'




Python

Related
cls in python Code Example cls in python Code Example
limit for loop python Code Example limit for loop python Code Example
python initialise list of lists Code Example python initialise list of lists Code Example
post to instagram from pc python Code Example post to instagram from pc python Code Example
python hasattribute Code Example python hasattribute Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7