AlexK
🌖🕓
7 yr
via
Apero
is there a way with Python to write Windows paths but on a Mac? sort of make Python think it’s Windows while running `os.path` stuff.
70127
jws
🌔🕥
7 yr
via
ChimPnut
@AlexK
Ooh, interesting. Not run into that problem before. Might be some API for explicitly using the full Windows path style regardless since it shows up in networking.
70144
jws
🌔🕥
7 yr
via
ChimPnut
@AlexK
Bingo: import ntpath
(Actually mostly doesn't handle UNC paths right. Funny.)
See second note at:
https://docs.python.org/2/library/os.path.html
70150
AlexK
🌖🕟
7 yr
via
Apero
@jws
that looks very interesting. cheers!
70158
AlexK
🌗🕡
7 yr
via
Apero
@jws
ntpath worked like a charm!
70285