Changeset 69

Show
Ignore:
Timestamp:
07/30/07 14:46:22 (1 year ago)
Author:
edsuom
Message:

Minor fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • projects/Twisted-Goodies/trunk/misc/var_www_foss.tellectual.com_index.py

    r68 r69  
    204204 
    205205        projectName, subSegments = segments[0], list(segments[1:]) 
     206        if subSegments and not subSegments[-1]: 
     207            listOp('pop') 
    206208        if not subSegments: 
    207209            listOp('append', 'wiki') 
  • projects/Twisted-Goodies/trunk/twisted_goodies/simpleserver/http/resources/projects.py

    r65 r69  
    2323""" 
    2424 
    25 import tempfile, shutil, os.path, r
     25import tempfile, shutil, os, os.path, re, dircach
    2626from twisted.internet import defer, utils 
    2727from twisted.python import procutils 
     
    176176    """ 
    177177    downloadURLProto = "/download/%s" 
     178    downloadExtensions = ('.egg', '.zip', '.exe', '.gz', '.bz2') 
    178179    style = { 
    179180        "H1":\ 
     
    194195        downloadDir = os.path.join(self.vhostPath, 'download') 
    195196        listing = [] 
    196         for fileName in os.listdir(downloadDir): 
     197        for fileName in dircache.listdir(downloadDir): 
    197198            if not fileName.startswith(self.projectName): 
    198199                continue 
     
    201202 
    202203    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 
    203212        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         
    207219    def _sectionInstallFiles(self): 
    208220        listing = [] 
    209221        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]] 
    214233 
    215234    def render(self, request): 
     
    221240        body  = [T.img(src='/banner.png'), T.hr, T.h1[self.title], T.p[msg]] 
    222241        body += self._sectionEasyInstall() 
     242        body += self._sectionSVN() 
    223243        body += self._sectionInstallFiles() 
    224244        href = self.projectURLProto % self.projectName 
  • projects/Twisted-Goodies/trunk/twisted_goodies/simpleserver/smtp/__init__.py

    r68 r69  
    1818""" 
    1919 
    20 from server import Factory 
     20#from server import Factory 
    2121 
    2222 
    23 def factory(master, config): 
    24     return Factory(master.checker, config) 
     23factory = None 
     24#def factory(master, config): 
     25#    return Factory(master.checker, config) 
    2526