1
# -*- coding: iso-8859-1 -*-
3
MoinMoin - CGI pseudo Server
5
This is not really a server, it is just so that CGI stuff (the real
6
server is likely Apache or IIS or some other std. CGI server) looks
7
similar to what we have for Twisted and standalone server.
11
from MoinMoin.server.server_cgi import CgiConfig, run
13
class Config(CgiConfig):
18
See more options in CgiConfig class.
20
@copyright: 2006 MoinMoin:ThomasWaldmann
21
@license: GNU GPL, see COPYING for details.
24
from MoinMoin.server import Config
25
from MoinMoin.request import request_cgi
30
# ------------------------------------------------------------------------
33
class CgiConfig(Config):
34
""" CGI default config """
39
hotshotProfile = None # e.g. "moin.prof"
43
""" Create and run a Cgi Request
45
See CgiConfig for available options
47
@param configClass: config class
50
config = configClass()
52
if config.hotshotProfile:
54
config.hotshotProfile = hotshot.Profile(config.hotshotProfile)
55
config.hotshotProfile.start()
57
request = request_cgi.Request(properties=config.properties)
60
if config.hotshotProfile:
61
config.hotshotProfile.close()