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