def relative_to(path1, path0):
    """Entirely unsophisticated functionality to remove a short
    path from the beginning of a longer one off the same root.
    This is to assist in things like copying a directory or registry
    tree from one area to another.

    NB This is used by the fs *and* registry modules so stays
    here in the global utils
    """
    path1 = unicode(path1).lower()
    path0 = unicode(path0).lower()
    if path1.startswith(path0):
        return path1[len(path0):]
    else:
        raise RuntimeError((path1, path0) % "%s and %s have nothing in common")
dataset/ETHPy150Open tjguk/winsys/winsys/utils.py/relative_to/swapped operands of `%`