Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pathlib path forward or back slahses

>>> import pathlib
>>> p = pathlib.PureWindowsPath(r'diranotherdirfoodirmore')
>>> print(p)    
diranotherdirfoodirmore
>>> print(p.as_posix())
/dir/anotherdir/foodir/more
>>> str(p)
'diranotherdirfoodirmore'
>>> str(p.as_posix())
'/dir/anotherdir/foodir/more'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pathlib #path #slahses
ADD COMMENT
Topic
Name
4+5 =