def isPathExcluded(curPath,excludePath):
    """ Returns True if excludePath is part of parameter curPath, otherwise False. """
    try:
        curPath.relative_to(excludePath)
        return True
    except ValueError:
        return False