def abs_url(path):
 if (not path):
  return
 if (path.startswith(u'http://') or path.startswith(u'https://')):
  return path
 if (not path.startswith(u'/')):
  path = (u'/' + path)
 return path

def abs_url ( path ) : if ( not path ) : return if ( path . startswith ( u'http://' ) or path . startswith ( u'https://' ) ) : return path if ( not path . startswith ( u'/' ) ) : path = ( u'/' + path ) return path
deconstructs and reconstructs a url into an absolute url or a url relative from root / .