Changeset 69
- Timestamp:
- 07/30/07 14:46:22 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
projects/Twisted-Goodies/trunk/misc/var_www_foss.tellectual.com_index.py
r68 r69 204 204 205 205 projectName, subSegments = segments[0], list(segments[1:]) 206 if subSegments and not subSegments[-1]: 207 listOp('pop') 206 208 if not subSegments: 207 209 listOp('append', 'wiki') projects/Twisted-Goodies/trunk/twisted_goodies/simpleserver/http/resources/projects.py
r65 r69 23 23 """ 24 24 25 import tempfile, shutil, os .path, re25 import tempfile, shutil, os, os.path, re, dircache 26 26 from twisted.internet import defer, utils 27 27 from twisted.python import procutils … … 176 176 """ 177 177 downloadURLProto = "/download/%s" 178 downloadExtensions = ('.egg', '.zip', '.exe', '.gz', '.bz2') 178 179 style = { 179 180 "H1":\ … … 194 195 downloadDir = os.path.join(self.vhostPath, 'download') 195 196 listing = [] 196 for fileName in os.listdir(downloadDir):197 for fileName in dircache.listdir(downloadDir): 197 198 if not fileName.startswith(self.projectName): 198 199 continue … … 201 202 202 203 def _sectionEasyInstall(self): 204 if "%s.ez_setup" % self.projectName in self._pertinentFiles()[1]: 205 return [ 206 T.h2["Setup Tools (the easiest way)"], 207 T.p(id="code")["easy_install %s" % self.projectName]] 208 return [] 209 210 def _sectionSVN(self): 211 url = self.projectRepoProto % self.projectName 203 212 return [ 204 T.h2["Setup Tools (the easiest way)"], 205 T.p(id="code")["easy_install %s" % self.projectName]] 206 213 T.h2["SVN Checkout"], 214 T.p(id="code")["svn co %s %s" % (url, self.projectName)], 215 T.p["The current source code (\"trunk\") will appear in the "+\ 216 "\"%s\" subdirectory. You can go there and install with"], 217 T.p(id="code")["sudo python setup.py install"]] 218 207 219 def _sectionInstallFiles(self): 208 220 listing = [] 209 221 for fileName in self._pertinentFiles()[1]: 210 href = self.downloadURLProto % fileName 211 item = T.li[T.a(href=href)[fileName]] 212 listing.append(item) 213 return [T.h2["Install Files"], T.ul[listing]] 222 if os.path.splitext(fileName)[1] in self.downloadExtensions: 223 href = self.downloadURLProto % fileName 224 item = T.li[T.a(href=href)[fileName]] 225 listing.append(item) 226 return [ 227 T.h2["Install Files"], 228 T.p["You can download one of the following files and use it to "+\ 229 "install %s, either by executing them (for Windows "+\ 230 "\".exe\" files) or extracting their archived files and "+\ 231 "using the setup.py script."], 232 T.ul[listing]] 214 233 215 234 def render(self, request): … … 221 240 body = [T.img(src='/banner.png'), T.hr, T.h1[self.title], T.p[msg]] 222 241 body += self._sectionEasyInstall() 242 body += self._sectionSVN() 223 243 body += self._sectionInstallFiles() 224 244 href = self.projectURLProto % self.projectName projects/Twisted-Goodies/trunk/twisted_goodies/simpleserver/smtp/__init__.py
r68 r69 18 18 """ 19 19 20 from server import Factory20 #from server import Factory 21 21 22 22 23 def factory(master, config): 24 return Factory(master.checker, config) 23 factory = None 24 #def factory(master, config): 25 # return Factory(master.checker, config) 25 26
