def is_valid_ipv6(ip):
    try:
        socket.inet_pton(socket.AF_INET6, ip)
    except socket.error:  # not a valid address
        return False
    return True
Copy the selected text to the clipboard. If no text was selected, the
dataset/ETHPy150Open openstack/swift/swift/common/ring/utils.py/is_valid_ipv6--crossover with--dataset/ETHPy150Open OpenCobolIDE/OpenCobolIDE/open_cobol_ide/extlibs/pyqode/core/api/code_edit.py/CodeEdit.copy