def create_url_helper(base_url):
 base_url = base_url.rstrip('/')
 def url_for(path=''):
  if path:
   path = ('/' + path.strip('/'))
  return (base_url + path)
 return url_for

def create_url_helper ( base_url ) : base_url = base_url . rstrip ( '/' ) def url_for ( path = '' ) : if path : path = ( '/' + path . strip ( '/' ) ) return ( base_url + path ) return url_for
a function to generate url_for helpers .