From 58b2af638cde9ecd0a842fffbcb76cc8c42663ea Mon Sep 17 00:00:00 2001 Message-Id: <58b2af638cde9ecd0a842fffbcb76cc8c42663ea.1714870203.git.mdw@distorted.org.uk> From: Mark Wooding Date: Fri, 8 Mar 2013 07:12:25 +0000 Subject: [PATCH] cgi.py: Remove defunct `html' function. Organization: Straylight/Edgeware From: Mark Wooding --- cgi.py | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/cgi.py b/cgi.py index 02797ce..0630feb 100644 --- a/cgi.py +++ b/cgi.py @@ -166,47 +166,6 @@ def static(name): """Build a URL for the static file NAME.""" return htmlescape(CFG.STATIC + '/' + name) -@CTX.contextmanager -def html(title, **kw): - """ - Context manager for HTML output. - - Keyword arguments are output as HTTP headers (if no header has been written - yet). A `' element is written, and a `' opened, before the - context body is executed; the elements are closed off properly at the end. - """ - - kw = dict(kw, content_type = 'text/html') - OUT.header(**kw) - - ## Write the HTML header. - PRINT("""\ - - - - %(title)s - - - -""" % dict(title = html_quotify(title), - style = static('chpwd.css'), - script = static('chpwd.js'))) - - ## Write the body. - PRINT('') - yield None - PRINT('''\ - -
- Chopwood, version %(version)s: - copyright © 2012 Mark Wooding -
- - -''' % dict(about = static('about.html'), - version = VERSION)) - def redirect(where, **kw): """ Write a complete redirection to some other URL. -- [mdw]