def get_link_path(target, base):
 path = _get_link_path(target, base)
 url = path_to_url(path)
 if os.path.isabs(path):
  url = ('file:' + url)
 return url

def get_link_path ( target , base ) : path = _get_link_path ( target , base ) url = path_to_url ( path ) if os . path . isabs ( path ) : url = ( 'file:' + url ) return url
returns a relative path to target from base .