~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to wiki/server/wikiserver.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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