[PYTHON] Handling of absolute paths of os.path.join

Note that if the argument has an absolute path, the argument before it will be ignored.

(ref. https://docs.python.org/3.3/library/os.path.html#os.path.join)

python:os.path.join


>>> os.path.join('/test', '/hoge', '/piyo')
'/piyo'

>>> os.path.join('/test', 'hoge', '/piyo')
'/piyo'

>>> os.path.join('/test', 'hoge', 'piyo')
'/test/hoge/piyo'

Recommended Posts

Handling of absolute paths of os.path.join
Handling of quotes in [bash]
python> Handling of 2D arrays
Handling of python on mac
Handling of sparse tree-structured attributes (Python)
Error divided by 0 Handling of ZeroDivisionError
Get absolute path of running process
Handling of JSON files in Python
Data handling 2 Analysis of various data formats