def in6_ctop(addr):
 if ((len(addr) != 20) or (not reduce((lambda x, y: (x and y)), map((lambda x: (x in _rfc1924map)), addr)))):
  return None
 i = 0
 for c in addr:
  j = _rfc1924map.index(c)
  i = ((85 * i) + j)
 res = []
 for j in xrange(4):
  res.append(struct.pack('!I', (i % (2 ** 32))))
  i = (i / (2 ** 32))
 res.reverse()
 return inet_ntop(socket.AF_INET6, ''.join(res))

def in6_ctop ( addr ) : if ( ( len ( addr ) != 20 ) or ( not reduce ( ( lambda x , y : ( x and y ) ) , map ( ( lambda x : ( x in _rfc1924map ) ) , addr ) ) ) ) : return None i = 0 for c in addr : j = _rfc1924map . index ( c ) i = ( ( 85 * i ) + j ) res = [ ] for j in xrange ( 4 ) : res . append ( struct . pack ( '!I' , ( i % ( 2 ** 32 ) ) ) ) i = ( i / ( 2 ** 32 ) ) res . reverse ( ) return inet_ntop ( socket . AF_INET6 , '' . join ( res ) )
convert an ipv6 address in compact representation notation to printable representation ;-) returns none on error .