I’ve just switched a definition from Windows to MacOS and my importing file paths are broken.
It would be perfect if your first suggestion, Laurent, worked on MacOS like it does in Windows but unfortunately I get an error:
'System.IO' object has no attribute 'DirectorySeparatorChar'
But the platform.system() function suggested by both of you works!
Also Anders thanks for patiently re-answering this question. I did genuine searches for answers and didn’t come across your previous post answering this question.
You might want to have a look at the native os.path Python module. It has the os.path.join() function, designed for constructing platform agnostic paths.