def METHOD_NAME(target, link):
    newlink = link + "~new~"
    try:
        os.unlink(newlink); # Just in case
    except OSError:
        pass
    os.symlink(target, newlink)
    os.rename(newlink, link)