annotate roundup-server @ 269:82cfd78f3c4e

Fixed a typo, thanks Jean Jordaan.
author Richard Jones <richard@users.sourceforge.net>
date Mon, 08 Oct 2001 23:36:44 +0000
parents a671e5917b33
children c2f287327ca8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
1 #!/usr/bin/python
213
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
2 #
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
3 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
4 # This module is free software, and you may redistribute it and/or modify
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
5 # under the same terms as Python, so long as this copyright message and
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
6 # disclaimer are retained in their original form.
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
7 #
214
18134bffab37 stupid typo
Richard Jones <richard@users.sourceforge.net>
parents: 213
diff changeset
8 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR
213
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
9 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
10 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
11 # POSSIBILITY OF SUCH DAMAGE.
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
12 #
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
13 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
18 #
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
19 """ HTTP Server that serves roundup.
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
20
213
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
21 Based on CGIHTTPServer in the Python library.
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
22
264
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
23 $Id: roundup-server,v 1.13 2001-10-05 02:23:24 richard Exp $
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
24
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
25 """
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
26 import sys
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
27 if int(sys.version[0]) < 2:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
28 print "Content-Type: text/plain\n"
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
29 print "Roundup requires Python 2.0 or newer."
32
b475e7d3ce52 actually quit if python version wrong
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents: 27
diff changeset
30 sys.exit(0)
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
31
190
996eaf90c01e Instance import now imports the instance using imp.load_module...
Richard Jones <richard@users.sourceforge.net>
parents: 127
diff changeset
32 import os, urllib, StringIO, traceback, cgi, binascii, string, getopt, imp
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
33 import BaseHTTPServer
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
34 import SimpleHTTPServer
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
35
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
36 # Roundup modules of use here
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
37 from roundup import cgitb, cgi_client
204
c1461733cbf9 Instances are now opened by a special function...
Richard Jones <richard@users.sourceforge.net>
parents: 193
diff changeset
38 import roundup.instance
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
39
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
40 #
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
41 ## Configuration
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
42 #
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
43
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
44 # This indicates where the Roundup instance lives
52
33bfce110d1e Fixed the ROUNDUPS decl in roundup-server
Richard Jones <richard@users.sourceforge.net>
parents: 32
diff changeset
45 ROUNDUP_INSTANCE_HOMES = {
54
b68bcb176d1a disabled the reloading until it can be done properly
Richard Jones <richard@users.sourceforge.net>
parents: 52
diff changeset
46 'bar': '/tmp/bar',
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
47 }
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
48
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
49 # Where to log debugging information to. Use an instance of DevNull if you
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
50 # don't want to log anywhere.
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
51 # TODO: actually use this stuff
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
52 #class DevNull:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
53 # def write(self, info):
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
54 # pass
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
55 #LOG = open('/var/log/roundup.cgi.log', 'a')
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
56 #LOG = DevNull()
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
57
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
58 #
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
59 ## end configuration
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
60 #
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
61
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
62
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
63 class RoundupRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
61
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
64 ROUNDUP_INSTANCE_HOMES = ROUNDUP_INSTANCE_HOMES
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
65 def send_head(self):
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
66 """Version of send_head that support CGI scripts"""
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
67 # TODO: actually do the HEAD ...
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
68 return self.run_cgi()
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
69
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
70 def run_cgi(self):
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
71 """ Execute the CGI command. Wrap an innner call in an error
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
72 handler so all errors can be caught.
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
73 """
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
74 save_stdin = sys.stdin
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
75 sys.stdin = self.rfile
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
76 try:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
77 self.inner_run_cgi()
264
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
78 except cgi_client.NotFound:
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
79 self.send_error(404, self.path)
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
80 except cgi_client.Unauthorised:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
81 self.wfile.write('Content-Type: text/html\n')
264
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
82 self.wfile.write('Status: 403\n\n')
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
83 self.wfile.write('You are not authorised to access this URL.')
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
84 except:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
85 try:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
86 reload(cgitb)
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
87 self.wfile.write("Content-Type: text/html\n\n")
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
88 self.wfile.write(cgitb.breaker())
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
89 self.wfile.write(cgitb.html())
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
90 except:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
91 self.wfile.write("Content-Type: text/html\n\n")
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
92 self.wfile.write("<pre>")
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
93 s = StringIO.StringIO()
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
94 traceback.print_exc(None, s)
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
95 self.wfile.write(cgi.escape(s.getvalue()))
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
96 self.wfile.write("</pre>\n")
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
97 sys.stdin = save_stdin
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
98
252
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
99 def index(self):
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
100 ''' Print up an index of the available instances
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
101 '''
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
102 w = self.wfile.write
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
103 w("Content-Type: text/html\n\n")
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
104 w('<html><head><title>Roundup instances index</title><head>\n')
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
105 w('<body><h1>Roundup instances index</h1><ol>\n')
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
106 for instance in self.ROUNDUP_INSTANCE_HOMES.keys():
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
107 w('<li><a href="%s/index">%s</a>\n'%(urllib.quote(instance),
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
108 instance))
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
109 w('</ol></body></html>')
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
110
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
111 def inner_run_cgi(self):
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
112 ''' This is the inner part of the CGI handling
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
113 '''
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
114
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
115 rest = self.path
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
116 i = rest.rfind('?')
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
117 if i >= 0:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
118 rest, query = rest[:i], rest[i+1:]
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
119 else:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
120 query = ''
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
121
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
122 # figure the instance
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
123 if rest == '/':
252
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
124 return self.index()
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
125 l_path = string.split(rest, '/')
264
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
126 instance_name = urllib.unquote(l_path[1])
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
127 if self.ROUNDUP_INSTANCE_HOMES.has_key(instance_name):
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
128 instance_home = self.ROUNDUP_INSTANCE_HOMES[instance_name]
204
c1461733cbf9 Instances are now opened by a special function...
Richard Jones <richard@users.sourceforge.net>
parents: 193
diff changeset
129 instance = roundup.instance.open(instance_home)
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
130 else:
264
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
131 raise cgi_client.NotFound
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
132
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
133 # figure out what the rest of the path is
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
134 if len(l_path) > 2:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
135 rest = '/'.join(l_path[2:])
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
136 else:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
137 rest = '/'
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
138
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
139 # Set up the CGI environment
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
140 env = {}
264
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
141 env['INSTANCE_NAME'] = instance_name
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
142 env['REQUEST_METHOD'] = self.command
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
143 env['PATH_INFO'] = urllib.unquote(rest)
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
144 if query:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
145 env['QUERY_STRING'] = query
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
146 host = self.address_string()
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
147 if self.headers.typeheader is None:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
148 env['CONTENT_TYPE'] = self.headers.type
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
149 else:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
150 env['CONTENT_TYPE'] = self.headers.typeheader
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
151 length = self.headers.getheader('content-length')
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
152 if length:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
153 env['CONTENT_LENGTH'] = length
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
154 co = filter(None, self.headers.getheaders('cookie'))
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
155 if co:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
156 env['HTTP_COOKIE'] = ', '.join(co)
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
157 env['SCRIPT_NAME'] = ''
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
158 env['SERVER_NAME'] = self.server.server_name
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
159 env['SERVER_PORT'] = str(self.server.server_port)
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
160
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
161 decoded_query = query.replace('+', ' ')
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
162
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
163 # if root, setuid to nobody
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
164 # TODO why isn't this done much earlier? - say, in main()?
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
165 if not os.getuid():
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
166 nobody = nobody_uid()
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
167 os.setuid(nobody)
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
168
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
169 # reload all modules
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
170 # TODO check for file timestamp changes and dependencies
54
b68bcb176d1a disabled the reloading until it can be done properly
Richard Jones <richard@users.sourceforge.net>
parents: 52
diff changeset
171 #reload(date)
b68bcb176d1a disabled the reloading until it can be done properly
Richard Jones <richard@users.sourceforge.net>
parents: 52
diff changeset
172 #reload(hyperdb)
b68bcb176d1a disabled the reloading until it can be done properly
Richard Jones <richard@users.sourceforge.net>
parents: 52
diff changeset
173 #reload(roundupdb)
b68bcb176d1a disabled the reloading until it can be done properly
Richard Jones <richard@users.sourceforge.net>
parents: 52
diff changeset
174 #reload(htmltemplate)
b68bcb176d1a disabled the reloading until it can be done properly
Richard Jones <richard@users.sourceforge.net>
parents: 52
diff changeset
175 #reload(cgi_client)
b68bcb176d1a disabled the reloading until it can be done properly
Richard Jones <richard@users.sourceforge.net>
parents: 52
diff changeset
176 #sys.path.insert(0, module_path)
b68bcb176d1a disabled the reloading until it can be done properly
Richard Jones <richard@users.sourceforge.net>
parents: 52
diff changeset
177 #try:
b68bcb176d1a disabled the reloading until it can be done properly
Richard Jones <richard@users.sourceforge.net>
parents: 52
diff changeset
178 # reload(instance)
b68bcb176d1a disabled the reloading until it can be done properly
Richard Jones <richard@users.sourceforge.net>
parents: 52
diff changeset
179 #finally:
b68bcb176d1a disabled the reloading until it can be done properly
Richard Jones <richard@users.sourceforge.net>
parents: 52
diff changeset
180 # del sys.path[0]
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
181
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
182 self.send_response(200, "Script output follows")
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
183
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
184 # do the roundup thang
264
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
185 client = instance.Client(instance, self.wfile, env)
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
186 client.main()
264
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
187
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
188 do_POST = run_cgi
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
189
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
190 nobody = None
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
191
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
192 def nobody_uid():
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
193 """Internal routine to get nobody's uid"""
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
194 global nobody
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
195 if nobody:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
196 return nobody
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
197 try:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
198 import pwd
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
199 except ImportError:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
200 return -1
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
201 try:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
202 nobody = pwd.getpwnam('nobody')[2]
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
203 except KeyError:
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
204 nobody = 1 + max(map(lambda x: x[2], pwd.getpwall()))
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
205 return nobody
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
206
61
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
207 def usage(message=''):
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
208 if message: message = 'Error: %s\n'%message
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
209 print '''%sUsage:
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
210 roundup-server [-n hostname] [-p port] [name=instance home]*
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
211
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
212 -n: sets the host name
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
213 -p: sets the port to listen on
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
214
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
215 name=instance home
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
216 Sets the instance home(s) to use. The name is how the instance is
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
217 identified in the URL (it's the first part of the URL path). The
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
218 instance home is the directory that was identified when you did
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
219 "roundup-admin init". You may specify any number of these name=home
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
220 pairs on the command-line. For convenience, you may edit the
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
221 ROUNDUP_INSTANCE_HOMES variable in the roundup-server file instead.
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
222 '''%message
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
223 sys.exit(0)
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
224
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
225 def main():
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
226 hostname = ''
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
227 port = 8080
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
228 try:
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
229 # handle the command-line args
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
230 optlist, args = getopt.getopt(sys.argv[1:], 'n:p:')
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
231 for (opt, arg) in optlist:
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
232 if opt == '-n': hostname = arg
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
233 elif opt == '-p': port = int(arg)
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
234 elif opt == '-h': usage()
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
235
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
236 # handle instance specs
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
237 if args:
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
238 d = {}
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
239 for arg in args:
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
240 name, home = string.split(arg, '=')
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
241 d[name] = home
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
242 RoundupRequestHandler.ROUNDUP_INSTANCE_HOMES = d
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
243 except:
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
244 type, value = sys.exc_info()[:2]
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
245 usage('%s: %s'%(type, value))
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
246
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
247 # we don't want the cgi module interpreting the command-line args ;)
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
248 sys.argv = sys.argv[:1]
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
249 address = (hostname, port)
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
250 httpd = BaseHTTPServer.HTTPServer(address, RoundupRequestHandler)
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
251 print 'Roundup server started on', address
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
252 httpd.serve_forever()
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
253
61
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
254 if __name__ == '__main__':
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
255 main()
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
256
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
257 #
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
258 # $Log: not supported by cvs2svn $
264
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
259 # Revision 1.12 2001/09/29 13:27:00 richard
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
260 # CGI interfaces now spit up a top-level index of all the instances they can
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
261 # serve.
a671e5917b33 Many features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents: 252
diff changeset
262 #
252
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
263 # Revision 1.11 2001/08/07 00:24:42 richard
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
264 # stupid typo
76c6994aa4e8 CGI interfaces now spit up a top-level index of all instances they can serve.
Richard Jones <richard@users.sourceforge.net>
parents: 214
diff changeset
265 #
214
18134bffab37 stupid typo
Richard Jones <richard@users.sourceforge.net>
parents: 213
diff changeset
266 # Revision 1.10 2001/08/07 00:15:51 richard
18134bffab37 stupid typo
Richard Jones <richard@users.sourceforge.net>
parents: 213
diff changeset
267 # Added the copyright/license notice to (nearly) all files at request of
18134bffab37 stupid typo
Richard Jones <richard@users.sourceforge.net>
parents: 213
diff changeset
268 # Bizar Software.
18134bffab37 stupid typo
Richard Jones <richard@users.sourceforge.net>
parents: 213
diff changeset
269 #
213
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
270 # Revision 1.9 2001/08/05 07:44:36 richard
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
271 # Instances are now opened by a special function that generates a unique
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
272 # module name for the instances on import time.
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 204
diff changeset
273 #
204
c1461733cbf9 Instances are now opened by a special function...
Richard Jones <richard@users.sourceforge.net>
parents: 193
diff changeset
274 # Revision 1.8 2001/08/03 01:28:33 richard
c1461733cbf9 Instances are now opened by a special function...
Richard Jones <richard@users.sourceforge.net>
parents: 193
diff changeset
275 # Used the much nicer load_package, pointed out by Steve Majewski.
c1461733cbf9 Instances are now opened by a special function...
Richard Jones <richard@users.sourceforge.net>
parents: 193
diff changeset
276 #
193
241a0323aacb Used the much nicer load_package, pointed out by Steve Majewski.
Richard Jones <richard@users.sourceforge.net>
parents: 190
diff changeset
277 # Revision 1.7 2001/08/03 00:59:34 richard
241a0323aacb Used the much nicer load_package, pointed out by Steve Majewski.
Richard Jones <richard@users.sourceforge.net>
parents: 190
diff changeset
278 # Instance import now imports the instance using imp.load_module so that
241a0323aacb Used the much nicer load_package, pointed out by Steve Majewski.
Richard Jones <richard@users.sourceforge.net>
parents: 190
diff changeset
279 # we can have instance homes of "roundup" or other existing python package
241a0323aacb Used the much nicer load_package, pointed out by Steve Majewski.
Richard Jones <richard@users.sourceforge.net>
parents: 190
diff changeset
280 # names.
241a0323aacb Used the much nicer load_package, pointed out by Steve Majewski.
Richard Jones <richard@users.sourceforge.net>
parents: 190
diff changeset
281 #
190
996eaf90c01e Instance import now imports the instance using imp.load_module...
Richard Jones <richard@users.sourceforge.net>
parents: 127
diff changeset
282 # Revision 1.6 2001/07/29 07:01:39 richard
996eaf90c01e Instance import now imports the instance using imp.load_module...
Richard Jones <richard@users.sourceforge.net>
parents: 127
diff changeset
283 # Added vim command to all source so that we don't get no steenkin' tabs :)
996eaf90c01e Instance import now imports the instance using imp.load_module...
Richard Jones <richard@users.sourceforge.net>
parents: 127
diff changeset
284 #
127
0791d13baea7 Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents: 61
diff changeset
285 # Revision 1.5 2001/07/24 01:07:59 richard
0791d13baea7 Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents: 61
diff changeset
286 # Added command-line arg handling to roundup-server so it's more useful
0791d13baea7 Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents: 61
diff changeset
287 # out-of-the-box.
0791d13baea7 Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents: 61
diff changeset
288 #
61
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
289 # Revision 1.4 2001/07/23 10:31:45 richard
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
290 # disabled the reloading until it can be done properly
820c8bb1b71a Added command-line arg handling to roundup-server...
Richard Jones <richard@users.sourceforge.net>
parents: 54
diff changeset
291 #
54
b68bcb176d1a disabled the reloading until it can be done properly
Richard Jones <richard@users.sourceforge.net>
parents: 52
diff changeset
292 # Revision 1.3 2001/07/23 08:53:44 richard
b68bcb176d1a disabled the reloading until it can be done properly
Richard Jones <richard@users.sourceforge.net>
parents: 52
diff changeset
293 # Fixed the ROUNDUPS decl in roundup-server
b68bcb176d1a disabled the reloading until it can be done properly
Richard Jones <richard@users.sourceforge.net>
parents: 52
diff changeset
294 # Move the installation notes to INSTALL
b68bcb176d1a disabled the reloading until it can be done properly
Richard Jones <richard@users.sourceforge.net>
parents: 52
diff changeset
295 #
52
33bfce110d1e Fixed the ROUNDUPS decl in roundup-server
Richard Jones <richard@users.sourceforge.net>
parents: 32
diff changeset
296 # Revision 1.2 2001/07/23 04:05:05 anthonybaxter
33bfce110d1e Fixed the ROUNDUPS decl in roundup-server
Richard Jones <richard@users.sourceforge.net>
parents: 32
diff changeset
297 # actually quit if python version wrong
33bfce110d1e Fixed the ROUNDUPS decl in roundup-server
Richard Jones <richard@users.sourceforge.net>
parents: 32
diff changeset
298 #
32
b475e7d3ce52 actually quit if python version wrong
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents: 27
diff changeset
299 # Revision 1.1 2001/07/23 03:46:48 richard
b475e7d3ce52 actually quit if python version wrong
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents: 27
diff changeset
300 # moving the bin files to facilitate out-of-the-boxness
b475e7d3ce52 actually quit if python version wrong
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents: 27
diff changeset
301 #
27
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
302 # Revision 1.1 2001/07/22 11:15:45 richard
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
303 # More Grande Splite stuff
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
304 #
e5e9ea306a09 moving the bin files to facilitate out-of-the-boxness
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
305 #
127
0791d13baea7 Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents: 61
diff changeset
306 # vim: set filetype=python ts=4 sw=4 et si

Roundup Issue Tracker: http://roundup-tracker.org/