def _relpath_nt(path, start=os.path.curdir):
if not path:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>start_list = os.path.abspath(start).split(os.path.sep)<EOL>path_list = os.path.abspath(path).split(os.path.sep)<EOL>if start_list[<NUM_LIT:0>].lower() != path_list[<NUM_LIT:0>].lower():<EOL><INDENT>unc_path, rest = os.path.splitunc(path)<EOL>unc_start, rest = os.path.splitunc(start)<EOL>if bool(unc_path) ^ bool(unc_start):<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>% (path, start))<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>% (path_list[<NUM_LIT:0>], start_list[<NUM_LIT:0>]))<EOL><DEDENT><DEDENT>for i in range(min(len(start_list), len(path_list))):<EOL><INDENT>if start_list[i].lower() != path_list[i].lower():<EOL><INDENT>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>i += <NUM_LIT:1><EOL><DEDENT>rel_list = [os.path.pardir] * (len(start_list)-i) + path_list[i:]<EOL>if not rel_list:<EOL><INDENT>return os.path.curdir<EOL><DEDENT>return os.path.join(*rel_list)<EOL>
Return a relative version of a path