annotate wikiserver.py @ 6032:9248e31d7a95

update CHANGES
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 14 Feb 2014 17:24:43 +0100
parents 5d94d48eb350
children d811122349fb
rev   line source
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1 #!/usr/bin/env python
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
2 """
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
3 Start script for the standalone Wiki server.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
4
3025
ccf6d7ffb310 standalone server integrated into 'moin' script command (moin server standalone --help), thanks to Forrest Voight
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2419
diff changeset
5 @copyright: 2007 MoinMoin:ForrestVoight
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
6 @license: GNU GPL, see COPYING for details.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
7 """
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
8
3580
fc2f05f2b0bd server adaptor scripts: make sys.path / logging configuration / comments consistent
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3576
diff changeset
9 import sys, os
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
10
3580
fc2f05f2b0bd server adaptor scripts: make sys.path / logging configuration / comments consistent
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3576
diff changeset
11 # a) Configuration of Python's code search path
fc2f05f2b0bd server adaptor scripts: make sys.path / logging configuration / comments consistent
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3576
diff changeset
12 # If you already have set up the PYTHONPATH environment variable for the
fc2f05f2b0bd server adaptor scripts: make sys.path / logging configuration / comments consistent
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3576
diff changeset
13 # stuff you see below, you don't need to do a1) and a2).
fc2f05f2b0bd server adaptor scripts: make sys.path / logging configuration / comments consistent
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3576
diff changeset
14
fc2f05f2b0bd server adaptor scripts: make sys.path / logging configuration / comments consistent
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3576
diff changeset
15 # a1) Path of the directory where the MoinMoin code package is located.
fc2f05f2b0bd server adaptor scripts: make sys.path / logging configuration / comments consistent
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3576
diff changeset
16 # Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
4582
afc6264a134f raised requirement to Python 2.4, removing 2.3 support code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3580
diff changeset
17 #sys.path.insert(0, 'PREFIX/lib/python2.4/site-packages')
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
18
3580
fc2f05f2b0bd server adaptor scripts: make sys.path / logging configuration / comments consistent
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3576
diff changeset
19 # a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
3025
ccf6d7ffb310 standalone server integrated into 'moin' script command (moin server standalone --help), thanks to Forrest Voight
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2419
diff changeset
20 moinpath = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))
ccf6d7ffb310 standalone server integrated into 'moin' script command (moin server standalone --help), thanks to Forrest Voight
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2419
diff changeset
21 sys.path.insert(0, moinpath)
ccf6d7ffb310 standalone server integrated into 'moin' script command (moin server standalone --help), thanks to Forrest Voight
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2419
diff changeset
22 os.chdir(moinpath)
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
23
3580
fc2f05f2b0bd server adaptor scripts: make sys.path / logging configuration / comments consistent
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3576
diff changeset
24 # b) Configuration of moin's logging
fc2f05f2b0bd server adaptor scripts: make sys.path / logging configuration / comments consistent
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3576
diff changeset
25 # If you have set up MOINLOGGINGCONF environment variable, you don't need this!
fc2f05f2b0bd server adaptor scripts: make sys.path / logging configuration / comments consistent
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3576
diff changeset
26 # You also don't need this if you are happy with the builtin defaults.
fc2f05f2b0bd server adaptor scripts: make sys.path / logging configuration / comments consistent
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3576
diff changeset
27 # See wiki/config/logging/... for some sample config files.
3111
79f850129782 logging: fix server scripts to load logging config, fix logging configs
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3025
diff changeset
28 from MoinMoin import log
3576
08a8965162fe rename ./moin.py to wikiserver.py, add wikiserverlogging.conf to configure its logging
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3111
diff changeset
29 log.load_config('wikiserverlogging.conf')
3111
79f850129782 logging: fix server scripts to load logging config, fix logging configs
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3025
diff changeset
30
79f850129782 logging: fix server scripts to load logging config, fix logging configs
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3025
diff changeset
31 from MoinMoin.script import MoinScript
79f850129782 logging: fix server scripts to load logging config, fix logging configs
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3025
diff changeset
32
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
33 if __name__ == '__main__':
3025
ccf6d7ffb310 standalone server integrated into 'moin' script command (moin server standalone --help), thanks to Forrest Voight
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2419
diff changeset
34 sys.argv = ["moin.py", "server", "standalone"]
ccf6d7ffb310 standalone server integrated into 'moin' script command (moin server standalone --help), thanks to Forrest Voight
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2419
diff changeset
35 MoinScript().run()
3580
fc2f05f2b0bd server adaptor scripts: make sys.path / logging configuration / comments consistent
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3576
diff changeset
36