def _relpath_posix(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>i = len(os.path.commonprefix([start_list, path_list]))<EOL>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