Return an absolute path.
>>> os.path.abspath('c:spam') 'C:\\Temp\\spam' >>> os.path.abspath('c:/temp/spam. . .') 'c:\\temp\\spam'
os.path/abspath
abspath