I\'m building a simple helper script for work that will copy a couple of template files in our code base to the current directory. I don\'t, however, have the absolute path
I think to work with all systems use "ntpath" instead of "os.path". Today, it works well with Windows, Linux and Mac OSX.
import ntpath import os dirname = ntpath.dirname(__file__) filename = os.path.join(dirname, 'relative/path/to/file/you/want')