def build_absolute_uri(host_url, path=None):
 path = (path or '')
 if (path.startswith('http://') or path.startswith('https://')):
  return path
 if (host_url.endswith('/') and path.startswith('/')):
  path = path[1:]
 return (host_url + path)

def build_absolute_uri ( host_url , path = None ) : path = ( path or '' ) if ( path . startswith ( 'http://' ) or path . startswith ( 'https://' ) ) : return path if ( host_url . endswith ( '/' ) and path . startswith ( '/' ) ) : path = path [ 1 : ] return ( host_url + path )
build absolute uri with given path .