'Return a set containing all existing directory entries from sys.path.'

def InitPathinfo(self):

    d = set()
    for dir_ in sys.path:
        try:
            if os.path.isdir(dir_):
                (dir_, dircase) = self.MakePath(dir_)
                d.add(dircase)
        except TypeError:
            continue
    return d
