wikiserver.py
author Reimar Bauer <rb.proj AT googlemail DOT com>
Mon, 19 Jan 2009 01:20:04 +0100
changeset 4247 c76d50dac855
parent 3576 08a8965162fe
permissions -rwxr-xr-x
text_html_text_moin_wiki: bug fix for GuiEditorBreaksIndentedTable
     1 #!/usr/bin/env python
     2 """
     3     Start script for the standalone Wiki server.
     4 
     5     @copyright: 2007 MoinMoin:ForrestVoight
     6     @license: GNU GPL, see COPYING for details.
     7 """
     8 
     9 import sys, os
    10 
    11 # a) Configuration of Python's code search path
    12 #    If you already have set up the PYTHONPATH environment variable for the
    13 #    stuff you see below, you don't need to do a1) and a2).
    14 
    15 # a1) Path of the directory where the MoinMoin code package is located.
    16 #     Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
    17 #sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
    18 
    19 # a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
    20 moinpath = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))
    21 sys.path.insert(0, moinpath)
    22 os.chdir(moinpath)
    23 
    24 # b) Configuration of moin's logging
    25 #    If you have set up MOINLOGGINGCONF environment variable, you don't need this!
    26 #    You also don't need this if you are happy with the builtin defaults.
    27 #    See wiki/config/logging/... for some sample config files.
    28 from MoinMoin import log
    29 log.load_config('wikiserverlogging.conf')
    30 
    31 # Debug mode - show detailed error reports
    32 #os.environ['MOIN_DEBUG'] = '1'
    33 
    34 from MoinMoin.script import MoinScript
    35 
    36 if __name__ == '__main__':
    37     sys.argv = ["moin.py", "server", "standalone"]
    38     MoinScript().run()
    39