<# if keywords: print "" % keywords if description: desc = ' '.join(description.split()) print "" % desc #>

skip to navigation
skip to content

Quick Links (2.5)

Python Jobs

Donate to the PSF

Report website bug

<# from rest2web import restutils def box (class_, content): """ Output a box for the home page of the specified CSS class, and containing the content. """ return """
%s
""" % (class_, class_, content) if boxes: print '
' for box_name in boxes.split(): rest = open(box_name + '.txt', 'r').read() rest = unicode(rest) # XXX use an encoding here d = restutils.html_parts(rest) html = d['html_title'].replace('h1', 'h4') + d['fragment'] print box(box_name, html) print '
' #> <% body %>