def text_to_int(ip):
 if (':' not in ip):
  return ipv4_to_int(ip)
 else:
  return ipv6_to_int(ip)

def text_to_int ( ip ) : if ( ':' not in ip ) : return ipv4_to_int ( ip ) else : return ipv6_to_int ( ip )
converts human readable ipv4 or ipv6 string to int type representation .