def format_hostname(hostname):
 if (has_ipv6 and (re.match(u'\\d+.\\d+.\\d+.\\d+', hostname) is not None)):
  hostname = (u'::ffff:%s' % hostname)
 return hostname

def format_hostname ( hostname ) : if ( has_ipv6 and ( re . match ( u'\\d+.\\d+.\\d+.\\d+' , hostname ) is not None ) ) : hostname = ( u'::ffff:%s' % hostname ) return hostname
format hostname for display .