annotate moin.py @ 2533:19ba0aa5ccdf

test_text_moin_wiki:fixed output from testMultipleShortPreSections
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Mon, 23 Jul 2007 12:52:18 +0200
parents 123974b5c8b5
children ccf6d7ffb310
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
1948
c452430f7e8c standalone start script: made python version recommendation more general and uptodate
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1659
diff changeset
5 @copyright: 2004-2006 Nir Soffer, Alexander Schremmer,
c452430f7e8c standalone start script: made python version recommendation more general and uptodate
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1659
diff changeset
6 2004-2007 MoinMoin:Thomas Waldmann
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
7 @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
8 """
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
9
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
10 print "Loading ..."
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
11
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
12 import os, sys
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
13
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
14 class PythonTooOldError:
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
15 pass
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
16
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
17 try:
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
18 if sys.version_info[:3] < (2, 3, 0):
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
19 raise PythonTooOldError
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
20 except:
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
21 sys.exit("Unfortunately, your installed Python is too old. Please download at "
1948
c452430f7e8c standalone start script: made python version recommendation more general and uptodate
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1659
diff changeset
22 "least Python 2.3.0 (the latest Python 2.4.x or 2.5.x release is recommended).\n\n"
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
23 "You can get Python here: http://www.python.org/download/")
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
24
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
25
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
26 # We insert the path where THIS script is located into the python search path.
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
27 # If your wikiconfig.py / farmconfig.py / etc. is located there, this is all
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
28 # you'll need.
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
29 moinpath = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
30 sys.path.insert(0, moinpath)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
31
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
32 # Path of the directory where wikiconfig.py is located.
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
33 # YOU MAYBE NEED TO CHANGE THIS TO MATCH YOUR SETUP.
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
34 #sys.path.insert(0, '/path/to/wikiconfig')
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
35
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
36 # Path to MoinMoin package, needed if you installed with --prefix=PREFIX
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
37 # or if you did not use setup.py.
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
38 #sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
39
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
40 # Path of the directory where farmconfig is located (if different).
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
41 #sys.path.insert(0, '/path/to/farmconfig')
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
42
49
cf52f97a5857 merge moin--main--1.3--patch-928
Nir Soffer <nirs@freeshell.org>
parents: 0
diff changeset
43 # Debug mode - show detailed error reports
cf52f97a5857 merge moin--main--1.3--patch-928
Nir Soffer <nirs@freeshell.org>
parents: 0
diff changeset
44 ## import os
cf52f97a5857 merge moin--main--1.3--patch-928
Nir Soffer <nirs@freeshell.org>
parents: 0
diff changeset
45 ## os.environ['MOIN_DEBUG'] = '1'
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
46
2338
b902f2397c68 rename server and request Implementations by adding a prefix server_, request_
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2249
diff changeset
47 from MoinMoin.server.server_standalone import StandaloneConfig, run
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
48 from MoinMoin.version import project, release, revision
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
49
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
50 print "%s - %s [%s]" % (project, release, revision)
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
51
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
52 if os.name == 'nt':
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
53 print
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
54 print "Just close this window to shutdown MoinMoin DesktopEdition."
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
55 print
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
56
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
57
1599
c001386fc59b fix moin.py and wikiconfig.py, move MMDE wikiconfig.py to toplevel dir
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1597
diff changeset
58 class DefaultConfig(StandaloneConfig):
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
59
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
60 # Server name
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
61 # Used to create .log, .pid and .prof files
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
62 name = 'moin'
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
63
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
64 # Path to moin shared files (default '/usr/share/moin/wiki/htdocs')
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
65 # If you installed with --prefix=PREFIX, use 'PREFIX/share/moin/wiki/htdocs'
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
66 #docs = '/usr/share/moin/htdocs'
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
67 # If your wiki/ directory is below the moin.py command, you don't need to
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
68 # change this:
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
69 docs = os.path.join(moinpath, 'wiki', 'htdocs')
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
70
1582
f37b49b6313d url_prefix_static: move default to MoinMoin.config, use matching defaults for Twisted/standalone
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 49
diff changeset
71 # URL prefix for the static stuff (used to access stuff in docs) - you
f37b49b6313d url_prefix_static: move default to MoinMoin.config, use matching defaults for Twisted/standalone
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 49
diff changeset
72 # usually should not need to change this because moin standalone uses
f37b49b6313d url_prefix_static: move default to MoinMoin.config, use matching defaults for Twisted/standalone
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 49
diff changeset
73 # matching defaults for here and for wikiconfig.py:
f37b49b6313d url_prefix_static: move default to MoinMoin.config, use matching defaults for Twisted/standalone
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 49
diff changeset
74 #url_prefix_static = '/moin_static160'
f37b49b6313d url_prefix_static: move default to MoinMoin.config, use matching defaults for Twisted/standalone
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 49
diff changeset
75
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
76 # The server will run with as this user and group (default 'www-data')
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
77 #user = 'www-data'
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
78 #group = 'www-data'
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
79
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
80 # Port (default 8000)
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
81 # To serve privileged port under 1024 you will have to run as root
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
82 port = 8080
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
83
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
84 # Interface (default 'localhost')
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
85 # '' - will listen to any interface
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
86 interface = 'localhost'
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
87
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
88 # Log (default commented)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
89 # Log is written to stderr or to a file you specify here.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
90 ## logPath = name + '.log'
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
91
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
92 # Server class (default ThreadPoolServer)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
93 # 'ThreadPoolServer' - create a constant pool of threads, simplified
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
94 # Apache worker mpm.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
95 # 'ThreadingServer' - serve each request in a new thread. Much
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
96 # slower for static files.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
97 # 'ForkingServer' - serve each request on a new child process -
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
98 # experimental, slow.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
99 # 'SimpleServer' - server one request at a time. Fast, low
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
100 # memory footprint.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
101 # If you set one of the threading servers and threads are not
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
102 # available, the server will fallback to ForkingServer. If fork is
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
103 # not available, the server will fallback to SimpleServer.
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
104 #serverClass = 'ThreadPoolServer'
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
105
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
106 # Thread limit (default 10)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
107 # Limit the number of threads created. Ignored on non threaded servers.
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
108 #threadLimit = 10
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
109
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
110 # Request queue size (default 50)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
111 # The size of the socket listen backlog.
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
112 #requestQueueSize = 50
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
113
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
114 # Properties
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
115 # Allow overriding any request property by the value defined in
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
116 # this dict e.g properties = {'script_name': '/mywiki'}.
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
117 #properties = {}
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
118
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
119 # Memory profile (default commented)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
120 # Useful only if you are a developer or interested in moin memory usage
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
121 # A memory profile named 'moin--2004-09-27--01-24.log' is
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
122 # created each time you start the server.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
123 ## from MoinMoin.util.profile import Profiler
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
124 ## memoryProfile = Profiler(name, requestsPerSample=100, collect=0)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
125
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
126 # Hotshot profile (default commented)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
127 # Not compatible with threads - use with SimpleServer only.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
128 ## hotshotProfile = name + '.prof'
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
129
2419
123974b5c8b5 added cProfile support to standalone, thanks to rayvd
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2338
diff changeset
130 # cProfile profile (default commented)
123974b5c8b5 added cProfile support to standalone, thanks to rayvd
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2338
diff changeset
131 # Use with SimpleServer only.
123974b5c8b5 added cProfile support to standalone, thanks to rayvd
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2338
diff changeset
132 ## cProfileProfile = name + '.prof'
123974b5c8b5 added cProfile support to standalone, thanks to rayvd
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2338
diff changeset
133
2249
d48a4d0a0c70 pycallgraph support
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1948
diff changeset
134 # Using pycallgraph to make nice graphics of how moin works internally
d48a4d0a0c70 pycallgraph support
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1948
diff changeset
135 # hint: using zgrviewer to view .dot is much more effective than using
d48a4d0a0c70 pycallgraph support
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1948
diff changeset
136 # some .png viewer
d48a4d0a0c70 pycallgraph support
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1948
diff changeset
137 ##pycallgraph_output = 'moin-pycallgraph.dot' # can be either .dot or .png
d48a4d0a0c70 pycallgraph support
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1948
diff changeset
138 ##serverClass = 'SimpleServer' # pycallgraph doesn't support multithreading
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
139
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
140 try:
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
141 from wikiserverconfig import Config
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
142 except ImportError:
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
143 Config = DefaultConfig
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
144
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
145 if __name__ == '__main__':
1597
bbe187af4fc0 integrated MMDE (build scripts need more work)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1582
diff changeset
146 # Run moin moin server:
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
147 run(Config)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
148