How can I use python to construct a path intended for a different operating system than the one the script is running on?
E.g. I am running a script on Linux in which I want to construct the Windows path
winPath = os.path.join(winRoot, dir, subdir) #doesn't work when script is run on linux
Import the ntpath module to generate windows paths.
winPath = os.join.path(winRoot, dir, subdir)
winPath = ntpath.join(winRoot, dir, subdir)