(use_wsgi=False)
| 326 | |
| 327 | |
| 328 | def run_modpython(use_wsgi=False): |
| 329 | print('Starting mod_python...') |
| 330 | pyopts = [] |
| 331 | |
| 332 | # Pass the null and ab=path options through Apache |
| 333 | if '--null' in opts: |
| 334 | pyopts.append(('nullreq', '')) |
| 335 | |
| 336 | if '--ab' in opts: |
| 337 | pyopts.append(('ab', opts['--ab'])) |
| 338 | |
| 339 | s = _cpmodpy.ModPythonServer |
| 340 | if use_wsgi: |
| 341 | pyopts.append(('wsgi.application', 'cherrypy::tree')) |
| 342 | pyopts.append( |
| 343 | ('wsgi.startup', 'cherrypy.test.benchmark::startup_modpython')) |
| 344 | handler = 'modpython_gateway::handler' |
| 345 | s = s(port=54583, opts=pyopts, |
| 346 | apache_path=APACHE_PATH, handler=handler) |
| 347 | else: |
| 348 | pyopts.append( |
| 349 | ('cherrypy.setup', 'cherrypy.test.benchmark::startup_modpython')) |
| 350 | s = s(port=54583, opts=pyopts, apache_path=APACHE_PATH) |
| 351 | |
| 352 | try: |
| 353 | s.start() |
| 354 | run() |
| 355 | finally: |
| 356 | s.stop() |
| 357 | |
| 358 | |
| 359 | if __name__ == '__main__': |
no test coverage detected
searching dependent graphs…