def _resolve_link(path):
        paths_seen = []
        while islink(path):
            if path in paths_seen:
                # Already seen this path, so we must have a symlink loop
                return None
            paths_seen.append(path)
            # Resolve where the link points to
            resolved = os.readlink(path)
            if not isabs(resolved):
                dir = dirname(path)
                path = normpath(join(dir, resolved))
            else:
                path = normpath(resolved)
        return path
Internal helper function.  Takes a path and follows symlinks
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/posixpath.py/_resolve_link