puedo hacer
>>> os.path.join("c:/","home","foo","bar","some.txt")
'c:/home\\foo\\bar\\some.txt'
Pero cuando lo hago
>>> s = "c:/,home,foo,bar,some.txt".split(",")
>>> os.path.join(s)
['c:/', 'home', 'foo', 'bar', 'some.txt']
What am I missing here?
fuente
/Users/...
. To solve it, I added that leading slash manually, in case somebody faces the same problem...