def removeDuplicates(variable):
    """Remove duplicate values of an environment variable."""
    oldList = variable.split(os.pathsep)
    newList = []
    for i in oldList:
        if i not in newList:
            newList.append(i)
    newVariable = os.pathsep.join(newList)
    return newVariable
Remove duplicate values of an environment variable.
product/gradle-plugin/src/main/python/setuptools/_distutils/msvc9compiler.py