<s> """<STR_LIT>""" <EOL> import wsgiref . handlers <EOL> from google . appengine . ext import webapp <EOL> from google . appengine . ext . webapp import util <EOL> from mapreduce import handlers <EOL> from mapreduce import status <EOL> class RedirectHandler ( webapp . RequestHandler ) : <EOL> """<STR_LIT>""" <EOL> def get ( self ) : <EOL> new_path = self . request . path <EOL> if not new_path . endswith ( '<STR_LIT:/>' ) : <EOL> new_path += '<STR_LIT:/>' <EOL> new_path += '<STR_LIT:status>' <EOL> self . redirect ( new_path ) <EOL> def create_application ( ) : <EOL> """<STR_LIT>""" <EOL> return webapp . WSGIApplication ( [ <EOL> ( r"<STR_LIT>" , handlers . MapperWorkerCallbackHandler ) , <EOL> ( r"<STR_LIT>" , handlers . ControllerCallbackHandler ) , <EOL> ( r"<STR_LIT>" , handlers . KickOffJobHandler ) , <EOL> ( r"<STR_LIT>" , handlers . StartJobHandler ) , <EOL> ( r"<STR_LIT>" , handlers . CleanUpJobHandler ) , <EOL> ( r"<STR_LIT>" , handlers . AbortJobHandler ) , <EOL> ( r"<STR_LIT>" , status . ListConfigsHandler ) , <EOL> ( r"<STR_LIT>" , status . ListJobsHandler ) , <EOL> ( r"<STR_LIT>" , status . GetJobDetailHandler ) , <EOL> ( r"<STR_LIT>" , RedirectHandler ) , <EOL> ( r"<STR_LIT>" , status . ResourceHandler ) , <EOL> ] , <EOL> debug = True ) <EOL> APP = create_application ( ) <EOL> def main ( ) : <EOL> util . run_wsgi_app ( APP ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> main ( ) </s>
