def isPathContained(outer, inner):
    inner = os.path.abspath(inner)
    outer = os.path.abspath(outer)
    if inner[:len(outer)] != outer:
        return False
    elif len(inner) == len(outer):
        return True
    elif inner[len(outer)] in [os.path.sep, os.path.altsep]:
        return True
    return False
Does inner lie "within" outer?
dataset/ETHPy150Open cortesi/pry/libpry/utils.py/isPathContained