def Dispatcher(env, resp):
 page = util.shift_path_info(env)
 if (page in DISPATCH):
  return DISPATCH[page](env, resp)
 else:
  status = '404 Not Found'
  headers = [('Content-type', 'text/plain')]
  resp(status, headers)
  return [('Not Found: ' + page)]

def Dispatcher ( env , resp ) : page = util . shift_path_info ( env ) if ( page in DISPATCH ) : return DISPATCH [ page ] ( env , resp ) else : status = '404 Not Found' headers = [ ( 'Content-type' , 'text/plain' ) ] resp ( status , headers ) return [ ( 'Not Found: ' + page ) ]
send requests to handlers based on the first path component .