Attachment 'moin.py'
Download 1 #!/usr/bin/env python
2 """
3 Start script for the DesktopEdition StandAlone WikiServer.
4
5 @copyright: 2004 Thomas Waldmann, Nir Soffer, Alexander Schremmer
6 @license: GNU GPL, see COPYING for details.
7 """
8
9 print "Loading ..."
10
11 import os, sys
12
13 class PythonTooOldError: pass
14
15 try:
16 if sys.version_info[:3] < (2, 3, 0):
17 raise PythonTooOldError
18 except:
19 sys.exit("Unfortunately, your installed Python is too old. Please download at"
20 " least Python 2.3.0, while Python 2.4.2 is recommended.\n\n"
21 "You can get Python here: http://www.python.org/download/")
22
23 moinpath = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))
24 sys.path.insert(0, moinpath)
25
26 from MoinMoin.server.standalone import StandaloneConfig, run
27 from MoinMoin.version import project, release, revision
28
29 print "%s - %s [%s]" % (project, release, revision)
30
31 if os.name == 'nt':
32 print
33 print "Just close this window to shutdown MoinMoin DesktopEdition."
34
35 print
36
37 class DefaultConfig(StandaloneConfig):
38 docs = os.path.join(moinpath, 'wiki', 'htdocs')
39
40 # Port (default 8080)
41 # To serve privileged port under 1024 you will have to run as root
42 port = 8080
43
44 # Interface (default 'localhost')
45 # '' - will listen to any interface
46 interface = 'localhost'
47
48 try:
49 from wikiserverconfig import Config
50 except ImportError:
51 Config = DefaultConfig
52
53 # Run moin moin server:
54 run(Config)
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.