wiki/server/moin.cgi
author Thomas Waldmann <tw AT waldmann-edv DOT de>
Mon, 18 Jan 2010 23:05:58 +0100
changeset 5461 9d8e7ce3c3a2
parent 5459 04afdde50094
permissions -rwxr-xr-x
move sys.argv fix to better place
     1 #!/usr/bin/env python
     2 # -*- coding: iso-8859-1 -*-
     3 """
     4     MoinMoin - CGI/FCGI Driver script
     5 
     6     @copyright: 2000-2005 by Juergen Hermann <jh@web.de>,
     7                 2008 by MoinMoin:ThomasWaldmann,
     8                 2008 by MoinMoin:FlorianKrupicka
     9     @license: GNU GPL, see COPYING for details.
    10 """
    11 
    12 import sys, os
    13 
    14 # a) Configuration of Python's code search path
    15 #    If you already have set up the PYTHONPATH environment variable for the
    16 #    stuff you see below, you don't need to do a1) and a2).
    17 
    18 # a1) Path of the directory where the MoinMoin code package is located.
    19 #     Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
    20 #sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
    21 
    22 # a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
    23 #     See wiki/config/... for some sample config files.
    24 #sys.path.insert(0, '/path/to/wikiconfigdir')
    25 #sys.path.insert(0, '/path/to/farmconfigdir')
    26 
    27 # b) Configuration of moin's logging
    28 #    If you have set up MOINLOGGINGCONF environment variable, you don't need this!
    29 #    You also don't need this if you are happy with the builtin defaults.
    30 #    See wiki/config/logging/... for some sample config files.
    31 #from MoinMoin import log
    32 #log.load_config('/path/to/logging_configuration_file')
    33 
    34 # this works around a bug in flup's CGI autodetection (as of flup 1.0.1):
    35 os.environ['FCGI_FORCE_CGI'] = 'Y' # 'Y' for (slow) CGI, 'N' for FCGI
    36 
    37 from MoinMoin.web.flup_frontend import CGIFrontEnd
    38 CGIFrontEnd().run()
    39