Back to index

moin  1.9.0~rc2
wikiserver.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 """
00003     Start script for the standalone Wiki server.
00004 
00005     @copyright: 2007 MoinMoin:ForrestVoight
00006     @license: GNU GPL, see COPYING for details.
00007 """
00008 
00009 import sys, os
00010 
00011 # a) Configuration of Python's code search path
00012 #    If you already have set up the PYTHONPATH environment variable for the
00013 #    stuff you see below, you don't need to do a1) and a2).
00014 
00015 # a1) Path of the directory where the MoinMoin code package is located.
00016 #     Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
00017 #sys.path.insert(0, 'PREFIX/lib/python2.4/site-packages')
00018 
00019 # a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
00020 moinpath = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))
00021 sys.path.insert(0, moinpath)
00022 os.chdir(moinpath)
00023 
00024 # b) Configuration of moin's logging
00025 #    If you have set up MOINLOGGINGCONF environment variable, you don't need this!
00026 #    You also don't need this if you are happy with the builtin defaults.
00027 #    See wiki/config/logging/... for some sample config files.
00028 from MoinMoin import log
00029 log.load_config('wikiserverlogging.conf')
00030 
00031 from MoinMoin.script import MoinScript
00032 
00033 if __name__ == '__main__':
00034     sys.argv = ["moin.py", "server", "standalone"]
00035     MoinScript().run()
00036