<s> """<STR_LIT>""" <EOL> import os <EOL> import sys <EOL> import logging <EOL> logging . info ( '<STR_LIT>' , <EOL> __name__ , os . getenv ( '<STR_LIT>' ) ) <EOL> import appengine_config <EOL> from google . appengine . ext . webapp import util <EOL> from google . appengine . ext . webapp import template <EOL> os . environ [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> import django . core . handlers . wsgi <EOL> import django . core . signals <EOL> import django . db <EOL> import django . dispatch . dispatcher <EOL> import django . forms <EOL> def log_exception ( * args , ** kwds ) : <EOL> """<STR_LIT>""" <EOL> cls , err = sys . exc_info ( ) [ : <NUM_LIT:2> ] <EOL> logging . exception ( '<STR_LIT>' , cls . __name__ , err ) <EOL> django . core . signals . got_request_exception . connect ( log_exception ) <EOL> django . core . signals . got_request_exception . disconnect ( <EOL> django . db . _rollback_on_exception ) <EOL> application = django . core . handlers . wsgi . WSGIHandler ( ) <EOL> def real_main ( ) : <EOL> """<STR_LIT>""" <EOL> util . run_wsgi_app ( application ) <EOL> def profile_main ( ) : <EOL> """<STR_LIT>""" <EOL> import cProfile <EOL> import pstats <EOL> import StringIO <EOL> prof = cProfile . Profile ( ) <EOL> prof = prof . runctx ( '<STR_LIT>' , globals ( ) , locals ( ) ) <EOL> stream = StringIO . StringIO ( ) <EOL> stats = pstats . Stats ( prof , stream = stream ) <EOL> stats . sort_stats ( '<STR_LIT:time>' ) <EOL> stats . print_stats ( ) <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> print stream . getvalue ( ) [ : <NUM_LIT> ] <EOL> print '<STR_LIT>' <EOL> main = real_main <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
