view wiki/server/moin.cgi @ 5459:04afdde50094

fix sys.argv issue
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 18 Jan 2010 22:28:57 +0100
parents 58ceb1d1c38d
children 9d8e7ce3c3a2
line wrap: on
line source

#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
    MoinMoin - CGI/FCGI Driver script

    @copyright: 2000-2005 by Juergen Hermann <>,
                2008 by MoinMoin:ThomasWaldmann,
                2008 by MoinMoin:FlorianKrupicka
    @license: GNU GPL, see COPYING for details.

import sys, os

# a) Configuration of Python's code search path
#    If you already have set up the PYTHONPATH environment variable for the
#    stuff you see below, you don't need to do a1) and a2).

# a1) Path of the directory where the MoinMoin code package is located.
#     Needed if you installed with --prefix=PREFIX or you didn't use
#sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')

# a2) Path of the directory where / is located.
#     See wiki/config/... for some sample config files.
#sys.path.insert(0, '/path/to/wikiconfigdir')
#sys.path.insert(0, '/path/to/farmconfigdir')

# b) Configuration of moin's logging
#    If you have set up MOINLOGGINGCONF environment variable, you don't need this!
#    You also don't need this if you are happy with the builtin defaults.
#    See wiki/config/logging/... for some sample config files.
#from MoinMoin import log

# this works around a bug in flup's CGI autodetection (as of flup 1.0.1):
os.environ['FCGI_FORCE_CGI'] = 'Y' # 'Y' for (slow) CGI, 'N' for FCGI

if 'GATEWAY_INTERFACE' in os.environ:
    sys.argv = []

from MoinMoin.web.flup_frontend import CGIFrontEnd