I want to get a simple Python \"hello world\" web page script to run on Windows Vista/ Apache but hit different walls. I\'m using WAMP. I\'ve installed mod_python
Stay away from mod_python. One common misleading idea is that mod_python is like mod_php, but for python. That is not true. Wsgi is the standard to run python web applications, defined by PEP 333. So use mod_wsgi instead.
Or alternatively, use some web framework that has a server. Cherrypy's one is particulary good. You will be able to run your application both standalone and through mod_wsgi.
An example of Hello World application using cherrypy:
import cherrypy
class HelloWorld(object):
def index(self):
return "Hello World!"
index.exposed = True
application = HelloWorld()
if __name__ == '__main__':
cherrypy.engine.start()
cherrypy.engine.block()
Very easy huh? Running this application directly on python will start a webserver. Configuring mod_wsgi to it will make it run inside apache.