def startup_modpython(req=None):
 if (cherrypy.engine.state == cherrypy._cpengine.STOPPED):
  if req:
   if ('nullreq' in req.get_options()):
    cherrypy.engine.request_class = NullRequest
    cherrypy.engine.response_class = NullResponse
   ab_opt = req.get_options().get('ab', '')
   if ab_opt:
    global AB_PATH
    AB_PATH = ab_opt
  cherrypy.engine.start()
 if (cherrypy.engine.state == cherrypy._cpengine.STARTING):
  cherrypy.engine.wait()
 return 0

def startup_modpython ( req = None ) : if ( cherrypy . engine . state == cherrypy . _cpengine . STOPPED ) : if req : if ( 'nullreq' in req . get_options ( ) ) : cherrypy . engine . request_class = NullRequest cherrypy . engine . response_class = NullResponse ab_opt = req . get_options ( ) . get ( 'ab' , '' ) if ab_opt : global AB_PATH AB_PATH = ab_opt cherrypy . engine . start ( ) if ( cherrypy . engine . state == cherrypy . _cpengine . STARTING ) : cherrypy . engine . wait ( ) return 0
start the cherrypy app server in serverless mode .