home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Freeware / Miro 1.0 / Miro_Installer.exe / Miro_Downloader.exe / compiled_templates / unittest / simple.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2007-11-12  |  1.8 KB  |  34 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.5)
  3.  
  4. from template import Handle, fillAttr, quoteAndFillAttr, fillStaticTemplate
  5. from StringIO import StringIO
  6. from xhtmltools import urlencode
  7. from templatehelper import quoteattr, escape
  8. from string import Template
  9. import app
  10. import views
  11. import sorts
  12. import indexes
  13. import filters
  14. import resources
  15. import gtcache
  16. _ = gtcache.gettext
  17.  
  18. def fillTemplate(domHandler, dtvPlatform, eventCookie, bodyTagExtra, *args, **kargs):
  19.     localvars = locals()
  20.     localvars.update(globals())
  21.     handle = Handle(domHandler, localvars, onUnlink = (lambda : None))
  22.     out = StringIO()
  23.     out.write(u'<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n')
  24.     out.write(u'<html dtvPlatform="')
  25.     out.write(quoteattr(urlencode(dtvPlatform)))
  26.     out.write(u'" eventCookie="')
  27.     out.write(quoteattr(urlencode(eventCookie)))
  28.     out.write(u'" xmlns:t="http://www.participatorypolitics.org/" xmlns="http://www.w3.org/1999/xhtml">\n<head>\n<meta content="text/html; charset=utf-8" http-equiv="content-type"></meta>\n\n</head>\n<body')
  29.     out.write(u' ' + bodyTagExtra)
  30.     out.write(u'>\n<h1>simple template</h1>\n\n</body>\n</html>')
  31.     out.seek(0)
  32.     return (out, handle)
  33.  
  34.