def checkSameHost(*urls):
 if (not urls):
  return None
 elif (len(urls) == 1):
  return True
 else:
  return all(((urlparse.urlparse((url or '')).netloc.split(':')[0] == urlparse.urlparse((urls[0] or '')).netloc.split(':')[0]) for url in urls[1:]))

def checkSameHost ( * urls ) : if ( not urls ) : return None elif ( len ( urls ) == 1 ) : return True else : return all ( ( ( urlparse . urlparse ( ( url or '' ) ) . netloc . split ( ':' ) [ 0 ] == urlparse . urlparse ( ( urls [ 0 ] or '' ) ) . netloc . split ( ':' ) [ 0 ] ) for url in urls [ 1 : ] ) )
returns true if all provided urls share that same host .