def InStrRev(text, subtext, start=None, compare=None):
    """Return the location of one string in another starting from the end"""
    assert compare is None, "Compare modes not allowed for InStrRev"
    if start is None:
        start = len(text)
    if subtext == "":
        return len(text)
    elif start > len(text):
        return 0
    else:
        return text[:start].rfind(subtext) + 1