@staticmethod
def _compare_relative_path(path_main, path_other):
    """Returns path from path_main to path_other.

        Example:
            path_main = 'some_folder\\file1.html'
            path_other = 'some_folder\\sub_folder\\file2.html'

            returns 'sub_folder\\file2.html'
        """
    if '\\' in path_main:
        main_p = path_main.split('\\')
    else:
        main_p = [path_main]
    if '\\' in path_other:
        other_p = path_other.split('\\')
    else:
        other_p = [path_other]
    min_path_len = min([len(main_p), len(other_p)])
    path_overlap = 0
    for i in range(min_path_len):
        if main_p[i] == other_p[i] and path_overlap == i:
            path_overlap += 1
    return '..\\' * (len(main_p) - 1 - path_overlap) + '\\'.join(other_p[
        path_overlap:])
