The docs for os.path.isabs() state: isabs( path) Return True if path is an absolute pathname (begins with a slash). This is false becase os.path.isabs("C:\\foo") == True It should read: isabs( path) Return True if path is an absolute pathname (begins with a slash or drive letter).