/usr/share/pyshared/cherrypy/test/test_noserver.py is in python-cherrypy 2.3.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | """Test WSGI servers and gateways, such as mod_python.
mod_python
----------
Put the following four lines somewhere in your Apache2 .conf:
PythonImport cherrypy.test.test_noserver REDROVER.HQAMOR.amorhq.net
SetHandler python-program
PythonHandler wsgiref.modpython_gateway::handler
PythonOption application cherrypy._cpwsgi::wsgiApp
"""
import test
test.prefer_parent_path()
import cherrypy
from cherrypy import _cpwsgi
class HelloWorld:
def index(self):
return "Hello world!"
index.exposed = True
wsgi_asp = index
cherrypy.root = HelloWorld()
cherrypy.root.test = HelloWorld()
cherrypy.config.update({"server.environment": "production"})
cherrypy.server.start(server_class = None)
|