def in6_ptop(str):
 return inet_ntop(socket.AF_INET6, inet_pton(socket.AF_INET6, str))

def in6_ptop ( str ) : return inet_ntop ( socket . AF_INET6 , inet_pton ( socket . AF_INET6 , str ) )
normalizes ipv6 addresses provided in printable format .