def get_url_path(path, use_directory_urls=True):
 path = get_html_path(path)
 url = (u'/' + path.replace(os.path.sep, u'/'))
 if use_directory_urls:
  return url[:(- len(u'index.html'))]
 return url

def get_url_path ( path , use_directory_urls = True ) : path = get_html_path ( path ) url = ( u'/' + path . replace ( os . path . sep , u'/' ) ) if use_directory_urls : return url [ : ( - len ( u'index.html' ) ) ] return url
map a source file path to an output html path .