[Python-checkins] benchmarks: Update mako_v2 to use Mako 0.7.3.

brett.cannon python-checkins at python.org
Fri Nov 9 01:08:43 CET 2012


http://hg.python.org/benchmarks/rev/d456cee3fd8a
changeset:   191:d456cee3fd8a
user:        Brett Cannon <brett at python.org>
date:        Thu Nov 08 19:07:59 2012 -0500
summary:
  Update mako_v2 to use Mako 0.7.3.

Once speed.python.org is up and running and relying on historic data
then upgrading library versions probably should be avoided.

files:
  lib/Mako-0.7.3/CHANGES                                        |   847 ++++++
  lib/Mako-0.7.3/LICENSE                                        |    20 +
  lib/Mako-0.7.3/MANIFEST.in                                    |    11 +
  lib/Mako-0.7.3/Mako.egg-info/PKG-INFO                         |    71 +
  lib/Mako-0.7.3/Mako.egg-info/SOURCES.txt                      |   171 +
  lib/Mako-0.7.3/Mako.egg-info/dependency_links.txt             |     1 +
  lib/Mako-0.7.3/Mako.egg-info/entry_points.txt                 |    14 +
  lib/Mako-0.7.3/Mako.egg-info/not-zip-safe                     |     1 +
  lib/Mako-0.7.3/Mako.egg-info/requires.txt                     |     4 +
  lib/Mako-0.7.3/Mako.egg-info/top_level.txt                    |     1 +
  lib/Mako-0.7.3/PKG-INFO                                       |    71 +
  lib/Mako-0.7.3/README.rst                                     |    52 +
  lib/Mako-0.7.3/distribute_setup.py                            |   485 +++
  lib/Mako-0.7.3/doc/_sources/caching.txt                       |   393 +++
  lib/Mako-0.7.3/doc/_sources/defs.txt                          |   622 +++++
  lib/Mako-0.7.3/doc/_sources/filtering.txt                     |   344 ++
  lib/Mako-0.7.3/doc/_sources/index.txt                         |    22 +
  lib/Mako-0.7.3/doc/_sources/inheritance.txt                   |   534 ++++
  lib/Mako-0.7.3/doc/_sources/namespaces.txt                    |   349 ++
  lib/Mako-0.7.3/doc/_sources/runtime.txt                       |   448 +++
  lib/Mako-0.7.3/doc/_sources/syntax.txt                        |   469 +++
  lib/Mako-0.7.3/doc/_sources/unicode.txt                       |   345 ++
  lib/Mako-0.7.3/doc/_sources/usage.txt                         |   520 ++++
  lib/Mako-0.7.3/doc/_static/basic.css                          |   540 ++++
  lib/Mako-0.7.3/doc/_static/comment-bright.png                 |   Bin 
  lib/Mako-0.7.3/doc/_static/comment-close.png                  |   Bin 
  lib/Mako-0.7.3/doc/_static/comment.png                        |   Bin 
  lib/Mako-0.7.3/doc/_static/default.css                        |   256 ++
  lib/Mako-0.7.3/doc/_static/docs.css                           |   438 +++
  lib/Mako-0.7.3/doc/_static/doctools.js                        |   247 +
  lib/Mako-0.7.3/doc/_static/down-pressed.png                   |   Bin 
  lib/Mako-0.7.3/doc/_static/down.png                           |   Bin 
  lib/Mako-0.7.3/doc/_static/file.png                           |   Bin 
  lib/Mako-0.7.3/doc/_static/jquery.js                          |   154 +
  lib/Mako-0.7.3/doc/_static/makoLogo.png                       |   Bin 
  lib/Mako-0.7.3/doc/_static/minus.png                          |   Bin 
  lib/Mako-0.7.3/doc/_static/plus.png                           |   Bin 
  lib/Mako-0.7.3/doc/_static/pygments.css                       |    62 +
  lib/Mako-0.7.3/doc/_static/searchtools.js                     |   560 ++++
  lib/Mako-0.7.3/doc/_static/sidebar.js                         |   151 +
  lib/Mako-0.7.3/doc/_static/site.css                           |    86 +
  lib/Mako-0.7.3/doc/_static/underscore.js                      |    23 +
  lib/Mako-0.7.3/doc/_static/up-pressed.png                     |   Bin 
  lib/Mako-0.7.3/doc/_static/up.png                             |   Bin 
  lib/Mako-0.7.3/doc/_static/websupport.js                      |   808 ++++++
  lib/Mako-0.7.3/doc/build/Makefile                             |   137 +
  lib/Mako-0.7.3/doc/build/builder/__init__.py                  |     0 
  lib/Mako-0.7.3/doc/build/builder/builders.py                  |    97 +
  lib/Mako-0.7.3/doc/build/builder/util.py                      |    12 +
  lib/Mako-0.7.3/doc/build/caching.rst                          |   393 +++
  lib/Mako-0.7.3/doc/build/conf.py                              |   287 ++
  lib/Mako-0.7.3/doc/build/defs.rst                             |   622 +++++
  lib/Mako-0.7.3/doc/build/filtering.rst                        |   344 ++
  lib/Mako-0.7.3/doc/build/index.rst                            |    22 +
  lib/Mako-0.7.3/doc/build/inheritance.rst                      |   534 ++++
  lib/Mako-0.7.3/doc/build/namespaces.rst                       |   349 ++
  lib/Mako-0.7.3/doc/build/runtime.rst                          |   448 +++
  lib/Mako-0.7.3/doc/build/static/docs.css                      |   438 +++
  lib/Mako-0.7.3/doc/build/static/makoLogo.png                  |   Bin 
  lib/Mako-0.7.3/doc/build/static/site.css                      |    86 +
  lib/Mako-0.7.3/doc/build/syntax.rst                           |   469 +++
  lib/Mako-0.7.3/doc/build/templates/base.mako                  |    60 +
  lib/Mako-0.7.3/doc/build/templates/genindex.mako              |    77 +
  lib/Mako-0.7.3/doc/build/templates/layout.mako                |   199 +
  lib/Mako-0.7.3/doc/build/templates/page.mako                  |     2 +
  lib/Mako-0.7.3/doc/build/templates/rtd_layout.mako            |   174 +
  lib/Mako-0.7.3/doc/build/templates/search.mako                |    25 +
  lib/Mako-0.7.3/doc/build/unicode.rst                          |   345 ++
  lib/Mako-0.7.3/doc/build/usage.rst                            |   520 ++++
  lib/Mako-0.7.3/doc/caching.html                               |   779 ++++++
  lib/Mako-0.7.3/doc/defs.html                                  |   728 +++++
  lib/Mako-0.7.3/doc/filtering.html                             |   478 +++
  lib/Mako-0.7.3/doc/genindex.html                              |   916 +++++++
  lib/Mako-0.7.3/doc/index.html                                 |   230 +
  lib/Mako-0.7.3/doc/inheritance.html                           |   673 +++++
  lib/Mako-0.7.3/doc/namespaces.html                            |   649 +++++
  lib/Mako-0.7.3/doc/runtime.html                               |   710 +++++
  lib/Mako-0.7.3/doc/search.html                                |   162 +
  lib/Mako-0.7.3/doc/searchindex.js                             |     1 +
  lib/Mako-0.7.3/doc/syntax.html                                |   596 ++++
  lib/Mako-0.7.3/doc/unicode.html                               |   476 +++
  lib/Mako-0.7.3/doc/usage.html                                 |  1057 ++++++++
  lib/Mako-0.7.3/examples/bench/basic.py                        |   191 +
  lib/Mako-0.7.3/examples/bench/cheetah/footer.tmpl             |     2 +
  lib/Mako-0.7.3/examples/bench/cheetah/header.tmpl             |     5 +
  lib/Mako-0.7.3/examples/bench/cheetah/template.tmpl           |    31 +
  lib/Mako-0.7.3/examples/bench/django/templatetags/__init__.py |     0 
  lib/Mako-0.7.3/examples/bench/django/templatetags/bench.py    |     8 +
  lib/Mako-0.7.3/examples/bench/kid/base.kid                    |    15 +
  lib/Mako-0.7.3/examples/bench/kid/template.kid                |    22 +
  lib/Mako-0.7.3/examples/bench/myghty/base.myt                 |    29 +
  lib/Mako-0.7.3/examples/bench/myghty/template.myt             |    30 +
  lib/Mako-0.7.3/examples/wsgi/run_wsgi.py                      |    78 +
  lib/Mako-0.7.3/mako/__init__.py                               |     9 +
  lib/Mako-0.7.3/mako/_ast_util.py                              |   839 ++++++
  lib/Mako-0.7.3/mako/ast.py                                    |   151 +
  lib/Mako-0.7.3/mako/cache.py                                  |   236 +
  lib/Mako-0.7.3/mako/codegen.py                                |  1215 +++++++++
  lib/Mako-0.7.3/mako/exceptions.py                             |   362 ++
  lib/Mako-0.7.3/mako/ext/__init__.py                           |     0 
  lib/Mako-0.7.3/mako/ext/autohandler.py                        |    65 +
  lib/Mako-0.7.3/mako/ext/babelplugin.py                        |   132 +
  lib/Mako-0.7.3/mako/ext/beaker_cache.py                       |    70 +
  lib/Mako-0.7.3/mako/ext/preprocessors.py                      |    20 +
  lib/Mako-0.7.3/mako/ext/pygmentplugin.py                      |   122 +
  lib/Mako-0.7.3/mako/ext/turbogears.py                         |    57 +
  lib/Mako-0.7.3/mako/filters.py                                |   191 +
  lib/Mako-0.7.3/mako/lexer.py                                  |   442 +++
  lib/Mako-0.7.3/mako/lookup.py                                 |   354 ++
  lib/Mako-0.7.3/mako/parsetree.py                              |   596 ++++
  lib/Mako-0.7.3/mako/pygen.py                                  |   283 ++
  lib/Mako-0.7.3/mako/pyparser.py                               |   551 ++++
  lib/Mako-0.7.3/mako/runtime.py                                |   841 ++++++
  lib/Mako-0.7.3/mako/template.py                               |   650 +++++
  lib/Mako-0.7.3/mako/util.py                                   |   438 +++
  lib/Mako-0.7.3/scripts/mako-render                            |    46 +
  lib/Mako-0.7.3/setup.cfg                                      |     5 +
  lib/Mako-0.7.3/setup.py                                       |    62 +
  lib/Mako-0.7.3/test/__init__.py                               |   145 +
  lib/Mako-0.7.3/test/foo/__init__.py                           |     0 
  lib/Mako-0.7.3/test/foo/test_ns.py                            |     7 +
  lib/Mako-0.7.3/test/sample_module_namespace.py                |     7 +
  lib/Mako-0.7.3/test/templates/badbom.html                     |     2 +
  lib/Mako-0.7.3/test/templates/bom.html                        |     1 +
  lib/Mako-0.7.3/test/templates/bommagic.html                   |     2 +
  lib/Mako-0.7.3/test/templates/chs_unicode.html                |    11 +
  lib/Mako-0.7.3/test/templates/chs_unicode_py3k.html           |    11 +
  lib/Mako-0.7.3/test/templates/chs_utf8.html                   |    17 +
  lib/Mako-0.7.3/test/templates/crlf.html                       |    19 +
  lib/Mako-0.7.3/test/templates/foo/modtest.html.py             |    25 +
  lib/Mako-0.7.3/test/templates/gettext.mako                    |    89 +
  lib/Mako-0.7.3/test/templates/index.html                      |     1 +
  lib/Mako-0.7.3/test/templates/internationalization.html       |   920 +++++++
  lib/Mako-0.7.3/test/templates/modtest.html                    |     1 +
  lib/Mako-0.7.3/test/templates/othersubdir/foo.html            |     0 
  lib/Mako-0.7.3/test/templates/read_unicode.html               |    10 +
  lib/Mako-0.7.3/test/templates/read_unicode_py3k.html          |    10 +
  lib/Mako-0.7.3/test/templates/runtimeerr.html                 |     4 +
  lib/Mako-0.7.3/test/templates/runtimeerr_py3k.html            |     4 +
  lib/Mako-0.7.3/test/templates/subdir/foo/modtest.html.py      |    25 +
  lib/Mako-0.7.3/test/templates/subdir/incl.html                |     2 +
  lib/Mako-0.7.3/test/templates/subdir/index.html               |     3 +
  lib/Mako-0.7.3/test/templates/subdir/modtest.html             |     1 +
  lib/Mako-0.7.3/test/templates/unicode.html                    |     2 +
  lib/Mako-0.7.3/test/templates/unicode_arguments.html          |    10 +
  lib/Mako-0.7.3/test/templates/unicode_arguments_py3k.html     |    10 +
  lib/Mako-0.7.3/test/templates/unicode_code.html               |     7 +
  lib/Mako-0.7.3/test/templates/unicode_code_py3k.html          |     7 +
  lib/Mako-0.7.3/test/templates/unicode_expr.html               |     2 +
  lib/Mako-0.7.3/test/templates/unicode_expr_py3k.html          |     2 +
  lib/Mako-0.7.3/test/templates/unicode_runtime_error.html      |     2 +
  lib/Mako-0.7.3/test/templates/unicode_syntax_error.html       |     2 +
  lib/Mako-0.7.3/test/test_ast.py                               |   334 ++
  lib/Mako-0.7.3/test/test_babelplugin.py                       |    44 +
  lib/Mako-0.7.3/test/test_block.py                             |   569 ++++
  lib/Mako-0.7.3/test/test_cache.py                             |   557 ++++
  lib/Mako-0.7.3/test/test_call.py                              |   515 ++++
  lib/Mako-0.7.3/test/test_decorators.py                        |   110 +
  lib/Mako-0.7.3/test/test_def.py                               |   678 +++++
  lib/Mako-0.7.3/test/test_exceptions.py                        |   300 ++
  lib/Mako-0.7.3/test/test_filters.py                           |   335 ++
  lib/Mako-0.7.3/test/test_inheritance.py                       |   350 ++
  lib/Mako-0.7.3/test/test_lexer.py                             |   871 +++++++
  lib/Mako-0.7.3/test/test_lookup.py                            |   104 +
  lib/Mako-0.7.3/test/test_loop.py                              |   295 ++
  lib/Mako-0.7.3/test/test_lru.py                               |   111 +
  lib/Mako-0.7.3/test/test_namespace.py                         |   792 ++++++
  lib/Mako-0.7.3/test/test_pygen.py                             |   252 ++
  lib/Mako-0.7.3/test/test_template.py                          |  1242 ++++++++++
  lib/Mako-0.7.3/test/test_tgplugin.py                          |    42 +
  lib/Mako-0.7.3/test/test_util.py                              |    50 +
  lib/Mako-0.7.3/test/util.py                                   |     7 +
  lib/mako-0.7.2/CHANGES                                        |   825 ------
  lib/mako-0.7.2/LICENSE                                        |    20 -
  lib/mako-0.7.2/MANIFEST.in                                    |    11 -
  lib/mako-0.7.2/Mako.egg-info/PKG-INFO                         |    71 -
  lib/mako-0.7.2/Mako.egg-info/SOURCES.txt                      |   171 -
  lib/mako-0.7.2/Mako.egg-info/dependency_links.txt             |     1 -
  lib/mako-0.7.2/Mako.egg-info/entry_points.txt                 |    14 -
  lib/mako-0.7.2/Mako.egg-info/not-zip-safe                     |     1 -
  lib/mako-0.7.2/Mako.egg-info/requires.txt                     |     4 -
  lib/mako-0.7.2/Mako.egg-info/top_level.txt                    |     1 -
  lib/mako-0.7.2/PKG-INFO                                       |    71 -
  lib/mako-0.7.2/README.rst                                     |    52 -
  lib/mako-0.7.2/distribute_setup.py                            |   485 ---
  lib/mako-0.7.2/doc/_sources/caching.txt                       |   393 ---
  lib/mako-0.7.2/doc/_sources/defs.txt                          |   620 ----
  lib/mako-0.7.2/doc/_sources/filtering.txt                     |   344 --
  lib/mako-0.7.2/doc/_sources/index.txt                         |    22 -
  lib/mako-0.7.2/doc/_sources/inheritance.txt                   |   534 ----
  lib/mako-0.7.2/doc/_sources/namespaces.txt                    |   349 --
  lib/mako-0.7.2/doc/_sources/runtime.txt                       |   447 ---
  lib/mako-0.7.2/doc/_sources/syntax.txt                        |   469 ---
  lib/mako-0.7.2/doc/_sources/unicode.txt                       |   344 --
  lib/mako-0.7.2/doc/_sources/usage.txt                         |   520 ----
  lib/mako-0.7.2/doc/_static/basic.css                          |   540 ----
  lib/mako-0.7.2/doc/_static/comment-bright.png                 |   Bin 
  lib/mako-0.7.2/doc/_static/comment-close.png                  |   Bin 
  lib/mako-0.7.2/doc/_static/comment.png                        |   Bin 
  lib/mako-0.7.2/doc/_static/default.css                        |   256 --
  lib/mako-0.7.2/doc/_static/docs.css                           |   438 ---
  lib/mako-0.7.2/doc/_static/doctools.js                        |   247 -
  lib/mako-0.7.2/doc/_static/down-pressed.png                   |   Bin 
  lib/mako-0.7.2/doc/_static/down.png                           |   Bin 
  lib/mako-0.7.2/doc/_static/file.png                           |   Bin 
  lib/mako-0.7.2/doc/_static/jquery.js                          |   154 -
  lib/mako-0.7.2/doc/_static/makoLogo.png                       |   Bin 
  lib/mako-0.7.2/doc/_static/minus.png                          |   Bin 
  lib/mako-0.7.2/doc/_static/plus.png                           |   Bin 
  lib/mako-0.7.2/doc/_static/pygments.css                       |    62 -
  lib/mako-0.7.2/doc/_static/searchtools.js                     |   560 ----
  lib/mako-0.7.2/doc/_static/sidebar.js                         |   151 -
  lib/mako-0.7.2/doc/_static/site.css                           |    82 -
  lib/mako-0.7.2/doc/_static/underscore.js                      |    23 -
  lib/mako-0.7.2/doc/_static/up-pressed.png                     |   Bin 
  lib/mako-0.7.2/doc/_static/up.png                             |   Bin 
  lib/mako-0.7.2/doc/_static/websupport.js                      |   808 ------
  lib/mako-0.7.2/doc/build/Makefile                             |   137 -
  lib/mako-0.7.2/doc/build/builder/__init__.py                  |     0 
  lib/mako-0.7.2/doc/build/builder/builders.py                  |    97 -
  lib/mako-0.7.2/doc/build/builder/util.py                      |    12 -
  lib/mako-0.7.2/doc/build/caching.rst                          |   393 ---
  lib/mako-0.7.2/doc/build/conf.py                              |   287 --
  lib/mako-0.7.2/doc/build/defs.rst                             |   620 ----
  lib/mako-0.7.2/doc/build/filtering.rst                        |   344 --
  lib/mako-0.7.2/doc/build/index.rst                            |    22 -
  lib/mako-0.7.2/doc/build/inheritance.rst                      |   534 ----
  lib/mako-0.7.2/doc/build/namespaces.rst                       |   349 --
  lib/mako-0.7.2/doc/build/runtime.rst                          |   447 ---
  lib/mako-0.7.2/doc/build/static/docs.css                      |   438 ---
  lib/mako-0.7.2/doc/build/static/makoLogo.png                  |   Bin 
  lib/mako-0.7.2/doc/build/static/site.css                      |    82 -
  lib/mako-0.7.2/doc/build/syntax.rst                           |   469 ---
  lib/mako-0.7.2/doc/build/templates/base.mako                  |    51 -
  lib/mako-0.7.2/doc/build/templates/genindex.mako              |    77 -
  lib/mako-0.7.2/doc/build/templates/layout.mako                |   199 -
  lib/mako-0.7.2/doc/build/templates/page.mako                  |     2 -
  lib/mako-0.7.2/doc/build/templates/rtd_layout.mako            |   174 -
  lib/mako-0.7.2/doc/build/templates/search.mako                |    25 -
  lib/mako-0.7.2/doc/build/unicode.rst                          |   344 --
  lib/mako-0.7.2/doc/build/usage.rst                            |   520 ----
  lib/mako-0.7.2/doc/caching.html                               |   777 ------
  lib/mako-0.7.2/doc/defs.html                                  |   726 -----
  lib/mako-0.7.2/doc/filtering.html                             |   476 ---
  lib/mako-0.7.2/doc/genindex.html                              |   914 -------
  lib/mako-0.7.2/doc/index.html                                 |   228 -
  lib/mako-0.7.2/doc/inheritance.html                           |   671 -----
  lib/mako-0.7.2/doc/namespaces.html                            |   647 -----
  lib/mako-0.7.2/doc/runtime.html                               |   708 -----
  lib/mako-0.7.2/doc/search.html                                |   160 -
  lib/mako-0.7.2/doc/searchindex.js                             |     1 -
  lib/mako-0.7.2/doc/syntax.html                                |   594 ----
  lib/mako-0.7.2/doc/unicode.html                               |   474 ---
  lib/mako-0.7.2/doc/usage.html                                 |  1055 --------
  lib/mako-0.7.2/examples/bench/basic.py                        |   191 -
  lib/mako-0.7.2/examples/bench/cheetah/footer.tmpl             |     2 -
  lib/mako-0.7.2/examples/bench/cheetah/header.tmpl             |     5 -
  lib/mako-0.7.2/examples/bench/cheetah/template.tmpl           |    31 -
  lib/mako-0.7.2/examples/bench/django/templatetags/__init__.py |     0 
  lib/mako-0.7.2/examples/bench/django/templatetags/bench.py    |     8 -
  lib/mako-0.7.2/examples/bench/kid/base.kid                    |    15 -
  lib/mako-0.7.2/examples/bench/kid/template.kid                |    22 -
  lib/mako-0.7.2/examples/bench/myghty/base.myt                 |    29 -
  lib/mako-0.7.2/examples/bench/myghty/template.myt             |    30 -
  lib/mako-0.7.2/examples/wsgi/run_wsgi.py                      |    78 -
  lib/mako-0.7.2/mako/__init__.py                               |     9 -
  lib/mako-0.7.2/mako/_ast_util.py                              |   839 ------
  lib/mako-0.7.2/mako/ast.py                                    |   151 -
  lib/mako-0.7.2/mako/cache.py                                  |   236 -
  lib/mako-0.7.2/mako/codegen.py                                |  1209 ---------
  lib/mako-0.7.2/mako/exceptions.py                             |   362 --
  lib/mako-0.7.2/mako/ext/__init__.py                           |     0 
  lib/mako-0.7.2/mako/ext/autohandler.py                        |    65 -
  lib/mako-0.7.2/mako/ext/babelplugin.py                        |   132 -
  lib/mako-0.7.2/mako/ext/beaker_cache.py                       |    70 -
  lib/mako-0.7.2/mako/ext/preprocessors.py                      |    20 -
  lib/mako-0.7.2/mako/ext/pygmentplugin.py                      |   122 -
  lib/mako-0.7.2/mako/ext/turbogears.py                         |    57 -
  lib/mako-0.7.2/mako/filters.py                                |   189 -
  lib/mako-0.7.2/mako/lexer.py                                  |   442 ---
  lib/mako-0.7.2/mako/lookup.py                                 |   354 --
  lib/mako-0.7.2/mako/parsetree.py                              |   589 ----
  lib/mako-0.7.2/mako/pygen.py                                  |   283 --
  lib/mako-0.7.2/mako/pyparser.py                               |   535 ----
  lib/mako-0.7.2/mako/runtime.py                                |   841 ------
  lib/mako-0.7.2/mako/template.py                               |   650 -----
  lib/mako-0.7.2/mako/util.py                                   |   436 ---
  lib/mako-0.7.2/scripts/mako-render                            |    46 -
  lib/mako-0.7.2/setup.cfg                                      |     5 -
  lib/mako-0.7.2/setup.py                                       |    62 -
  lib/mako-0.7.2/test/__init__.py                               |   135 -
  lib/mako-0.7.2/test/foo/__init__.py                           |     0 
  lib/mako-0.7.2/test/foo/test_ns.py                            |     7 -
  lib/mako-0.7.2/test/sample_module_namespace.py                |     7 -
  lib/mako-0.7.2/test/templates/badbom.html                     |     2 -
  lib/mako-0.7.2/test/templates/bom.html                        |     1 -
  lib/mako-0.7.2/test/templates/bommagic.html                   |     2 -
  lib/mako-0.7.2/test/templates/chs_unicode.html                |    11 -
  lib/mako-0.7.2/test/templates/chs_unicode_py3k.html           |    11 -
  lib/mako-0.7.2/test/templates/chs_utf8.html                   |    17 -
  lib/mako-0.7.2/test/templates/crlf.html                       |    19 -
  lib/mako-0.7.2/test/templates/foo/modtest.html.py             |    25 -
  lib/mako-0.7.2/test/templates/gettext.mako                    |    89 -
  lib/mako-0.7.2/test/templates/index.html                      |     1 -
  lib/mako-0.7.2/test/templates/internationalization.html       |   920 -------
  lib/mako-0.7.2/test/templates/modtest.html                    |     1 -
  lib/mako-0.7.2/test/templates/othersubdir/foo.html            |     0 
  lib/mako-0.7.2/test/templates/read_unicode.html               |    10 -
  lib/mako-0.7.2/test/templates/read_unicode_py3k.html          |    10 -
  lib/mako-0.7.2/test/templates/runtimeerr.html                 |     4 -
  lib/mako-0.7.2/test/templates/runtimeerr_py3k.html            |     4 -
  lib/mako-0.7.2/test/templates/subdir/foo/modtest.html.py      |    25 -
  lib/mako-0.7.2/test/templates/subdir/incl.html                |     2 -
  lib/mako-0.7.2/test/templates/subdir/index.html               |     3 -
  lib/mako-0.7.2/test/templates/subdir/modtest.html             |     1 -
  lib/mako-0.7.2/test/templates/unicode.html                    |     2 -
  lib/mako-0.7.2/test/templates/unicode_arguments.html          |    10 -
  lib/mako-0.7.2/test/templates/unicode_arguments_py3k.html     |    10 -
  lib/mako-0.7.2/test/templates/unicode_code.html               |     7 -
  lib/mako-0.7.2/test/templates/unicode_code_py3k.html          |     7 -
  lib/mako-0.7.2/test/templates/unicode_expr.html               |     2 -
  lib/mako-0.7.2/test/templates/unicode_expr_py3k.html          |     2 -
  lib/mako-0.7.2/test/templates/unicode_runtime_error.html      |     2 -
  lib/mako-0.7.2/test/templates/unicode_syntax_error.html       |     2 -
  lib/mako-0.7.2/test/test_ast.py                               |   322 --
  lib/mako-0.7.2/test/test_babelplugin.py                       |    44 -
  lib/mako-0.7.2/test/test_block.py                             |   569 ----
  lib/mako-0.7.2/test/test_cache.py                             |   557 ----
  lib/mako-0.7.2/test/test_call.py                              |   515 ----
  lib/mako-0.7.2/test/test_decorators.py                        |   110 -
  lib/mako-0.7.2/test/test_def.py                               |   678 -----
  lib/mako-0.7.2/test/test_exceptions.py                        |   296 --
  lib/mako-0.7.2/test/test_filters.py                           |   322 --
  lib/mako-0.7.2/test/test_inheritance.py                       |   350 --
  lib/mako-0.7.2/test/test_lexer.py                             |   871 -------
  lib/mako-0.7.2/test/test_lookup.py                            |   104 -
  lib/mako-0.7.2/test/test_loop.py                              |   295 --
  lib/mako-0.7.2/test/test_lru.py                               |   111 -
  lib/mako-0.7.2/test/test_namespace.py                         |   792 ------
  lib/mako-0.7.2/test/test_pygen.py                             |   252 --
  lib/mako-0.7.2/test/test_template.py                          |  1241 ---------
  lib/mako-0.7.2/test/test_tgplugin.py                          |    42 -
  lib/mako-0.7.2/test/test_util.py                              |    41 -
  lib/mako-0.7.2/test/util.py                                   |     7 -
  perf.py                                                       |     2 +-
  345 files changed, 39283 insertions(+), 39130 deletions(-)


diff --git a/lib/Mako-0.7.3/CHANGES b/lib/Mako-0.7.3/CHANGES
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/CHANGES
@@ -0,0 +1,847 @@
+
+0.7.3
+- [bug] legacy_html_escape function, used when
+  Markupsafe isn't installed, was using an inline-compiled
+  regexp which causes major slowdowns on Python 3.3;
+  is now precompiled.
+
+- [bug] AST supporting now supports tuple-packed
+  function arguments inside pure-python def
+  or lambda expressions.  [ticket:201]
+
+- [bug] Fixed Py3K bug in the Babel extension.
+
+- [bug] Fixed the "filter" attribute of the
+  <%text> tag so that it pulls locally specified
+  identifiers from the context the same
+  way as that of <%block> and <%filter>.
+
+- [bug] Fixed bug in plugin loader to correctly
+  raise exception when non-existent plugin
+  is specified.
+
+0.7.2
+- [bug] Fixed regression in 0.7.1 where AST
+  parsing for Py2.4 was broken.
+  [ticket:193]
+
+0.7.1
+- [feature] Control lines with no bodies will
+  now succeed, as "pass" is added for these
+  when no statements are otherwise present.
+  Courtesy Ben Trofatter [ticket:146]
+
+- [bug] Fixed some long-broken scoping behavior
+  involving variables declared in defs and such,
+  which only became apparent when
+  the strict_undefined flag was turned on.
+  [ticket:192]
+
+- [bug] Can now use strict_undefined at the
+  same time args passed to def() are used
+  by other elements of the <%def> tag.
+  [ticket:191]
+
+0.7.0
+- [feature] Added new "loop" variable to templates,
+  is provided within a % for block to provide
+  info about the loop such as index, first/last,
+  odd/even, etc.  A migration path is also provided
+  for legacy templates via the "enable_loop" argument
+  available on Template, TemplateLookup, and <%page>.
+  Thanks to Ben Trofatter for all
+  the work on this [ticket:125]
+
+- [feature] Added a real check for "reserved"
+  names, that is names which are never pulled
+  from the context and cannot be passed to
+  the template.render() method.  Current names
+  are "context", "loop", "UNDEFINED".
+
+- [feature] The html_error_template() will now
+  apply Pygments highlighting to the source
+  code displayed in the traceback, if Pygments
+  if available.  Courtesy Ben Trofatter
+  [ticket:95]
+
+- [feature] Added support for context managers,
+  i.e. "% with x as e:/ % endwith" support.
+  Courtesy Ben Trofatter [ticket:147]
+
+- [feature] Added class-level flag to CacheImpl
+  "pass_context"; when True, the keyword argument
+  'context' will be passed to get_or_create()
+  containing the Mako Context object.
+  [ticket:185]
+
+- [bug] Fixed some Py3K resource warnings due
+  to filehandles being implicitly closed.
+  [ticket:182]
+
+- [bug] Fixed endless recursion bug when
+  nesting multiple def-calls with content.
+  Thanks to Jeff Dairiki. [ticket:186]
+
+- [feature] Added Jinja2 to the example
+  benchmark suite, courtesy Vincent Férotin
+
+0.6.2
+- [bug] The ${{"foo":"bar"}} parsing issue is fixed!!
+  The legendary Eevee has slain the dragon!
+  [ticket:20].  Also fixes quoting issue
+  at [ticket:86].
+
+0.6.1
+- [bug] Added special compatibility for the 0.5.0
+  Cache() constructor, which was preventing file
+  version checks and not allowing Mako 0.6 to
+  recompile the module files.
+
+0.6.0
+
+- [feature] Template caching has been converted into a plugin
+  system, whereby the usage of Beaker is just the
+  default plugin.   Template and TemplateLookup
+  now accept a string "cache_impl" parameter which
+  refers to the name of a cache plugin, defaulting
+  to the name 'beaker'.  New plugins can be
+  registered as pkg_resources entrypoints under
+  the group "mako.cache", or registered directly
+  using mako.cache.register_plugin().  The
+  core plugin is the mako.cache.CacheImpl
+  class.
+
+- [feature] Added support for Beaker cache regions
+  in templates.   Usage of regions should be considered
+  as superseding the very obsolete idea of passing in
+  backend options, timeouts, etc. within templates.
+
+- [feature] The 'put' method on Cache is now
+  'set'.  'put' is there for backwards compatibility.
+
+- [feature] The <%def>, <%block> and <%page> tags now accept
+  any argument named "cache_*", and the key
+  minus the "cache_" prefix will be passed as keyword
+  arguments to the CacheImpl methods.
+
+- [feature] Template and TemplateLookup now accept an argument
+  cache_args, which refers to a dictionary containing
+  cache parameters.  The cache_dir, cache_url, cache_type,
+  cache_timeout arguments are deprecated (will probably
+  never be removed, however) and can be passed
+  now as cache_args={'url':<some url>, 'type':'memcached',
+  'timeout':50, 'dir':'/path/to/some/directory'}
+
+- [feature/bug] Can now refer to context variables
+  within extra arguments to <%block>, <%def>, i.e.
+  <%block name="foo" cache_key="${somekey}">.
+  Filters can also be used in this way, i.e.
+  <%def name="foo()" filter="myfilter">
+  then template.render(myfilter=some_callable)
+  [ticket:180]
+
+- [feature] Added "--var name=value" option to the mako-render
+  script, allows passing of kw to the template from
+  the command line. [ticket:178]
+
+- [feature] Added module_writer argument to Template,
+  TemplateLookup, allows a callable to be passed which
+  takes over the writing of the template's module source
+  file, so that special environment-specific steps
+  can be taken.  [ticket:181]
+
+- [bug] The exception message in the html_error_template
+  is now escaped with the HTML filter. [ticket:142]
+
+- [bug] Added "white-space:pre" style to html_error_template()
+  for code blocks so that indentation is preserved
+  [ticket:173]
+
+- [bug] The "benchmark" example is now Python 3 compatible
+  (even though several of those old template libs aren't
+  available on Py3K, so YMMV) [ticket:175]
+
+0.5
+- A Template is explicitly disallowed
+  from having a url that normalizes to relative outside
+  of the root.   That is, if the Lookup is based
+  at /home/mytemplates, an include that would place
+  the ultimate template at
+  /home/mytemplates/../some_other_directory,
+  i.e. outside of /home/mytemplates,
+  is disallowed.   This usage was never intended
+  despite the lack of an explicit check.
+  The main issue this causes
+  is that module files can be written outside
+  of the module root (or raise an error, if file perms aren't
+  set up), and can also lead to the same template being
+  cached in the lookup under multiple, relative roots.
+  TemplateLookup instead has always supported multiple
+  file roots for this purpose.
+  [ticket:174]
+
+0.4.2
+- Fixed bug regarding <%call>/def calls w/ content
+  whereby the identity of the "caller" callable
+  inside the <%def> would be corrupted by the
+  presence of another <%call> in the same block.
+  [ticket:170]
+
+- Fixed the babel plugin to accommodate <%block>
+  [ticket:169]
+
+0.4.1
+- New tag: <%block>.  A variant on <%def> that
+  evaluates its contents in-place.
+  Can be named or anonymous,
+  the named version is intended for inheritance
+  layouts where any given section can be
+  surrounded by the <%block> tag in order for
+  it to become overrideable by inheriting
+  templates, without the need to specify a
+  top-level <%def> plus explicit call.
+  Modified scoping and argument rules as well as a
+  more strictly enforced usage scheme make it ideal
+  for this purpose without at all replacing most
+  other things that defs are still good for.
+  Lots of new docs. [ticket:164]
+
+- a slight adjustment to the "highlight" logic
+  for generating template bound stacktraces.
+  Will stick to known template source lines
+  without any extra guessing. [ticket:165]
+
+0.4.0
+- A 20% speedup for a basic two-page
+  inheritance setup rendering
+  a table of escaped data
+  (see http://techspot.zzzeek.org/2010/11/19/quick-mako-vs.-jinja-speed-test/).
+  A few configurational changes which
+  affect those in the I-don't-do-unicode
+  camp should be noted below.
+
+- The FastEncodingBuffer is now used
+  by default instead of cStringIO or StringIO,
+  regardless of whether output_encoding
+  is set to None or not.  FEB is faster than
+  both.  Only StringIO allows bytestrings
+  of unknown encoding to pass right
+  through, however - while it is of course
+  not recommended to send bytestrings of unknown
+  encoding to the output stream, this
+  mode of usage can be re-enabled by
+  setting the flag bytestring_passthrough
+  to True.
+
+- disable_unicode mode requires that
+  output_encoding be set to None - it also
+  forces the bytestring_passthrough flag
+  to True.
+
+- the <%namespace> tag raises an error
+  if the 'template' and 'module' attributes
+  are specified at the same time in
+  one tag.  A different class is used
+  for each case which allows a reduction in
+  runtime conditional logic and function
+  call overhead. [ticket:156]
+
+- the keys() in the Context, as well as
+  it's internal _data dictionary, now
+  include just what was specified to
+  render() as well as Mako builtins
+  'caller', 'capture'.  The contents
+  of __builtin__ are no longer copied.
+  Thanks to Daniel Lopez for pointing
+  this out. [ticket:159]
+
+0.3.6
+- Documentation is on Sphinx.
+  [ticket:126]
+
+- Beaker is now part of "extras" in
+  setup.py instead of "install_requires".
+  This to produce a lighter weight install
+  for those who don't use the caching
+  as well as to conform to Pyramid
+  deployment practices.  [ticket:154]
+
+- The Beaker import (or attempt thereof)
+  is delayed until actually needed;
+  this to remove the performance penalty
+  from startup, particularly for
+  "single execution" environments
+  such as shell scripts. [ticket:153]
+
+- Patch to lexer to not generate an empty
+  '' write in the case of backslash-ended
+  lines.  [ticket:155]
+
+- Fixed missing **extra collection in
+  setup.py which prevented setup.py
+  from running 2to3 on install.
+  [ticket:148]
+
+- New flag on Template, TemplateLookup -
+  strict_undefined=True, will cause
+  variables not found in the context to
+  raise a NameError immediately, instead of
+  defaulting to the UNDEFINED value.
+
+- The range of Python identifiers that
+  are considered "undefined", meaning they
+  are pulled from the context, has been
+  trimmed back to not include variables
+  declared inside of expressions (i.e. from
+  list comprehensions), as well as
+  in the argument list of lambdas.  This
+  to better support the strict_undefined
+  feature.  The change should be
+  fully backwards-compatible but involved
+  a little bit of tinkering in the AST code,
+  which hadn't really been touched for
+  a couple of years, just FYI.
+
+0.3.5
+- The <%namespace> tag allows expressions
+  for the `file` argument, i.e. with ${}.
+  The `context` variable, if needed,
+  must be referenced explicitly.
+  [ticket:141]
+
+- ${} expressions embedded in tags,
+  such as <%foo:bar x="${...}">, now
+  allow multiline Python expressions.
+
+- Fixed previously non-covered regular
+  expression, such that using a ${} expression
+  inside of a tag element that doesn't allow
+  them raises a CompileException instead of
+  silently failing.
+
+- Added a try/except around "import markupsafe".
+  This to support GAE which can't run markupsafe.
+  [ticket:151] No idea whatsoever if the
+  install_requires in setup.py also breaks GAE,
+  couldn't get an answer on this.
+
+0.3.4
+- Now using MarkupSafe for HTML escaping,
+  i.e. in place of cgi.escape().  Faster
+  C-based implementation and also escapes
+  single quotes for additional security.
+  Supports the __html__ attribute for
+  the given expression as well.
+
+  When using "disable_unicode" mode,
+  a pure Python HTML escaper function
+  is used which also quotes single quotes.
+
+  Note that Pylons by default doesn't
+  use Mako's filter - check your
+  environment.py file.
+
+- Fixed call to "unicode.strip" in
+  exceptions.text_error_template which
+  is not Py3k compatible.  [ticket:137]
+
+0.3.3
+- Added conditional to RichTraceback
+  such that if no traceback is passed
+  and sys.exc_info() has been reset,
+  the formatter just returns blank
+  for the "traceback" portion.
+  [ticket:135]
+
+- Fixed sometimes incorrect usage of
+  exc.__class__.__name__
+  in html/text error templates when using
+  Python 2.4 [ticket:131]
+
+- Fixed broken @property decorator on
+  template.last_modified
+
+- Fixed error formatting when a stacktrace
+  line contains no line number, as in when
+  inside an eval/exec-generated function.
+  [ticket:132]
+
+- When a .py is being created, the tempfile
+  where the source is stored temporarily is
+  now made in the same directory as that of
+  the .py file.  This ensures that the two
+  files share the same filesystem, thus
+  avoiding cross-filesystem synchronization
+  issues.  Thanks to Charles Cazabon.
+
+0.3.2
+- Calling a def from the top, via
+  template.get_def(...).render() now checks the
+  argument signature the same way as it did in
+  0.2.5, so that TypeError is not raised.
+  reopen of [ticket:116]
+
+
+0.3.1
+- Fixed incorrect dir name in setup.py
+  [ticket:129]
+
+0.3
+- Python 2.3 support is dropped. [ticket:123]
+
+- Python 3 support is added ! See README.py3k
+  for installation and testing notes.
+  [ticket:119]
+
+- Unit tests now run with nose.  [ticket:127]
+
+- Source code escaping has been simplified.
+  In particular, module source files are now
+  generated with the Python "magic encoding
+  comment", and source code is passed through
+  mostly unescaped, except for that code which
+  is regenerated from parsed Python source.
+  This fixes usage of unicode in
+  <%namespace:defname> tags.  [ticket:99]
+
+- RichTraceback(), html_error_template().render(),
+  text_error_template().render() now accept "error"
+  and "traceback" as optional arguments, and
+  these are now actually used.  [ticket:122]
+
+- The exception output generated when
+  format_exceptions=True will now be as a Python
+  unicode if it occurred during render_unicode(),
+  or an encoded string if during render().
+
+- A percent sign can be emitted as the first
+  non-whitespace character on a line by escaping
+  it as in "%%". [ticket:112]
+
+- Template accepts empty control structure, i.e.
+  % if: %endif, etc. [ticket:94]
+
+- The <%page args> tag can now be used in a base
+  inheriting template - the full set of render()
+  arguments are passed down through the inherits
+  chain.  Undeclared arguments go into **pageargs
+  as usual.  [ticket:116]
+
+- defs declared within a <%namespace> section, an
+  uncommon feature, have been improved.  The defs
+  no longer get doubly-rendered in the body() scope,
+  and now allow local variable assignment without
+  breakage.  [ticket:109]
+
+- Windows paths are handled correctly if a Template
+  is passed only an absolute filename (i.e. with c:
+  drive etc.)  and no URI - the URI is converted
+  to a forward-slash path and module_directory
+  is treated as a windows path.  [ticket:128]
+
+- TemplateLookup raises TopLevelLookupException for
+  a given path that is a directory, not a filename,
+  instead of passing through to the template to
+  generate IOError.  [ticket:73]
+
+0.2.6
+
+- Fix mako function decorators to preserve the
+  original function's name in all cases. Patch
+  from Scott Torborg.
+
+- Support the <%namespacename:defname> syntax in
+  the babel extractor. [ticket:118]
+
+- Further fixes to unicode handling of .py files with the
+  html_error_template. [ticket:88]
+
+0.2.5
+- Added a "decorator" kw argument to <%def>,
+  allows custom decoration functions to wrap
+  rendering callables.  Mainly intended for
+  custom caching algorithms, not sure what
+  other uses there may be (but there may be).
+  Examples are in the "filtering" docs.
+
+- When Mako creates subdirectories in which
+  to store templates, it uses the more
+  permissive mode of 0775 instead of 0750,
+  helping out with certain multi-process
+  scenarios. Note that the mode is always
+  subject to the restrictions of the existing
+  umask. [ticket:101]
+
+- Fixed namespace.__getattr__() to raise
+  AttributeError on attribute not found
+  instead of RuntimeError.  [ticket:104]
+
+- Added last_modified accessor to Template,
+  returns the time.time() when the module
+  was created. [ticket:97]
+
+- Fixed lexing support for whitespace
+  around '=' sign in defs. [ticket:102]
+
+- Removed errant "lower()" in the lexer which
+  was causing tags to compile with
+  case-insensitive names, thus messing up
+  custom <%call> names. [ticket:108]
+
+- added "mako.__version__" attribute to
+  the base module.  [ticket:110]
+
+0.2.4
+- Fixed compatibility with Jython 2.5b1.
+
+0.2.3
+- the <%namespacename:defname> syntax described at
+  http://techspot.zzzeek.org/?p=28 has now
+  been added as a built in syntax, and is recommended
+  as a more modern syntax versus <%call expr="expression">.
+  The %call tag itself will always remain,
+  with <%namespacename:defname> presenting a more HTML-like
+  alternative to calling defs, both plain and
+  nested.  Many examples of the new syntax are in the
+  "Calling a def with embedded content" section
+  of the docs.
+
+- added support for Jython 2.5.
+
+- cache module now uses Beaker's CacheManager
+  object directly, so that all cache types are included.
+  memcached is available as both "ext:memcached" and
+  "memcached", the latter for backwards compatibility.
+
+- added "cache" accessor to Template, Namespace.
+  e.g.  ${local.cache.get('somekey')} or
+  template.cache.invalidate_body()
+
+- added "cache_enabled=True" flag to Template,
+  TemplateLookup.  Setting this to False causes cache
+  operations to "pass through" and execute every time;
+  this flag should be integrated in Pylons with its own
+  cache_enabled configuration setting.
+
+- the Cache object now supports invalidate_def(name),
+  invalidate_body(), invalidate_closure(name),
+  invalidate(key), which will remove the given key
+  from the cache, if it exists.  The cache arguments
+  (i.e. storage type) are derived from whatever has
+  been already persisted for that template.
+  [ticket:92]
+
+- For cache changes to work fully, Beaker 1.1 is required.
+  1.0.1 and up will work as well with the exception of
+  cache expiry.  Note that Beaker 1.1 is **required**
+  for applications which use dynamically generated keys,
+  since previous versions will permanently store state in memory
+  for each individual key, thus consuming all available
+  memory for an arbitrarily large number of distinct
+  keys.
+
+- fixed bug whereby an <%included> template with
+  <%page> args named the same as a __builtin__ would not
+  honor the default value specified in <%page> [ticket:93]
+
+- fixed the html_error_template not handling tracebacks from
+  normal .py files with a magic encoding comment [ticket:88]
+
+- RichTraceback() now accepts an optional traceback object
+  to be used in place of sys.exc_info()[2].  html_error_template()
+  and text_error_template() accept an optional
+  render()-time argument "traceback" which is passed to the
+  RichTraceback object.
+
+- added ModuleTemplate class, which allows the construction
+  of a Template given a Python module generated by a previous
+  Template.   This allows Python modules alone to be used
+  as templates with no compilation step.   Source code
+  and template source are optional but allow error reporting
+  to work correctly.
+
+- fixed Python 2.3 compat. in mako.pyparser [ticket:90]
+
+- fix Babel 0.9.3 compatibility; stripping comment tags is now
+  optional (and enabled by default).
+
+
+0.2.2
+- cached blocks now use the current context when rendering
+an expired section, instead of the original context
+passed in [ticket:87]
+- fixed a critical issue regarding caching, whereby
+a cached block would raise an error when called within a
+cache-refresh operation that was initiated after the
+initiating template had completed rendering.
+
+0.2.1
+- fixed bug where 'output_encoding' parameter would prevent
+render_unicode() from returning a unicode object.
+- bumped magic number, which forces template recompile for
+this version (fixes incompatible compile symbols from 0.1
+series).
+- added a few docs for cache options, specifically those that
+help with memcached.
+
+0.2.0
+- Speed improvements (as though we needed them, but people
+  contributed and there you go):
+
+  - added "bytestring passthru" mode, via
+    `disable_unicode=True` argument passed to Template or
+    TemplateLookup. All unicode-awareness and filtering is
+    turned off, and template modules are generated with
+    the appropriate magic encoding comment. In this mode,
+    template expressions can only receive raw bytestrings
+    or Unicode objects which represent straight ASCII, and
+    render_unicode() may not be used if multibyte
+    characters are present. When enabled, speed
+    improvement around 10-20%. [ticket:77] (courtesy
+    anonymous guest)
+
+  - inlined the "write" function of Context into a local
+    template variable. This affords a 12-30% speedup in
+    template render time. (idea courtesy same anonymous
+    guest) [ticket:76]
+
+- New Features, API changes:
+
+  - added "attr" accessor to namespaces. Returns
+    attributes configured as module level attributes, i.e.
+    within <%! %> sections.  [ticket:62] i.e.:
+
+    # somefile.html
+    <%!
+        foo = 27
+    %>
+
+    # some other template
+    <%namespace name="myns" file="somefile.html"/>
+    ${myns.attr.foo}
+
+    The slight backwards incompatibility here is, you
+    can't have namespace defs named "attr" since the
+    "attr" descriptor will occlude it.
+
+  - cache_key argument can now render arguments passed
+    directly to the %page or %def, i.e. <%def
+    name="foo(x)" cached="True" cache_key="${x}"/>
+    [ticket:78]
+
+  - some functions on Context are now private:
+    _push_buffer(), _pop_buffer(),
+    caller_stack._push_frame(), caller_stack._pop_frame().
+
+  - added a runner script "mako-render" which renders
+    standard input as a template to stdout [ticket:81]
+    [ticket:56]
+
+- Bugfixes:
+  - can now use most names from __builtins__ as variable
+    names without explicit declaration (i.e. 'id',
+    'exception', 'range', etc.) [ticket:83] [ticket:84]
+
+  - can also use builtin names as local variable names
+    (i.e. dict, locals) (came from fix for [ticket:84])
+
+  - fixed bug in python generation when variable names are
+    used with identifiers like "else", "finally", etc.
+    inside them [ticket:68]
+
+  - fixed codegen bug which occured when using <%page>
+    level caching, combined with an expression-based
+    cache_key, combined with the usage of <%namespace
+    import="*"/> - fixed lexer exceptions not cleaning up
+    temporary files, which could lead to a maximum number
+    of file descriptors used in the process [ticket:69]
+
+  - fixed issue with inline format_exceptions that was
+    producing blank exception pages when an inheriting
+    template is present [ticket:71]
+
+  - format_exceptions will apply the encoding options of
+    html_error_template() to the buffered output
+
+  - rewrote the "whitespace adjuster" function to work
+    with more elaborate combinations of quotes and
+    comments [ticket:75]
+
+0.1.10
+- fixed propagation of 'caller' such that nested %def calls
+  within a <%call> tag's argument list propigates 'caller'
+  to the %call function itself (propigates to the inner
+  calls too, this is a slight side effect which previously
+  existed anyway)
+- fixed bug where local.get_namespace() could put an
+  incorrect "self" in the current context
+- fixed another namespace bug where the namespace functions
+  did not have access to the correct context containing
+  their 'self' and 'parent'
+
+0.1.9
+- filters.Decode filter can also accept a non-basestring
+object and will call str() + unicode() on it [ticket:47]
+- comments can be placed at the end of control lines,
+i.e. if foo: # a comment, [ticket:53], thanks to
+Paul Colomiets
+- fixed expressions and page tag arguments and with embedded
+newlines in CRLF templates, follow up to [ticket:16], thanks
+Eric Woroshow
+- added an IOError catch for source file not found in RichTraceback
+exception reporter [ticket:51]
+
+0.1.8
+- variable names declared in render methods by internal
+codegen prefixed by "__M_" to prevent name collisions
+with user code
+- added a Babel (http://babel.edgewall.org/) extractor entry
+point, allowing extraction of gettext messages directly from
+mako templates via Babel [ticket:45]
+- fix to turbogears plugin to work with dot-separated names
+(i.e. load_template('foo.bar')).  also takes file extension
+as a keyword argument (default is 'mak').
+- more tg fix:  fixed [ticket:35], allowing string-based
+templates with tgplugin even if non-compatible args were sent
+
+0.1.7
+- one small fix to the unit tests to support python 2.3
+- a slight hack to how cache.py detects Beaker's memcached,
+works around unexplained import behavior observed on some
+python 2.3 installations
+
+0.1.6
+- caching is now supplied directly by Beaker, which has
+  all of MyghtyUtils merged into it now.  The latest Beaker
+  (0.7.1) also fixes a bug related to how Mako was using the
+  cache API.
+- fix to module_directory path generation when the path is "./"
+  [ticket:34]
+- TGPlugin passes options to string-based templates [ticket:35]
+- added an explicit stack frame step to template runtime, which
+  allows much simpler and hopefully bug-free tracking of 'caller',
+  fixes #28
+- if plain Python defs are used with <%call>, a decorator
+  @runtime.supports_callable exists to ensure that the "caller"
+  stack is properly handled for the def.
+- fix to RichTraceback and exception reporting to get template
+  source code as a unicode object #37
+- html_error_template includes options "full=True", "css=True"
+  which control generation of HTML tags, CSS [ticket:39]
+- added the 'encoding_errors' parameter to Template/TemplateLookup
+  for specifying the error handler associated with encoding to
+  'output_encoding' [ticket:40]
+- the Template returned by html_error_template now defaults to
+  output_encoding=sys.getdefaultencoding(),
+  encoding_errors='htmlentityreplace' [ticket:37]
+- control lines, i.e. % lines, support backslashes to continue long
+  lines (#32)
+- fixed codegen bug when defining <%def> within <%call> within <%call>
+- leading utf-8 BOM in template files is honored according to pep-0263
+
+0.1.5
+- AST expression generation - added in just about everything
+  expression-wise from the AST module  [ticket:26]
+- AST parsing, properly detects imports of the form "import foo.bar"
+  [ticket:27]
+- fix to lexing of <%docs> tag nested in other tags
+- fix to context-arguments inside of <%include> tag which broke
+during 0.1.4 [ticket:29]
+- added "n" filter, disables *all* filters normally applied to an expression
+via <%page> or default_filters (but not those within the filter)
+- added buffer_filters argument, defines filters applied to the return value
+of buffered/cached/filtered %defs, after all filters defined with the %def
+itself have been applied.  allows the creation of default expression filters
+that let the output of return-valued %defs "opt out" of that filtering
+via passing special attributes or objects.
+
+0.1.4
+- got defs-within-defs to be cacheable
+- fixes to code parsing/whitespace adjusting where plain python comments
+  may contain quote characters [ticket:23]
+- fix to variable scoping for identifiers only referenced within
+  functions
+- added a path normalization step to lookup so URIs like
+  "/foo/bar/../etc/../foo" pre-process the ".." tokens before checking
+  the filesystem
+- fixed/improved "caller" semantics so that undefined caller is
+  "UNDEFINED", propigates __nonzero__ method so it evaulates to False if
+  not present, True otherwise. this way you can say % if caller:\n
+  ${caller.body()}\n% endif
+- <%include> has an "args" attribute that can pass arguments to the
+  called template (keyword arguments only, must be declared in that
+  page's <%page> tag.)
+- <%include> plus arguments is also programmatically available via
+  self.include_file(<filename>, **kwargs)
+- further escaping added for multibyte expressions in %def, %call
+  attributes [ticket:24]
+
+
+0.1.3
+- ***Small Syntax Change*** - the single line comment character is now
+*two* hash signs, i.e. "## this is a comment".  This avoids a common
+collection with CSS selectors.
+- the magic "coding" comment (i.e. # coding:utf-8) will still work with
+either one "#" sign or two for now; two is preferred going forward, i.e.
+## coding:<someencoding>.
+- new multiline comment form: "<%doc> a comment </%doc>"
+- UNDEFINED evaluates to False
+- improvement to scoping of "caller" variable when using <%call> tag
+- added lexer error for unclosed control-line (%) line
+- added "preprocessor" argument to Template, TemplateLookup - is a single
+  callable or list of callables which will be applied to the template text
+  before lexing.  given the text as an argument, returns the new text.
+- added mako.ext.preprocessors package, contains one preprocessor so far:
+  'convert_comments', which will convert single # comments to the new ##
+  format
+
+0.1.2
+- fix to parsing of code/expression blocks to insure that non-ascii
+  characters, combined with a template that indicates a non-standard
+  encoding, are expanded into backslash-escaped glyphs before being AST
+  parsed [ticket:11]
+- all template lexing converts the template to unicode first, to
+  immediately catch any encoding issues and ensure internal unicode
+  representation.
+- added module_filename argument to Template to allow specification of a
+  specific module file
+- added modulename_callable to TemplateLookup to allow a function to
+  determine module filenames (takes filename, uri arguments). used for
+  [ticket:14]
+- added optional input_encoding flag to Template, to allow sending a
+  unicode() object with no magic encoding comment
+- "expression_filter" argument in <%page> applies only to expressions
+- added "default_filters" argument to Template, TemplateLookup. applies only
+  to expressions, gets prepended to "expression_filter" arg from <%page>.
+  defaults to ["unicode"], so that all expressions get stringified into u''
+  by default (this is what Mako already does). By setting to [], expressions
+  are passed through raw.
+- added "imports" argument to Template, TemplateLookup. so you can predefine
+  a list of import statements at the top of the template. can be used in
+  conjunction with default_filters.
+- support for CRLF templates...whoops ! welcome to all the windows users.
+  [ticket:16]
+- small fix to local variable propigation for locals that are conditionally
+  declared
+- got "top level" def calls to work, i.e. template.get_def("somedef").render()
+
+0.1.1
+- buffet plugin supports string-based templates, allows ToscaWidgets to work
+  [ticket:8]
+- AST parsing fixes: fixed TryExcept identifier parsing
+- removed textmate tmbundle from contrib and into separate SVN location;
+  windows users cant handle those files, setuptools not very good at
+  "pruning" certain directories
+- fix so that "cache_timeout" parameter is propigated
+- fix to expression filters so that string conversion (actually unicode)
+  properly occurs before filtering
+- better error message when a lookup is attempted with a template that has no
+  lookup
+- implemented "module" attribute for namespace
+- fix to code generation to correctly track multiple defs with the same name
+- "directories" can be passed to TemplateLookup as a scalar in which case it
+  gets converted to a list [ticket:9]
+
+0.1.0
+
+Initial release.
diff --git a/lib/Mako-0.7.3/LICENSE b/lib/Mako-0.7.3/LICENSE
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/LICENSE
@@ -0,0 +1,20 @@
+This is the MIT license: http://www.opensource.org/licenses/mit-license.php
+
+Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>.
+Mako is a trademark of Michael Bayer.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this
+software and associated documentation files (the "Software"), to deal in the Software
+without restriction, including without limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or
+substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/lib/Mako-0.7.3/MANIFEST.in b/lib/Mako-0.7.3/MANIFEST.in
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/MANIFEST.in
@@ -0,0 +1,11 @@
+# any kind of "*" pulls in __init__.pyc files,
+# so all extensions are explicit.
+
+recursive-include doc *.html *.css *.txt *.js *.png *.py Makefile *.rst *.mako
+recursive-include examples *.py *.xml *.mako *.myt *.kid *.tmpl
+recursive-include test *.py *.html *.mako
+
+include README* LICENSE distribute_setup.py ez_setup.py CHANGES*
+
+prune doc/build/output
+
diff --git a/lib/Mako-0.7.3/Mako.egg-info/PKG-INFO b/lib/Mako-0.7.3/Mako.egg-info/PKG-INFO
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/Mako.egg-info/PKG-INFO
@@ -0,0 +1,71 @@
+Metadata-Version: 1.0
+Name: Mako
+Version: 0.7.3
+Summary: A super-fast templating language that borrows the  best ideas from the existing templating languages.
+Home-page: http://www.makotemplates.org/
+Author: Mike Bayer
+Author-email: mike at zzzcomputing.com
+License: MIT
+Description: =========================
+        Mako Templates for Python
+        =========================
+        
+        Mako is a template library written in Python. It provides a familiar, non-XML 
+        syntax which compiles into Python modules for maximum performance. Mako's 
+        syntax and API borrows from the best ideas of many others, including Django
+        templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded 
+        Python (i.e. Python Server Page) language, which refines the familiar ideas
+        of componentized layout and inheritance to produce one of the most 
+        straightforward and flexible models available, while also maintaining close 
+        ties to Python calling and scoping semantics.
+        
+        Nutshell
+        ========
+        
+        ::
+        
+            <%inherit file="base.html"/>
+            <%
+                rows = [[v for v in range(0,10)] for row in range(0,10)]
+            %>
+            <table>
+                % for row in rows:
+                    ${makerow(row)}
+                % endfor
+            </table>
+        
+            <%def name="makerow(row)">
+                <tr>
+                % for name in row:
+                    <td>${name}</td>\
+                % endfor
+                </tr>
+            </%def>
+        
+        Philosophy
+        ===========
+        
+        Python is a great scripting language. Don't reinvent the wheel...your templates can handle it !
+        
+        Documentation
+        ==============
+        
+        See documentation for Mako at http://www.makotemplates.org/docs/
+        
+        License
+        ========
+        
+        Mako is licensed under an MIT-style license (see LICENSE).
+        Other incorporated projects may be licensed under different licenses.
+        All licenses allow for non-commercial and commercial use.
+        
+Keywords: templates
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
diff --git a/lib/Mako-0.7.3/Mako.egg-info/SOURCES.txt b/lib/Mako-0.7.3/Mako.egg-info/SOURCES.txt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/Mako.egg-info/SOURCES.txt
@@ -0,0 +1,171 @@
+CHANGES
+LICENSE
+MANIFEST.in
+README.rst
+distribute_setup.py
+setup.cfg
+setup.py
+Mako.egg-info/PKG-INFO
+Mako.egg-info/SOURCES.txt
+Mako.egg-info/dependency_links.txt
+Mako.egg-info/entry_points.txt
+Mako.egg-info/not-zip-safe
+Mako.egg-info/requires.txt
+Mako.egg-info/top_level.txt
+doc/caching.html
+doc/defs.html
+doc/filtering.html
+doc/genindex.html
+doc/index.html
+doc/inheritance.html
+doc/namespaces.html
+doc/runtime.html
+doc/search.html
+doc/searchindex.js
+doc/syntax.html
+doc/unicode.html
+doc/usage.html
+doc/_sources/caching.txt
+doc/_sources/defs.txt
+doc/_sources/filtering.txt
+doc/_sources/index.txt
+doc/_sources/inheritance.txt
+doc/_sources/namespaces.txt
+doc/_sources/runtime.txt
+doc/_sources/syntax.txt
+doc/_sources/unicode.txt
+doc/_sources/usage.txt
+doc/_static/basic.css
+doc/_static/comment-bright.png
+doc/_static/comment-close.png
+doc/_static/comment.png
+doc/_static/default.css
+doc/_static/docs.css
+doc/_static/doctools.js
+doc/_static/down-pressed.png
+doc/_static/down.png
+doc/_static/file.png
+doc/_static/jquery.js
+doc/_static/makoLogo.png
+doc/_static/minus.png
+doc/_static/plus.png
+doc/_static/pygments.css
+doc/_static/searchtools.js
+doc/_static/sidebar.js
+doc/_static/site.css
+doc/_static/underscore.js
+doc/_static/up-pressed.png
+doc/_static/up.png
+doc/_static/websupport.js
+doc/build/Makefile
+doc/build/caching.rst
+doc/build/conf.py
+doc/build/defs.rst
+doc/build/filtering.rst
+doc/build/index.rst
+doc/build/inheritance.rst
+doc/build/namespaces.rst
+doc/build/runtime.rst
+doc/build/syntax.rst
+doc/build/unicode.rst
+doc/build/usage.rst
+doc/build/builder/__init__.py
+doc/build/builder/builders.py
+doc/build/builder/util.py
+doc/build/static/docs.css
+doc/build/static/makoLogo.png
+doc/build/static/site.css
+doc/build/templates/base.mako
+doc/build/templates/genindex.mako
+doc/build/templates/layout.mako
+doc/build/templates/page.mako
+doc/build/templates/rtd_layout.mako
+doc/build/templates/search.mako
+examples/bench/basic.py
+examples/bench/cheetah/footer.tmpl
+examples/bench/cheetah/header.tmpl
+examples/bench/cheetah/template.tmpl
+examples/bench/django/templatetags/__init__.py
+examples/bench/django/templatetags/bench.py
+examples/bench/kid/base.kid
+examples/bench/kid/template.kid
+examples/bench/myghty/base.myt
+examples/bench/myghty/template.myt
+examples/wsgi/run_wsgi.py
+mako/__init__.py
+mako/_ast_util.py
+mako/ast.py
+mako/cache.py
+mako/codegen.py
+mako/exceptions.py
+mako/filters.py
+mako/lexer.py
+mako/lookup.py
+mako/parsetree.py
+mako/pygen.py
+mako/pyparser.py
+mako/runtime.py
+mako/template.py
+mako/util.py
+mako/ext/__init__.py
+mako/ext/autohandler.py
+mako/ext/babelplugin.py
+mako/ext/beaker_cache.py
+mako/ext/preprocessors.py
+mako/ext/pygmentplugin.py
+mako/ext/turbogears.py
+scripts/mako-render
+test/__init__.py
+test/sample_module_namespace.py
+test/test_ast.py
+test/test_babelplugin.py
+test/test_block.py
+test/test_cache.py
+test/test_call.py
+test/test_decorators.py
+test/test_def.py
+test/test_exceptions.py
+test/test_filters.py
+test/test_inheritance.py
+test/test_lexer.py
+test/test_lookup.py
+test/test_loop.py
+test/test_lru.py
+test/test_namespace.py
+test/test_pygen.py
+test/test_template.py
+test/test_tgplugin.py
+test/test_util.py
+test/util.py
+test/foo/__init__.py
+test/foo/test_ns.py
+test/templates/badbom.html
+test/templates/bom.html
+test/templates/bommagic.html
+test/templates/chs_unicode.html
+test/templates/chs_unicode_py3k.html
+test/templates/chs_utf8.html
+test/templates/crlf.html
+test/templates/gettext.mako
+test/templates/index.html
+test/templates/internationalization.html
+test/templates/modtest.html
+test/templates/read_unicode.html
+test/templates/read_unicode_py3k.html
+test/templates/runtimeerr.html
+test/templates/runtimeerr_py3k.html
+test/templates/unicode.html
+test/templates/unicode_arguments.html
+test/templates/unicode_arguments_py3k.html
+test/templates/unicode_code.html
+test/templates/unicode_code_py3k.html
+test/templates/unicode_expr.html
+test/templates/unicode_expr_py3k.html
+test/templates/unicode_runtime_error.html
+test/templates/unicode_syntax_error.html
+test/templates/foo/modtest.html.py
+test/templates/othersubdir/foo.html
+test/templates/subdir/incl.html
+test/templates/subdir/index.html
+test/templates/subdir/modtest.html
+test/templates/subdir/foo/modtest.html.py
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/Mako.egg-info/dependency_links.txt b/lib/Mako-0.7.3/Mako.egg-info/dependency_links.txt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/Mako.egg-info/dependency_links.txt
@@ -0,0 +1,1 @@
+
diff --git a/lib/Mako-0.7.3/Mako.egg-info/entry_points.txt b/lib/Mako-0.7.3/Mako.egg-info/entry_points.txt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/Mako.egg-info/entry_points.txt
@@ -0,0 +1,14 @@
+
+      [python.templating.engines]
+      mako = mako.ext.turbogears:TGPlugin
+ 
+      [pygments.lexers]
+      mako = mako.ext.pygmentplugin:MakoLexer
+      html+mako = mako.ext.pygmentplugin:MakoHtmlLexer
+      xml+mako = mako.ext.pygmentplugin:MakoXmlLexer
+      js+mako = mako.ext.pygmentplugin:MakoJavascriptLexer
+      css+mako = mako.ext.pygmentplugin:MakoCssLexer
+
+      [babel.extractors]
+      mako = mako.ext.babelplugin:extract
+      
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/Mako.egg-info/not-zip-safe b/lib/Mako-0.7.3/Mako.egg-info/not-zip-safe
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/Mako.egg-info/not-zip-safe
@@ -0,0 +1,1 @@
+
diff --git a/lib/Mako-0.7.3/Mako.egg-info/requires.txt b/lib/Mako-0.7.3/Mako.egg-info/requires.txt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/Mako.egg-info/requires.txt
@@ -0,0 +1,4 @@
+MarkupSafe>=0.9.2
+
+[beaker]
+Beaker>=1.1
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/Mako.egg-info/top_level.txt b/lib/Mako-0.7.3/Mako.egg-info/top_level.txt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/Mako.egg-info/top_level.txt
@@ -0,0 +1,1 @@
+mako
diff --git a/lib/Mako-0.7.3/PKG-INFO b/lib/Mako-0.7.3/PKG-INFO
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/PKG-INFO
@@ -0,0 +1,71 @@
+Metadata-Version: 1.0
+Name: Mako
+Version: 0.7.3
+Summary: A super-fast templating language that borrows the  best ideas from the existing templating languages.
+Home-page: http://www.makotemplates.org/
+Author: Mike Bayer
+Author-email: mike at zzzcomputing.com
+License: MIT
+Description: =========================
+        Mako Templates for Python
+        =========================
+        
+        Mako is a template library written in Python. It provides a familiar, non-XML 
+        syntax which compiles into Python modules for maximum performance. Mako's 
+        syntax and API borrows from the best ideas of many others, including Django
+        templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded 
+        Python (i.e. Python Server Page) language, which refines the familiar ideas
+        of componentized layout and inheritance to produce one of the most 
+        straightforward and flexible models available, while also maintaining close 
+        ties to Python calling and scoping semantics.
+        
+        Nutshell
+        ========
+        
+        ::
+        
+            <%inherit file="base.html"/>
+            <%
+                rows = [[v for v in range(0,10)] for row in range(0,10)]
+            %>
+            <table>
+                % for row in rows:
+                    ${makerow(row)}
+                % endfor
+            </table>
+        
+            <%def name="makerow(row)">
+                <tr>
+                % for name in row:
+                    <td>${name}</td>\
+                % endfor
+                </tr>
+            </%def>
+        
+        Philosophy
+        ===========
+        
+        Python is a great scripting language. Don't reinvent the wheel...your templates can handle it !
+        
+        Documentation
+        ==============
+        
+        See documentation for Mako at http://www.makotemplates.org/docs/
+        
+        License
+        ========
+        
+        Mako is licensed under an MIT-style license (see LICENSE).
+        Other incorporated projects may be licensed under different licenses.
+        All licenses allow for non-commercial and commercial use.
+        
+Keywords: templates
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
diff --git a/lib/Mako-0.7.3/README.rst b/lib/Mako-0.7.3/README.rst
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/README.rst
@@ -0,0 +1,52 @@
+=========================
+Mako Templates for Python
+=========================
+
+Mako is a template library written in Python. It provides a familiar, non-XML 
+syntax which compiles into Python modules for maximum performance. Mako's 
+syntax and API borrows from the best ideas of many others, including Django
+templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded 
+Python (i.e. Python Server Page) language, which refines the familiar ideas
+of componentized layout and inheritance to produce one of the most 
+straightforward and flexible models available, while also maintaining close 
+ties to Python calling and scoping semantics.
+
+Nutshell
+========
+
+::
+
+    <%inherit file="base.html"/>
+    <%
+        rows = [[v for v in range(0,10)] for row in range(0,10)]
+    %>
+    <table>
+        % for row in rows:
+            ${makerow(row)}
+        % endfor
+    </table>
+
+    <%def name="makerow(row)">
+        <tr>
+        % for name in row:
+            <td>${name}</td>\
+        % endfor
+        </tr>
+    </%def>
+
+Philosophy
+===========
+
+Python is a great scripting language. Don't reinvent the wheel...your templates can handle it !
+
+Documentation
+==============
+
+See documentation for Mako at http://www.makotemplates.org/docs/
+
+License
+========
+
+Mako is licensed under an MIT-style license (see LICENSE).
+Other incorporated projects may be licensed under different licenses.
+All licenses allow for non-commercial and commercial use.
diff --git a/lib/Mako-0.7.3/distribute_setup.py b/lib/Mako-0.7.3/distribute_setup.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/distribute_setup.py
@@ -0,0 +1,485 @@
+#!python
+"""Bootstrap distribute installation
+
+If you want to use setuptools in your package's setup.py, just include this
+file in the same directory with it, and add this to the top of your setup.py::
+
+    from distribute_setup import use_setuptools
+    use_setuptools()
+
+If you want to require a specific version of setuptools, set a download
+mirror, or use an alternate download directory, you can do so by supplying
+the appropriate options to ``use_setuptools()``.
+
+This file can also be run as a script to install or upgrade setuptools.
+"""
+import os
+import sys
+import time
+import fnmatch
+import tempfile
+import tarfile
+from distutils import log
+
+try:
+    from site import USER_SITE
+except ImportError:
+    USER_SITE = None
+
+try:
+    import subprocess
+
+    def _python_cmd(*args):
+        args = (sys.executable,) + args
+        return subprocess.call(args) == 0
+
+except ImportError:
+    # will be used for python 2.3
+    def _python_cmd(*args):
+        args = (sys.executable,) + args
+        # quoting arguments if windows
+        if sys.platform == 'win32':
+            def quote(arg):
+                if ' ' in arg:
+                    return '"%s"' % arg
+                return arg
+            args = [quote(arg) for arg in args]
+        return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
+
+DEFAULT_VERSION = "0.6.13"
+DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
+SETUPTOOLS_FAKED_VERSION = "0.6c11"
+
+SETUPTOOLS_PKG_INFO = """\
+Metadata-Version: 1.0
+Name: setuptools
+Version: %s
+Summary: xxxx
+Home-page: xxx
+Author: xxx
+Author-email: xxx
+License: xxx
+Description: xxx
+""" % SETUPTOOLS_FAKED_VERSION
+
+
+def _install(tarball):
+    # extracting the tarball
+    tmpdir = tempfile.mkdtemp()
+    log.warn('Extracting in %s', tmpdir)
+    old_wd = os.getcwd()
+    try:
+        os.chdir(tmpdir)
+        tar = tarfile.open(tarball)
+        _extractall(tar)
+        tar.close()
+
+        # going in the directory
+        subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
+        os.chdir(subdir)
+        log.warn('Now working in %s', subdir)
+
+        # installing
+        log.warn('Installing Distribute')
+        if not _python_cmd('setup.py', 'install'):
+            log.warn('Something went wrong during the installation.')
+            log.warn('See the error message above.')
+    finally:
+        os.chdir(old_wd)
+
+
+def _build_egg(egg, tarball, to_dir):
+    # extracting the tarball
+    tmpdir = tempfile.mkdtemp()
+    log.warn('Extracting in %s', tmpdir)
+    old_wd = os.getcwd()
+    try:
+        os.chdir(tmpdir)
+        tar = tarfile.open(tarball)
+        _extractall(tar)
+        tar.close()
+
+        # going in the directory
+        subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
+        os.chdir(subdir)
+        log.warn('Now working in %s', subdir)
+
+        # building an egg
+        log.warn('Building a Distribute egg in %s', to_dir)
+        _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir)
+
+    finally:
+        os.chdir(old_wd)
+    # returning the result
+    log.warn(egg)
+    if not os.path.exists(egg):
+        raise IOError('Could not build the egg.')
+
+
+def _do_download(version, download_base, to_dir, download_delay):
+    egg = os.path.join(to_dir, 'distribute-%s-py%d.%d.egg'
+                       % (version, sys.version_info[0], sys.version_info[1]))
+    if not os.path.exists(egg):
+        tarball = download_setuptools(version, download_base,
+                                      to_dir, download_delay)
+        _build_egg(egg, tarball, to_dir)
+    sys.path.insert(0, egg)
+    import setuptools
+    setuptools.bootstrap_install_from = egg
+
+
+def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
+                   to_dir=os.curdir, download_delay=15, no_fake=True):
+    # making sure we use the absolute path
+    to_dir = os.path.abspath(to_dir)
+    was_imported = 'pkg_resources' in sys.modules or \
+        'setuptools' in sys.modules
+    try:
+        try:
+            import pkg_resources
+            if not hasattr(pkg_resources, '_distribute'):
+                if not no_fake:
+                    _fake_setuptools()
+                raise ImportError
+        except ImportError:
+            return _do_download(version, download_base, to_dir, download_delay)
+        try:
+            pkg_resources.require("distribute>="+version)
+            return
+        except pkg_resources.VersionConflict:
+            e = sys.exc_info()[1]
+            if was_imported:
+                sys.stderr.write(
+                "The required version of distribute (>=%s) is not available,\n"
+                "and can't be installed while this script is running. Please\n"
+                "install a more recent version first, using\n"
+                "'easy_install -U distribute'."
+                "\n\n(Currently using %r)\n" % (version, e.args[0]))
+                sys.exit(2)
+            else:
+                del pkg_resources, sys.modules['pkg_resources']    # reload ok
+                return _do_download(version, download_base, to_dir,
+                                    download_delay)
+        except pkg_resources.DistributionNotFound:
+            return _do_download(version, download_base, to_dir,
+                                download_delay)
+    finally:
+        if not no_fake:
+            _create_fake_setuptools_pkg_info(to_dir)
+
+def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
+                        to_dir=os.curdir, delay=15):
+    """Download distribute from a specified location and return its filename
+
+    `version` should be a valid distribute version number that is available
+    as an egg for download under the `download_base` URL (which should end
+    with a '/'). `to_dir` is the directory where the egg will be downloaded.
+    `delay` is the number of seconds to pause before an actual download
+    attempt.
+    """
+    # making sure we use the absolute path
+    to_dir = os.path.abspath(to_dir)
+    try:
+        from urllib.request import urlopen
+    except ImportError:
+        from urllib2 import urlopen
+    tgz_name = "distribute-%s.tar.gz" % version
+    url = download_base + tgz_name
+    saveto = os.path.join(to_dir, tgz_name)
+    src = dst = None
+    if not os.path.exists(saveto):  # Avoid repeated downloads
+        try:
+            log.warn("Downloading %s", url)
+            src = urlopen(url)
+            # Read/write all in one block, so we don't create a corrupt file
+            # if the download is interrupted.
+            data = src.read()
+            dst = open(saveto, "wb")
+            dst.write(data)
+        finally:
+            if src:
+                src.close()
+            if dst:
+                dst.close()
+    return os.path.realpath(saveto)
+
+def _no_sandbox(function):
+    def __no_sandbox(*args, **kw):
+        try:
+            from setuptools.sandbox import DirectorySandbox
+            if not hasattr(DirectorySandbox, '_old'):
+                def violation(*args):
+                    pass
+                DirectorySandbox._old = DirectorySandbox._violation
+                DirectorySandbox._violation = violation
+                patched = True
+            else:
+                patched = False
+        except ImportError:
+            patched = False
+
+        try:
+            return function(*args, **kw)
+        finally:
+            if patched:
+                DirectorySandbox._violation = DirectorySandbox._old
+                del DirectorySandbox._old
+
+    return __no_sandbox
+
+def _patch_file(path, content):
+    """Will backup the file then patch it"""
+    existing_content = open(path).read()
+    if existing_content == content:
+        # already patched
+        log.warn('Already patched.')
+        return False
+    log.warn('Patching...')
+    _rename_path(path)
+    f = open(path, 'w')
+    try:
+        f.write(content)
+    finally:
+        f.close()
+    return True
+
+_patch_file = _no_sandbox(_patch_file)
+
+def _same_content(path, content):
+    return open(path).read() == content
+
+def _rename_path(path):
+    new_name = path + '.OLD.%s' % time.time()
+    log.warn('Renaming %s into %s', path, new_name)
+    os.rename(path, new_name)
+    return new_name
+
+def _remove_flat_installation(placeholder):
+    if not os.path.isdir(placeholder):
+        log.warn('Unkown installation at %s', placeholder)
+        return False
+    found = False
+    for file in os.listdir(placeholder):
+        if fnmatch.fnmatch(file, 'setuptools*.egg-info'):
+            found = True
+            break
+    if not found:
+        log.warn('Could not locate setuptools*.egg-info')
+        return
+
+    log.warn('Removing elements out of the way...')
+    pkg_info = os.path.join(placeholder, file)
+    if os.path.isdir(pkg_info):
+        patched = _patch_egg_dir(pkg_info)
+    else:
+        patched = _patch_file(pkg_info, SETUPTOOLS_PKG_INFO)
+
+    if not patched:
+        log.warn('%s already patched.', pkg_info)
+        return False
+    # now let's move the files out of the way
+    for element in ('setuptools', 'pkg_resources.py', 'site.py'):
+        element = os.path.join(placeholder, element)
+        if os.path.exists(element):
+            _rename_path(element)
+        else:
+            log.warn('Could not find the %s element of the '
+                     'Setuptools distribution', element)
+    return True
+
+_remove_flat_installation = _no_sandbox(_remove_flat_installation)
+
+def _after_install(dist):
+    log.warn('After install bootstrap.')
+    placeholder = dist.get_command_obj('install').install_purelib
+    _create_fake_setuptools_pkg_info(placeholder)
+
+def _create_fake_setuptools_pkg_info(placeholder):
+    if not placeholder or not os.path.exists(placeholder):
+        log.warn('Could not find the install location')
+        return
+    pyver = '%s.%s' % (sys.version_info[0], sys.version_info[1])
+    setuptools_file = 'setuptools-%s-py%s.egg-info' % \
+            (SETUPTOOLS_FAKED_VERSION, pyver)
+    pkg_info = os.path.join(placeholder, setuptools_file)
+    if os.path.exists(pkg_info):
+        log.warn('%s already exists', pkg_info)
+        return
+
+    log.warn('Creating %s', pkg_info)
+    f = open(pkg_info, 'w')
+    try:
+        f.write(SETUPTOOLS_PKG_INFO)
+    finally:
+        f.close()
+
+    pth_file = os.path.join(placeholder, 'setuptools.pth')
+    log.warn('Creating %s', pth_file)
+    f = open(pth_file, 'w')
+    try:
+        f.write(os.path.join(os.curdir, setuptools_file))
+    finally:
+        f.close()
+
+_create_fake_setuptools_pkg_info = _no_sandbox(_create_fake_setuptools_pkg_info)
+
+def _patch_egg_dir(path):
+    # let's check if it's already patched
+    pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
+    if os.path.exists(pkg_info):
+        if _same_content(pkg_info, SETUPTOOLS_PKG_INFO):
+            log.warn('%s already patched.', pkg_info)
+            return False
+    _rename_path(path)
+    os.mkdir(path)
+    os.mkdir(os.path.join(path, 'EGG-INFO'))
+    pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
+    f = open(pkg_info, 'w')
+    try:
+        f.write(SETUPTOOLS_PKG_INFO)
+    finally:
+        f.close()
+    return True
+
+_patch_egg_dir = _no_sandbox(_patch_egg_dir)
+
+def _before_install():
+    log.warn('Before install bootstrap.')
+    _fake_setuptools()
+
+
+def _under_prefix(location):
+    if 'install' not in sys.argv:
+        return True
+    args = sys.argv[sys.argv.index('install')+1:]
+    for index, arg in enumerate(args):
+        for option in ('--root', '--prefix'):
+            if arg.startswith('%s=' % option):
+                top_dir = arg.split('root=')[-1]
+                return location.startswith(top_dir)
+            elif arg == option:
+                if len(args) > index:
+                    top_dir = args[index+1]
+                    return location.startswith(top_dir)
+        if arg == '--user' and USER_SITE is not None:
+            return location.startswith(USER_SITE)
+    return True
+
+
+def _fake_setuptools():
+    log.warn('Scanning installed packages')
+    try:
+        import pkg_resources
+    except ImportError:
+        # we're cool
+        log.warn('Setuptools or Distribute does not seem to be installed.')
+        return
+    ws = pkg_resources.working_set
+    try:
+        setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools',
+                                  replacement=False))
+    except TypeError:
+        # old distribute API
+        setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools'))
+
+    if setuptools_dist is None:
+        log.warn('No setuptools distribution found')
+        return
+    # detecting if it was already faked
+    setuptools_location = setuptools_dist.location
+    log.warn('Setuptools installation detected at %s', setuptools_location)
+
+    # if --root or --preix was provided, and if
+    # setuptools is not located in them, we don't patch it
+    if not _under_prefix(setuptools_location):
+        log.warn('Not patching, --root or --prefix is installing Distribute'
+                 ' in another location')
+        return
+
+    # let's see if its an egg
+    if not setuptools_location.endswith('.egg'):
+        log.warn('Non-egg installation')
+        res = _remove_flat_installation(setuptools_location)
+        if not res:
+            return
+    else:
+        log.warn('Egg installation')
+        pkg_info = os.path.join(setuptools_location, 'EGG-INFO', 'PKG-INFO')
+        if (os.path.exists(pkg_info) and
+            _same_content(pkg_info, SETUPTOOLS_PKG_INFO)):
+            log.warn('Already patched.')
+            return
+        log.warn('Patching...')
+        # let's create a fake egg replacing setuptools one
+        res = _patch_egg_dir(setuptools_location)
+        if not res:
+            return
+    log.warn('Patched done.')
+    _relaunch()
+
+
+def _relaunch():
+    log.warn('Relaunching...')
+    # we have to relaunch the process
+    # pip marker to avoid a relaunch bug
+    if sys.argv[:3] == ['-c', 'install', '--single-version-externally-managed']:
+        sys.argv[0] = 'setup.py'
+    args = [sys.executable] + sys.argv
+    sys.exit(subprocess.call(args))
+
+
+def _extractall(self, path=".", members=None):
+    """Extract all members from the archive to the current working
+       directory and set owner, modification time and permissions on
+       directories afterwards. `path' specifies a different directory
+       to extract to. `members' is optional and must be a subset of the
+       list returned by getmembers().
+    """
+    import copy
+    import operator
+    from tarfile import ExtractError
+    directories = []
+
+    if members is None:
+        members = self
+
+    for tarinfo in members:
+        if tarinfo.isdir():
+            # Extract directories with a safe mode.
+            directories.append(tarinfo)
+            tarinfo = copy.copy(tarinfo)
+            tarinfo.mode = 448 # decimal for oct 0700
+        self.extract(tarinfo, path)
+
+    # Reverse sort directories.
+    if sys.version_info < (2, 4):
+        def sorter(dir1, dir2):
+            return cmp(dir1.name, dir2.name)
+        directories.sort(sorter)
+        directories.reverse()
+    else:
+        directories.sort(key=operator.attrgetter('name'), reverse=True)
+
+    # Set correct owner, mtime and filemode on directories.
+    for tarinfo in directories:
+        dirpath = os.path.join(path, tarinfo.name)
+        try:
+            self.chown(tarinfo, dirpath)
+            self.utime(tarinfo, dirpath)
+            self.chmod(tarinfo, dirpath)
+        except ExtractError:
+            e = sys.exc_info()[1]
+            if self.errorlevel > 1:
+                raise
+            else:
+                self._dbg(1, "tarfile: %s" % e)
+
+
+def main(argv, version=DEFAULT_VERSION):
+    """Install or upgrade setuptools and EasyInstall"""
+    tarball = download_setuptools()
+    _install(tarball)
+
+
+if __name__ == '__main__':
+    main(sys.argv[1:])
diff --git a/lib/Mako-0.7.3/doc/_sources/caching.txt b/lib/Mako-0.7.3/doc/_sources/caching.txt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_sources/caching.txt
@@ -0,0 +1,393 @@
+.. _caching_toplevel:
+
+=======
+Caching
+=======
+
+Any template or component can be cached using the ``cache``
+argument to the ``<%page>``, ``<%def>`` or ``<%block>`` directives:
+
+.. sourcecode:: mako
+
+    <%page cached="True"/>
+
+    template text
+
+The above template, after being executed the first time, will
+store its content within a cache that by default is scoped
+within memory. Subsequent calls to the template's :meth:`~.Template.render`
+method will return content directly from the cache. When the
+:class:`.Template` object itself falls out of scope, its corresponding
+cache is garbage collected along with the template.
+
+By default, caching requires that the `Beaker <http://beaker.readthedocs.org/>`_ package be installed on the
+system, however the mechanism of caching can be customized to use
+any third party or user defined system -- see :ref:`cache_plugins`.
+
+In addition to being available on the ``<%page>`` tag, the caching flag and all
+its options can be used with the ``<%def>`` tag as well:
+
+.. sourcecode:: mako
+
+    <%def name="mycomp" cached="True" cache_timeout="60">
+        other text
+    </%def>
+
+... and equivalently with the ``<%block>`` tag, anonymous or named:
+
+.. sourcecode:: mako
+
+    <%block cached="True" cache_timeout="60">
+        other text
+    </%block>
+
+Cache Arguments
+===============
+
+Mako has two cache arguments available on tags that are
+available in all cases.   The rest of the arguments
+available are specific to a backend.
+
+The two generic tags arguments are:
+
+* ``cached="True"`` - enable caching for this ``<%page>``,
+  ``<%def>``, or ``<%block>``.
+* ``cache_key`` - the "key" used to uniquely identify this content
+  in the cache.   Usually, this key is chosen automatically
+  based on the name of the rendering callable (i.e. ``body``
+  when used in ``<%page>``, the name of the def when using ``<%def>``,
+  the explicit or internally-generated name when using ``<%block>``).
+  Using the ``cache_key`` parameter, the key can be overridden
+  using a fixed or programmatically generated value.
+
+  For example, here's a page
+  that caches any page which inherits from it, based on the
+  filename of the calling template:
+
+  .. sourcecode:: mako
+
+     <%page cached="True" cache_key="${self.filename}"/>
+
+     ${next.body()}
+
+     ## rest of template
+
+On a :class:`.Template` or :class:`.TemplateLookup`, the
+caching can be configured using these arguments:
+
+* ``cache_enabled`` - Setting this
+  to ``False`` will disable all caching functionality
+  when the template renders.  Defaults to ``True``.
+  e.g.:
+
+  .. sourcecode:: python
+
+      lookup = TemplateLookup(
+                      directories='/path/to/templates',
+                      cache_enabled = False
+                      )
+
+* ``cache_impl`` - The string name of the cache backend
+  to use.   This defaults to ``'beaker'``, which has historically
+  been the only cache backend supported by Mako.
+
+  .. versionadded:: 0.6.0
+
+  For example, here's how to use the upcoming
+  `dogpile.cache <http://dogpilecache.readthedocs.org>`_
+  backend:
+
+  .. sourcecode:: python
+
+      lookup = TemplateLookup(
+                      directories='/path/to/templates',
+                      cache_impl = 'dogpile.cache',
+                      cache_args = {'regions':my_dogpile_regions}
+                      )
+
+* ``cache_args`` - A dictionary of cache parameters that
+  will be consumed by the cache backend.   See
+  :ref:`beaker_backend` for examples.
+
+  .. versionadded:: 0.6.0
+
+Backend-Specific Cache Arguments
+--------------------------------
+
+The ``<%page>``, ``<%def>``, and ``<%block>`` tags
+accept any named argument that starts with the prefix ``"cache_"``.
+Those arguments are then packaged up and passed along to the
+underlying caching implementation, minus the ``"cache_"`` prefix.
+
+The actual arguments understood are determined by the backend.
+
+* :ref:`beaker_backend` - Includes arguments understood by
+  Beaker.
+* :ref:`dogpile.cache_backend` - Includes arguments understood by
+  dogpile.cache.
+
+.. _beaker_backend:
+
+Using the Beaker Cache Backend
+------------------------------
+
+When using Beaker, new implementations will want to make usage
+of **cache regions** so that cache configurations can be maintained
+externally to templates.  These configurations live under
+named "regions" that can be referred to within templates themselves.
+
+.. versionadded:: 0.6.0
+   Support for Beaker cache regions.
+
+For example, suppose we would like two regions.  One is a "short term"
+region that will store content in a memory-based dictionary,
+expiring after 60 seconds.   The other is a Memcached region,
+where values should expire in five minutes.   To configure
+our :class:`.TemplateLookup`, first we get a handle to a
+:class:`beaker.cache.CacheManager`:
+
+.. sourcecode:: python
+
+    from beaker.cache import CacheManager
+
+    manager = CacheManager(cache_regions={
+        'short_term':{
+            'type': 'memory',
+            'expire': 60
+        },
+        'long_term':{
+            'type': 'ext:memcached',
+            'url': '127.0.0.1:11211',
+            'expire': 300
+        }
+    })
+
+    lookup = TemplateLookup(
+                    directories=['/path/to/templates'],
+                    module_directory='/path/to/modules',
+                    cache_impl='beaker',
+                    cache_args={
+                        'manager':manager
+                    }
+            )
+
+Our templates can then opt to cache data in one of either region,
+using the ``cache_region`` argument.   Such as using ``short_term``
+at the ``<%page>`` level:
+
+.. sourcecode:: mako
+
+    <%page cached="True" cache_region="short_term">
+
+    ## ...
+
+Or, ``long_term`` at the ``<%block>`` level:
+
+.. sourcecode:: mako
+
+    <%block name="header" cached="True" cache_region="long_term">
+        other text
+    </%block>
+
+The Beaker backend also works without regions.   There are a
+variety of arguments that can be passed to the ``cache_args``
+dictionary, which are also allowable in templates via the
+``<%page>``, ``<%block>``,
+and ``<%def>`` tags specific to those sections.   The values
+given override those specified at the  :class:`.TemplateLookup`
+or :class:`.Template` level.
+
+With the possible exception
+of ``cache_timeout``, these arguments are probably better off
+staying at the template configuration level.  Each argument
+specified as ``cache_XYZ`` in a template tag is specified
+without the ``cache_`` prefix in the ``cache_args`` dictionary:
+
+* ``cache_timeout`` - number of seconds in which to invalidate the
+  cached data.  After this timeout, the content is re-generated
+  on the next call.  Available as ``timeout`` in the ``cache_args``
+  dictionary.
+* ``cache_type`` - type of caching. ``'memory'``, ``'file'``, ``'dbm'``, or
+  ``'ext:memcached'`` (note that  the string ``memcached`` is
+  also accepted by the dogpile.cache Mako plugin, though not by Beaker itself).
+  Available as ``type`` in the ``cache_args`` dictionary.
+* ``cache_url`` - (only used for ``memcached`` but required) a single
+  IP address or a semi-colon separated list of IP address of
+  memcache servers to use.  Available as ``url`` in the ``cache_args``
+  dictionary.
+* ``cache_dir`` - in the case of the ``'file'`` and ``'dbm'`` cache types,
+  this is the filesystem directory with which to store data
+  files. If this option is not present, the value of
+  ``module_directory`` is used (i.e. the directory where compiled
+  template modules are stored). If neither option is available
+  an exception is thrown.  Available as ``dir`` in the
+  ``cache_args`` dictionary.
+
+.. _dogpile.cache_backend:
+
+Using the dogpile.cache Backend
+-------------------------------
+
+`dogpile.cache`_ is a new replacement for Beaker.   It provides
+a modernized, slimmed down interface and is generally easier to use
+than Beaker.   As of this writing it has not yet been released.  dogpile.cache
+includes its own Mako cache plugin -- see :mod:`dogpile.cache.plugins.mako_cache` in the
+dogpile.cache documentation.
+
+Programmatic Cache Access
+=========================
+
+The :class:`.Template`, as well as any template-derived :class:`.Namespace`, has
+an accessor called ``cache`` which returns the :class:`.Cache` object
+for that template. This object is a facade on top of the underlying
+:class:`.CacheImpl` object, and provides some very rudimental
+capabilities, such as the ability to get and put arbitrary
+values:
+
+.. sourcecode:: mako
+
+    <%
+        local.cache.set("somekey", type="memory", "somevalue")
+    %>
+
+Above, the cache associated with the ``local`` namespace is
+accessed and a key is placed within a memory cache.
+
+More commonly, the ``cache`` object is used to invalidate cached
+sections programmatically:
+
+.. sourcecode:: python
+
+    template = lookup.get_template('/sometemplate.html')
+
+    # invalidate the "body" of the template
+    template.cache.invalidate_body()
+
+    # invalidate an individual def
+    template.cache.invalidate_def('somedef')
+
+    # invalidate an arbitrary key
+    template.cache.invalidate('somekey')
+
+You can access any special method or attribute of the :class:`.CacheImpl`
+itself using the :attr:`impl <.Cache.impl>` attribute:
+
+.. sourcecode:: python
+
+    template.cache.impl.do_something_special()
+
+Note that using implementation-specific methods will mean you can't
+swap in a different kind of :class:`.CacheImpl` implementation at a
+later time.
+
+.. _cache_plugins:
+
+Cache Plugins
+=============
+
+The mechanism used by caching can be plugged in
+using a :class:`.CacheImpl` subclass.    This class implements
+the rudimental methods Mako needs to implement the caching
+API.   Mako includes the :class:`.BeakerCacheImpl` class to
+provide the default implementation.  A :class:`.CacheImpl` class
+is acquired by Mako using a ``pkg_resources`` entrypoint, using
+the name given as the ``cache_impl`` argument to :class:`.Template`
+or :class:`.TemplateLookup`.    This entry point can be
+installed via the standard `setuptools`/``setup()`` procedure, underneath
+the `EntryPoint` group named ``"mako.cache"``.  It can also be
+installed at runtime via a convenience installer :func:`.register_plugin`
+which accomplishes essentially the same task.
+
+An example plugin that implements a local dictionary cache:
+
+.. sourcecode:: python
+
+    from mako.cache import Cacheimpl, register_plugin
+
+    class SimpleCacheImpl(CacheImpl):
+        def __init__(self, cache):
+            super(SimpleCacheImpl, self).__init__(cache)
+            self._cache = {}
+
+        def get_or_create(self, key, creation_function, **kw):
+            if key in self._cache:
+                return self._cache[key]
+            else:
+                self._cache[key] = value = creation_function()
+                return value
+
+        def set(self, key, value, **kwargs):
+            self._cache[key] = value
+
+        def get(self, key, **kwargs):
+            return self._cache.get(key)
+
+        def invalidate(self, key, **kwargs):
+            self._cache.pop(key, None)
+
+    # optional - register the class locally
+    register_plugin("simple", __name__, "SimpleCacheImpl")
+
+Enabling the above plugin in a template would look like:
+
+.. sourcecode:: python
+
+    t = Template("mytemplate",
+                 file="mytemplate.html",
+                 cache_impl='simple')
+
+Guidelines for Writing Cache Plugins
+------------------------------------
+
+* The :class:`.CacheImpl` is created on a per-:class:`.Template` basis.  The
+  class should ensure that only data for the parent :class:`.Template` is
+  persisted or returned by the cache methods.    The actual :class:`.Template`
+  is available via the ``self.cache.template`` attribute.   The ``self.cache.id``
+  attribute, which is essentially the unique modulename of the template, is
+  a good value to use in order to represent a unique namespace of keys specific
+  to the template.
+* Templates only use the :meth:`.CacheImpl.get_or_create()` method
+  in an implicit fashion.  The :meth:`.CacheImpl.set`,
+  :meth:`.CacheImpl.get`, and :meth:`.CacheImpl.invalidate` methods are
+  only used in response to direct programmatic access to the corresponding
+  methods on the :class:`.Cache` object.
+* :class:`.CacheImpl` will be accessed in a multithreaded fashion if the
+  :class:`.Template` itself is used multithreaded.  Care should be taken
+  to ensure caching implementations are threadsafe.
+* A library like `Dogpile <http://pypi.python.org/pypi/dogpile.core>`_, which
+  is a minimal locking system derived from Beaker, can be used to help
+  implement the :meth:`.CacheImpl.get_or_create` method in a threadsafe
+  way that can maximize effectiveness across multiple threads as well
+  as processes. :meth:`.CacheImpl.get_or_create` is the
+  key method used by templates.
+* All arguments passed to ``**kw`` come directly from the parameters
+  inside the ``<%def>``, ``<%block>``, or ``<%page>`` tags directly,
+  minus the ``"cache_"`` prefix, as strings, with the exception of
+  the argument ``cache_timeout``, which is passed to the plugin
+  as the name ``timeout`` with the value converted to an integer.
+  Arguments present in ``cache_args`` on :class:`.Template` or
+  :class:`.TemplateLookup` are passed directly, but are superseded
+  by those present in the most specific template tag.
+* The directory where :class:`.Template` places module files can
+  be acquired using the accessor ``self.cache.template.module_directory``.
+  This directory can be a good place to throw cache-related work
+  files, underneath a prefix like ``_my_cache_work`` so that name
+  conflicts with generated modules don't occur.
+
+API Reference
+=============
+
+.. autoclass:: mako.cache.Cache
+    :members:
+    :show-inheritance:
+
+.. autoclass:: mako.cache.CacheImpl
+    :members:
+    :show-inheritance:
+
+.. autofunction:: mako.cache.register_plugin
+
+.. autoclass:: mako.ext.beaker_cache.BeakerCacheImpl
+    :members:
+    :show-inheritance:
+
diff --git a/lib/Mako-0.7.3/doc/_sources/defs.txt b/lib/Mako-0.7.3/doc/_sources/defs.txt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_sources/defs.txt
@@ -0,0 +1,622 @@
+.. _defs_toplevel:
+
+===============
+Defs and Blocks
+===============
+
+``<%def>`` and ``<%block>`` are two tags that both demarcate any block of text
+and/or code.   They both exist within generated Python as a callable function,
+i.e., a Python ``def``.   They differ in their scope and calling semantics.
+Whereas ``<%def>`` provides a construct that is very much like a named Python
+``def``, the ``<%block>`` is more layout oriented.
+
+Using Defs
+==========
+
+The ``<%def>`` tag requires a ``name`` attribute, where the ``name`` references
+a Python function signature:
+
+.. sourcecode:: mako
+
+    <%def name="hello()">
+        hello world
+    </%def>
+
+To invoke the ``<%def>``, it is normally called as an expression:
+
+.. sourcecode:: mako
+
+    the def:  ${hello()}
+
+If the ``<%def>`` is not nested inside of another ``<%def>``,
+it's known as a **top level def** and can be accessed anywhere in
+the template, including above where it was defined.
+
+All defs, top level or not, have access to the current
+contextual namespace in exactly the same way their containing
+template does. Suppose the template below is executed with the
+variables ``username`` and ``accountdata`` inside the context:
+
+.. sourcecode:: mako
+
+    Hello there ${username}, how are ya.  Lets see what your account says:
+
+    ${account()}
+
+    <%def name="account()">
+        Account for ${username}:<br/>
+
+        % for row in accountdata:
+            Value: ${row}<br/>
+        % endfor
+    </%def>
+
+The ``username`` and ``accountdata`` variables are present
+within the main template body as well as the body of the
+``account()`` def.
+
+Since defs are just Python functions, you can define and pass
+arguments to them as well:
+
+.. sourcecode:: mako
+
+    ${account(accountname='john')}
+
+    <%def name="account(accountname, type='regular')">
+        account name: ${accountname}, type: ${type}
+    </%def>
+
+When you declare an argument signature for your def, they are
+required to follow normal Python conventions (i.e., all
+arguments are required except keyword arguments with a default
+value). This is in contrast to using context-level variables,
+which evaluate to ``UNDEFINED`` if you reference a name that
+does not exist.
+
+Calling Defs from Other Files
+-----------------------------
+
+Top level ``<%def>``\ s are **exported** by your template's
+module, and can be called from the outside; including from other
+templates, as well as normal Python code. Calling a ``<%def>``
+from another template is something like using an ``<%include>``
+-- except you are calling a specific function within the
+template, not the whole template.
+
+The remote ``<%def>`` call is also a little bit like calling
+functions from other modules in Python. There is an "import"
+step to pull the names from another template into your own
+template; then the function or functions are available.
+
+To import another template, use the ``<%namespace>`` tag:
+
+.. sourcecode:: mako
+
+    <%namespace name="mystuff" file="mystuff.html"/>
+
+The above tag adds a local variable ``mystuff`` to the current
+scope.
+
+Then, just call the defs off of ``mystuff``:
+
+.. sourcecode:: mako
+
+    ${mystuff.somedef(x=5,y=7)}
+
+The ``<%namespace>`` tag also supports some of the other
+semantics of Python's ``import`` statement, including pulling
+names into the local variable space, or using ``*`` to represent
+all names, using the ``import`` attribute:
+
+.. sourcecode:: mako
+
+    <%namespace file="mystuff.html" import="foo, bar"/>
+
+This is just a quick intro to the concept of a **namespace**,
+which is a central Mako concept that has its own chapter in
+these docs. For more detail and examples, see
+:ref:`namespaces_toplevel`.
+
+Calling Defs Programmatically
+-----------------------------
+
+You can call defs programmatically from any :class:`.Template` object
+using the :meth:`~.Template.get_def()` method, which returns a :class:`.DefTemplate`
+object. This is a :class:`.Template` subclass which the parent
+:class:`.Template` creates, and is usable like any other template:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+
+    template = Template("""
+        <%def name="hi(name)">
+            hi ${name}!
+        </%def>
+
+        <%def name="bye(name)">
+            bye ${name}!
+        </%def>
+    """)
+
+    print template.get_def("hi").render(name="ed")
+    print template.get_def("bye").render(name="ed")
+
+Defs within Defs
+----------------
+
+The def model follows regular Python rules for closures.
+Declaring ``<%def>`` inside another ``<%def>`` declares it
+within the parent's **enclosing scope**:
+
+.. sourcecode:: mako
+
+    <%def name="mydef()">
+        <%def name="subdef()">
+            a sub def
+        </%def>
+
+        i'm the def, and the subcomponent is ${subdef()}
+    </%def>
+
+Just like Python, names that exist outside the inner ``<%def>``
+exist inside it as well:
+
+.. sourcecode:: mako
+
+    <%
+        x = 12
+    %>
+    <%def name="outer()">
+        <%
+            y = 15
+        %>
+        <%def name="inner()">
+            inner, x is ${x}, y is ${y}
+        </%def>
+
+        outer, x is ${x}, y is ${y}
+    </%def>
+
+Assigning to a name inside of a def declares that name as local
+to the scope of that def (again, like Python itself). This means
+the following code will raise an error:
+
+.. sourcecode:: mako
+
+    <%
+        x = 10
+    %>
+    <%def name="somedef()">
+        ## error !
+        somedef, x is ${x}
+        <%
+            x = 27
+        %>
+    </%def>
+
+...because the assignment to ``x`` declares ``x`` as local to the
+scope of ``somedef``, rendering the "outer" version unreachable
+in the expression that tries to render it.
+
+.. _defs_with_content:
+
+Calling a Def with Embedded Content and/or Other Defs
+-----------------------------------------------------
+
+A flip-side to def within def is a def call with content. This
+is where you call a def, and at the same time declare a block of
+content (or multiple blocks) that can be used by the def being
+called. The main point of such a call is to create custom,
+nestable tags, just like any other template language's
+custom-tag creation system -- where the external tag controls the
+execution of the nested tags and can communicate state to them.
+Only with Mako, you don't have to use any external Python
+modules, you can define arbitrarily nestable tags right in your
+templates.
+
+To achieve this, the target def is invoked using the form
+``<%namepacename:defname>`` instead of the normal ``${}``
+syntax. This syntax, introduced in Mako 0.2.3, is functionally
+equivalent to another tag known as ``%call``, which takes the form
+``<%call expr='namespacename.defname(args)'>``. While ``%call``
+is available in all versions of Mako, the newer style is
+probably more familiar looking. The ``namespace`` portion of the
+call is the name of the **namespace** in which the def is
+defined -- in the most simple cases, this can be ``local`` or
+``self`` to reference the current template's namespace (the
+difference between ``local`` and ``self`` is one of inheritance
+-- see :ref:`namespaces_builtin` for details).
+
+When the target def is invoked, a variable ``caller`` is placed
+in its context which contains another namespace containing the
+body and other defs defined by the caller. The body itself is
+referenced by the method ``body()``. Below, we build a ``%def``
+that operates upon ``caller.body()`` to invoke the body of the
+custom tag:
+
+.. sourcecode:: mako
+
+    <%def name="buildtable()">
+        <table>
+            <tr><td>
+                ${caller.body()}
+            </td></tr>
+        </table>
+    </%def>
+
+    <%self:buildtable>
+        I am the table body.
+    </%self:buildtable>
+
+This produces the output (whitespace formatted):
+
+.. sourcecode:: html
+
+    <table>
+        <tr><td>
+            I am the table body.
+        </td></tr>
+    </table>
+
+Using the older ``%call`` syntax looks like:
+
+.. sourcecode:: mako
+
+    <%def name="buildtable()">
+        <table>
+            <tr><td>
+                ${caller.body()}
+            </td></tr>
+        </table>
+    </%def>
+
+    <%call expr="buildtable()">
+        I am the table body.
+    </%call>
+
+The ``body()`` can be executed multiple times or not at all.
+This means you can use def-call-with-content to build iterators,
+conditionals, etc:
+
+.. sourcecode:: mako
+
+    <%def name="lister(count)">
+        % for x in range(count):
+            ${caller.body()}
+        % endfor
+    </%def>
+
+    <%self:lister count="${3}">
+        hi
+    </%self:lister>
+
+Produces:
+
+.. sourcecode:: html
+
+    hi
+    hi
+    hi
+
+Notice above we pass ``3`` as a Python expression, so that it
+remains as an integer.
+
+A custom "conditional" tag:
+
+.. sourcecode:: mako
+
+    <%def name="conditional(expression)">
+        % if expression:
+            ${caller.body()}
+        % endif
+    </%def>
+
+    <%self:conditional expression="${4==4}">
+        i'm the result
+    </%self:conditional>
+
+Produces:
+
+.. sourcecode:: html
+
+    i'm the result
+
+But that's not all. The ``body()`` function also can handle
+arguments, which will augment the local namespace of the body
+callable. The caller must define the arguments which it expects
+to receive from its target def using the ``args`` attribute,
+which is a comma-separated list of argument names. Below, our
+``<%def>`` calls the ``body()`` of its caller, passing in an
+element of data from its argument:
+
+.. sourcecode:: mako
+
+    <%def name="layoutdata(somedata)">
+        <table>
+        % for item in somedata:
+            <tr>
+            % for col in item:
+                <td>${caller.body(col=col)}</td>
+            % endfor
+            </tr>
+        % endfor
+        </table>
+    </%def>
+
+    <%self:layoutdata somedata="${[[1,2,3],[4,5,6],[7,8,9]]}" args="col">\
+    Body data: ${col}\
+    </%self:layoutdata>
+
+Produces:
+
+.. sourcecode:: html
+
+    <table>
+        <tr>
+            <td>Body data: 1</td>
+            <td>Body data: 2</td>
+            <td>Body data: 3</td>
+        </tr>
+        <tr>
+            <td>Body data: 4</td>
+            <td>Body data: 5</td>
+            <td>Body data: 6</td>
+        </tr>
+        <tr>
+            <td>Body data: 7</td>
+            <td>Body data: 8</td>
+            <td>Body data: 9</td>
+        </tr>
+    </table>
+
+You don't have to stick to calling just the ``body()`` function.
+The caller can define any number of callables, allowing the
+``<%call>`` tag to produce whole layouts:
+
+.. sourcecode:: mako
+
+    <%def name="layout()">
+        ## a layout def
+        <div class="mainlayout">
+            <div class="header">
+                ${caller.header()}
+            </div>
+
+            <div class="sidebar">
+                ${caller.sidebar()}
+            </div>
+
+            <div class="content">
+                ${caller.body()}
+            </div>
+        </div>
+    </%def>
+
+    ## calls the layout def
+    <%self:layout>
+        <%def name="header()">
+            I am the header
+        </%def>
+        <%def name="sidebar()">
+            <ul>
+                <li>sidebar 1</li>
+                <li>sidebar 2</li>
+            </ul>
+        </%def>
+
+            this is the body
+    </%self:layout>
+
+The above layout would produce:
+
+.. sourcecode:: html
+
+    <div class="mainlayout">
+        <div class="header">
+        I am the header
+        </div>
+
+        <div class="sidebar">
+        <ul>
+            <li>sidebar 1</li>
+            <li>sidebar 2</li>
+        </ul>
+        </div>
+
+        <div class="content">
+        this is the body
+        </div>
+    </div>
+
+The number of things you can do with ``<%call>`` and/or the
+``<%namespacename:defname>`` calling syntax is enormous. You can
+create form widget libraries, such as an enclosing ``<FORM>``
+tag and nested HTML input elements, or portable wrapping schemes
+using ``<div>`` or other elements. You can create tags that
+interpret rows of data, such as from a database, providing the
+individual columns of each row to a ``body()`` callable which
+lays out the row any way it wants. Basically anything you'd do
+with a "custom tag" or tag library in some other system, Mako
+provides via ``<%def>`` tags and plain Python callables which are
+invoked via ``<%namespacename:defname>`` or ``<%call>``.
+
+.. _blocks:
+
+Using Blocks
+============
+
+The ``<%block>`` tag introduces some new twists on the
+``<%def>`` tag which make it more closely tailored towards layout.
+
+.. versionadded:: 0.4.1
+
+An example of a block:
+
+.. sourcecode:: mako
+
+    <html>
+        <body>
+            <%block>
+                this is a block.
+            </%block>
+        </body>
+    </html>
+
+In the above example, we define a simple block.  The block renders its content in the place
+that it's defined.  Since the block is called for us, it doesn't need a name and the above
+is referred to as an **anonymous block**.  So the output of the above template will be:
+
+.. sourcecode:: html
+
+    <html>
+        <body>
+                this is a block.
+        </body>
+    </html>
+
+So in fact the above block has absolutely no effect.  Its usefulness comes when we start
+using modifiers.  Such as, we can apply a filter to our block:
+
+.. sourcecode:: mako
+
+    <html>
+        <body>
+            <%block filter="h">
+                <html>this is some escaped html.</html>
+            </%block>
+        </body>
+    </html>
+
+or perhaps a caching directive:
+
+.. sourcecode:: mako
+
+    <html>
+        <body>
+            <%block cached="True" cache_timeout="60">
+                This content will be cached for 60 seconds.
+            </%block>
+        </body>
+    </html>
+
+Blocks also work in iterations, conditionals, just like defs:
+
+.. sourcecode:: mako
+
+    % if some_condition:
+        <%block>condition is met</%block>
+    % endif
+
+While the block renders at the point it is defined in the template,
+the underlying function is present in the generated Python code only
+once, so there's no issue with placing a block inside of a loop or
+similar. Anonymous blocks are defined as closures in the local
+rendering body, so have access to local variable scope:
+
+.. sourcecode:: mako
+
+    % for i in range(1, 4):
+        <%block>i is ${i}</%block>
+    % endfor
+
+Using Named Blocks
+------------------
+
+Possibly the more important area where blocks are useful is when we
+do actually give them names. Named blocks are tailored to behave
+somewhat closely to Jinja2's block tag, in that they define an area
+of a layout which can be overridden by an inheriting template. In
+sharp contrast to the ``<%def>`` tag, the name given to a block is
+global for the entire template regardless of how deeply it's nested:
+
+.. sourcecode:: mako
+
+    <html>
+    <%block name="header">
+        <head>
+            <title>
+                <%block name="title">Title</%block>
+            </title>
+        </head>
+    </%block>
+    <body>
+        ${next.body()}
+    </body>
+    </html>
+
+The above example has two named blocks "``header``" and "``title``", both of which can be referred to
+by an inheriting template. A detailed walkthrough of this usage can be found at :ref:`inheritance_toplevel`.
+
+Note above that named blocks don't have any argument declaration the way defs do. They still implement themselves
+as Python functions, however, so they can be invoked additional times beyond their initial definition:
+
+.. sourcecode:: mako
+
+    <div name="page">
+        <%block name="pagecontrol">
+            <a href="">previous page</a> |
+            <a href="">next page</a>
+        </%block>
+
+        <table>
+            ## some content
+        </table>
+
+        ${pagecontrol()}
+    </div>
+
+The content referenced by ``pagecontrol`` above will be rendered both above and below the ``<table>`` tags.
+
+To keep things sane, named blocks have restrictions that defs do not:
+
+* The ``<%block>`` declaration cannot have any argument signature.
+* The name of a ``<%block>`` can only be defined once in a template -- an error is raised if two blocks of the same
+  name occur anywhere in a single template, regardless of nesting.  A similar error is raised if a top level def
+  shares the same name as that of a block.
+* A named ``<%block>`` cannot be defined within a ``<%def>``, or inside the body of a "call", i.e.
+  ``<%call>`` or ``<%namespacename:defname>`` tag.  Anonymous blocks can, however.
+
+Using Page Arguments in Named Blocks
+------------------------------------
+
+A named block is very much like a top level def. It has a similar
+restriction to these types of defs in that arguments passed to the
+template via the ``<%page>`` tag aren't automatically available.
+Using arguments with the ``<%page>`` tag is described in the section
+:ref:`namespaces_body`, and refers to scenarios such as when the
+``body()`` method of a template is called from an inherited template passing
+arguments, or the template is invoked from an ``<%include>`` tag
+with arguments. To allow a named block to share the same arguments
+passed to the page, the ``args`` attribute can be used:
+
+.. sourcecode:: mako
+
+    <%page args="post"/>
+
+    <a name="${post.title}" />
+
+    <span class="post_prose">
+        <%block name="post_prose" args="post">
+            ${post.content}
+        </%block>
+    </span>
+
+Where above, if the template is called via a directive like
+``<%include file="post.mako" args="post=post" />``, the ``post``
+variable is available both in the main body as well as the
+``post_prose`` block.
+
+Similarly, the ``**pageargs`` variable is present, in named blocks only,
+for those arguments not explicit in the ``<%page>`` tag:
+
+.. sourcecode:: mako
+
+    <%block name="post_prose">
+        ${pageargs['post'].content}
+    </%block>
+
+The ``args`` attribute is only allowed with named blocks. With
+anonymous blocks, the Python function is always rendered in the same
+scope as the call itself, so anything available directly outside the
+anonymous block is available inside as well.
diff --git a/lib/Mako-0.7.3/doc/_sources/filtering.txt b/lib/Mako-0.7.3/doc/_sources/filtering.txt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_sources/filtering.txt
@@ -0,0 +1,344 @@
+.. _filtering_toplevel:
+
+=======================
+Filtering and Buffering
+=======================
+
+Expression Filtering
+====================
+
+As described in the chapter :ref:`syntax_toplevel`, the "``|``" operator can be
+applied to a "``${}``" expression to apply escape filters to the
+output:
+
+.. sourcecode:: mako
+
+    ${"this is some text" | u}
+
+The above expression applies URL escaping to the expression, and
+produces ``this+is+some+text``.
+
+The built-in escape flags are:
+
+* ``u`` : URL escaping, provided by
+  ``urllib.quote_plus(string.encode('utf-8'))``
+* ``h`` : HTML escaping, provided by
+  ``markupsafe.escape(string)``
+
+  .. versionadded:: 0.3.4
+     Prior versions use ``cgi.escape(string, True)``.
+
+* ``x`` : XML escaping
+* ``trim`` : whitespace trimming, provided by ``string.strip()``
+* ``entity`` : produces HTML entity references for applicable
+  strings, derived from ``htmlentitydefs``
+* ``unicode`` (``str`` on Python 3): produces a Python unicode
+  string (this function is applied by default)
+* ``decode.<some encoding>``: decode input into a Python
+  unicode with the specified encoding
+* ``n`` : disable all default filtering; only filters specified
+  in the local expression tag will be applied.
+
+To apply more than one filter, separate them by a comma:
+
+.. sourcecode:: mako
+
+    ${" <tag>some value</tag> " | h,trim}
+
+The above produces ``<tag>some value</tag>``, with
+no leading or trailing whitespace. The HTML escaping function is
+applied first, the "trim" function second.
+
+Naturally, you can make your own filters too. A filter is just a
+Python function that accepts a single string argument, and
+returns the filtered result. The expressions after the ``|``
+operator draw upon the local namespace of the template in which
+they appear, meaning you can define escaping functions locally:
+
+.. sourcecode:: mako
+
+    <%!
+        def myescape(text):
+            return "<TAG>" + text + "</TAG>"
+    %>
+
+    Here's some tagged text: ${"text" | myescape}
+
+Or from any Python module:
+
+.. sourcecode:: mako
+
+    <%!
+        import myfilters
+    %>
+
+    Here's some tagged text: ${"text" | myfilters.tagfilter}
+
+A page can apply a default set of filters to all expression tags
+using the ``expression_filter`` argument to the ``%page`` tag:
+
+.. sourcecode:: mako
+
+    <%page expression_filter="h"/>
+
+    Escaped text:  ${"<html>some html</html>"}
+
+Result:
+
+.. sourcecode:: html
+
+    Escaped text: <html>some html</html>
+
+.. _filtering_default_filters:
+
+The ``default_filters`` Argument
+--------------------------------
+
+In addition to the ``expression_filter`` argument, the
+``default_filters`` argument to both :class:`.Template` and
+:class:`.TemplateLookup` can specify filtering for all expression tags
+at the programmatic level. This array-based argument, when given
+its default argument of ``None``, will be internally set to
+``["unicode"]`` (or ``["str"]`` on Python 3), except when
+``disable_unicode=True`` is set in which case it defaults to
+``["str"]``:
+
+.. sourcecode:: python
+
+    t = TemplateLookup(directories=['/tmp'], default_filters=['unicode'])
+
+To replace the usual ``unicode``/``str`` function with a
+specific encoding, the ``decode`` filter can be substituted:
+
+.. sourcecode:: python
+
+    t = TemplateLookup(directories=['/tmp'], default_filters=['decode.utf8'])
+
+To disable ``default_filters`` entirely, set it to an empty
+list:
+
+.. sourcecode:: python
+
+    t = TemplateLookup(directories=['/tmp'], default_filters=[])
+
+Any string name can be added to ``default_filters`` where it
+will be added to all expressions as a filter. The filters are
+applied from left to right, meaning the leftmost filter is
+applied first.
+
+.. sourcecode:: python
+
+    t = Template(templatetext, default_filters=['unicode', 'myfilter'])
+
+To ease the usage of ``default_filters`` with custom filters,
+you can also add imports (or other code) to all templates using
+the ``imports`` argument:
+
+.. sourcecode:: python
+
+    t = TemplateLookup(directories=['/tmp'],
+                       default_filters=['unicode', 'myfilter'],
+                       imports=['from mypackage import myfilter'])
+
+The above will generate templates something like this:
+
+.. sourcecode:: python
+
+    # ....
+    from mypackage import myfilter
+
+    def render_body(context):
+        context.write(myfilter(unicode("some text")))
+
+Turning off Filtering with the ``n`` Filter
+-------------------------------------------
+
+In all cases the special ``n`` filter, used locally within an
+expression, will **disable** all filters declared in the
+``<%page>`` tag as well as in ``default_filters``. Such as:
+
+.. sourcecode:: mako
+
+    ${'myexpression' | n}
+
+will render ``myexpression`` with no filtering of any kind, and:
+
+.. sourcecode:: mako
+
+    ${'myexpression' | n,trim}
+
+will render ``myexpression`` using the ``trim`` filter only.
+
+Filtering Defs and Blocks
+=========================
+
+The ``%def`` and ``%block`` tags have an argument called ``filter`` which will apply the
+given list of filter functions to the output of the ``%def``:
+
+.. sourcecode:: mako
+
+    <%def name="foo()" filter="h, trim">
+        <b>this is bold</b>
+    </%def>
+
+When the ``filter`` attribute is applied to a def as above, the def
+is automatically **buffered** as well. This is described next.
+
+Buffering
+=========
+
+One of Mako's central design goals is speed. To this end, all of
+the textual content within a template and its various callables
+is by default piped directly to the single buffer that is stored
+within the :class:`.Context` object. While this normally is easy to
+miss, it has certain side effects. The main one is that when you
+call a def using the normal expression syntax, i.e.
+``${somedef()}``, it may appear that the return value of the
+function is the content it produced, which is then delivered to
+your template just like any other expression substitution,
+except that normally, this is not the case; the return value of
+``${somedef()}`` is simply the empty string ``''``. By the time
+you receive this empty string, the output of ``somedef()`` has
+been sent to the underlying buffer.
+
+You may not want this effect, if for example you are doing
+something like this:
+
+.. sourcecode:: mako
+
+    ${" results " + somedef() + " more results "}
+
+If the ``somedef()`` function produced the content "``somedef's
+results``", the above template would produce this output:
+
+.. sourcecode:: html
+
+    somedef's results results more results
+
+This is because ``somedef()`` fully executes before the
+expression returns the results of its concatenation; the
+concatenation in turn receives just the empty string as its
+middle expression.
+
+Mako provides two ways to work around this. One is by applying
+buffering to the ``%def`` itself:
+
+.. sourcecode:: mako
+
+    <%def name="somedef()" buffered="True">
+        somedef's results
+    </%def>
+
+The above definition will generate code similar to this:
+
+.. sourcecode:: python
+
+    def somedef():
+        context.push_buffer()
+        try:
+            context.write("somedef's results")
+        finally:
+            buf = context.pop_buffer()
+        return buf.getvalue()
+
+So that the content of ``somedef()`` is sent to a second buffer,
+which is then popped off the stack and its value returned. The
+speed hit inherent in buffering the output of a def is also
+apparent.
+
+Note that the ``filter`` argument on ``%def`` also causes the def to
+be buffered. This is so that the final content of the ``%def`` can
+be delivered to the escaping function in one batch, which
+reduces method calls and also produces more deterministic
+behavior for the filtering function itself, which can possibly
+be useful for a filtering function that wishes to apply a
+transformation to the text as a whole.
+
+The other way to buffer the output of a def or any Mako callable
+is by using the built-in ``capture`` function. This function
+performs an operation similar to the above buffering operation
+except it is specified by the caller.
+
+.. sourcecode:: mako
+
+    ${" results " + capture(somedef) + " more results "}
+
+Note that the first argument to the ``capture`` function is
+**the function itself**, not the result of calling it. This is
+because the ``capture`` function takes over the job of actually
+calling the target function, after setting up a buffered
+environment. To send arguments to the function, just send them
+to ``capture`` instead:
+
+.. sourcecode:: mako
+
+    ${capture(somedef, 17, 'hi', use_paging=True)}
+
+The above call is equivalent to the unbuffered call:
+
+.. sourcecode:: mako
+
+    ${somedef(17, 'hi', use_paging=True)}
+
+Decorating
+==========
+
+.. versionadded:: 0.2.5
+
+Somewhat like a filter for a ``%def`` but more flexible, the ``decorator``
+argument to ``%def`` allows the creation of a function that will
+work in a similar manner to a Python decorator. The function can
+control whether or not the function executes. The original
+intent of this function is to allow the creation of custom cache
+logic, but there may be other uses as well.
+
+``decorator`` is intended to be used with a regular Python
+function, such as one defined in a library module. Here we'll
+illustrate the python function defined in the template for
+simplicities' sake:
+
+.. sourcecode:: mako
+
+    <%!
+        def bar(fn):
+            def decorate(context, *args, **kw):
+                context.write("BAR")
+                fn(*args, **kw)
+                context.write("BAR")
+                return ''
+            return decorate
+    %>
+
+    <%def name="foo()" decorator="bar">
+        this is foo
+    </%def>
+
+    ${foo()}
+
+The above template will return, with more whitespace than this,
+``"BAR this is foo BAR"``. The function is the render callable
+itself (or possibly a wrapper around it), and by default will
+write to the context. To capture its output, use the :func:`.capture`
+callable in the ``mako.runtime`` module (available in templates
+as just ``runtime``):
+
+.. sourcecode:: mako
+
+    <%!
+        def bar(fn):
+            def decorate(context, *args, **kw):
+                return "BAR" + runtime.capture(context, fn, *args, **kw) + "BAR"
+            return decorate
+    %>
+
+    <%def name="foo()" decorator="bar">
+        this is foo
+    </%def>
+
+    ${foo()}
+
+The decorator can be used with top-level defs as well as nested
+defs, and blocks too. Note that when calling a top-level def from the
+:class:`.Template` API, i.e. ``template.get_def('somedef').render()``,
+the decorator has to write the output to the ``context``, i.e.
+as in the first example. The return value gets discarded.
diff --git a/lib/Mako-0.7.3/doc/_sources/index.txt b/lib/Mako-0.7.3/doc/_sources/index.txt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_sources/index.txt
@@ -0,0 +1,22 @@
+Table of Contents
+=================
+
+.. toctree::
+    :maxdepth: 2
+
+    usage
+    syntax
+    defs
+    runtime
+    namespaces
+    inheritance
+    filtering
+    unicode
+    caching
+
+Indices and Tables
+------------------
+
+* :ref:`genindex`
+* :ref:`search`
+
diff --git a/lib/Mako-0.7.3/doc/_sources/inheritance.txt b/lib/Mako-0.7.3/doc/_sources/inheritance.txt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_sources/inheritance.txt
@@ -0,0 +1,534 @@
+.. _inheritance_toplevel:
+
+===========
+Inheritance
+===========
+
+.. note::  Most of the inheritance examples here take advantage of a feature that's
+    new in Mako as of version 0.4.1 called the "block".  This tag is very similar to
+    the "def" tag but is more streamlined for usage with inheritance.  Note that
+    all of the examples here which use blocks can also use defs instead.  Contrasting
+    usages will be illustrated.
+
+Using template inheritance, two or more templates can organize
+themselves into an **inheritance chain**, where content and
+functions from all involved templates can be intermixed. The
+general paradigm of template inheritance is this: if a template
+``A`` inherits from template ``B``, then template ``A`` agrees
+to send the executional control to template ``B`` at runtime
+(``A`` is called the **inheriting** template). Template ``B``,
+the **inherited** template, then makes decisions as to what
+resources from ``A`` shall be executed.
+
+In practice, it looks like this. Here's a hypothetical inheriting
+template, ``index.html``:
+
+.. sourcecode:: mako
+
+    ## index.html
+    <%inherit file="base.html"/>
+
+    <%block name="header">
+        this is some header content
+    </%block>
+
+    this is the body content.
+
+And ``base.html``, the inherited template:
+
+.. sourcecode:: mako
+
+    ## base.html
+    <html>
+        <body>
+            <div class="header">
+                <%block name="header"/>
+            </div>
+
+            ${self.body()}
+
+            <div class="footer">
+                <%block name="footer">
+                    this is the footer
+                </%block>
+            </div>
+        </body>
+    </html>
+
+Here is a breakdown of the execution:
+
+#. When ``index.html`` is rendered, control immediately passes to
+   ``base.html``.
+#. ``base.html`` then renders the top part of an HTML document,
+   then invokes the ``<%block name="header">`` block.  It invokes the
+   underlying ``header()`` function off of a built-in namespace
+   called ``self`` (this namespace was first introduced in the
+   :doc:`Namespaces chapter <namespaces>` in :ref:`namespace_self`). Since
+   ``index.html`` is the topmost template and also defines a block
+   called ``header``, it's this ``header`` block that ultimately gets
+   executed -- instead of the one that's present in ``base.html``.
+#. Control comes back to ``base.html``. Some more HTML is
+   rendered.
+#. ``base.html`` executes ``self.body()``. The ``body()``
+   function on all template-based namespaces refers to the main
+   body of the template, therefore the main body of
+   ``index.html`` is rendered.
+#. When ``<%block name="header">`` is encountered in ``index.html`` 
+   during the ``self.body()`` call, a conditional is checked -- does the
+   current inherited template, i.e. ``base.html``, also define this block? If yes,
+   the ``<%block>`` is **not** executed here -- the inheritance
+   mechanism knows that the parent template is responsible for rendering
+   this block (and in fact it already has).  In other words a block
+   only renders in its *basemost scope*.
+#. Control comes back to ``base.html``. More HTML is rendered,
+   then the ``<%block name="footer">`` expression is invoked.
+#. The ``footer`` block is only defined in ``base.html``, so being
+   the topmost definition of ``footer``, it's the one that
+   executes. If ``index.html`` also specified ``footer``, then
+   its version would **override** that of the base.
+#. ``base.html`` finishes up rendering its HTML and the template
+   is complete, producing:
+
+   .. sourcecode:: html
+
+        <html>
+            <body>
+                <div class="header">
+                    this is some header content
+                </div>
+
+                this is the body content.
+
+                <div class="footer">
+                    this is the footer
+                </div>
+            </body>
+        </html>
+
+...and that is template inheritance in a nutshell. The main idea
+is that the methods that you call upon ``self`` always
+correspond to the topmost definition of that method. Very much
+the way ``self`` works in a Python class, even though Mako is
+not actually using Python class inheritance to implement this
+functionality. (Mako doesn't take the "inheritance" metaphor too
+seriously; while useful to setup some commonly recognized
+semantics, a textual template is not very much like an
+object-oriented class construct in practice).
+
+Nesting Blocks
+==============
+
+The named blocks defined in an inherited template can also be nested within
+other blocks.  The name given to each block is globally accessible via any inheriting
+template.  We can add a new block ``title`` to our ``header`` block:
+
+.. sourcecode:: mako
+
+    ## base.html
+    <html>
+        <body>
+            <div class="header">
+                <%block name="header">
+                    <h2>
+                        <%block name="title"/>
+                    </h2>
+                </%block>
+            </div>
+
+            ${self.body()}
+
+            <div class="footer">
+                <%block name="footer">
+                    this is the footer
+                </%block>
+            </div>
+        </body>
+    </html>
+
+The inheriting template can name either or both of ``header`` and ``title``, separately
+or nested themselves:
+
+.. sourcecode:: mako
+
+    ## index.html
+    <%inherit file="base.html"/>
+
+    <%block name="header">
+        this is some header content
+        ${parent.header()}
+    </%block>
+
+    <%block name="title">
+        this is the title
+    </%block>
+
+    this is the body content.
+
+Note when we overrode ``header``, we added an extra call ``${parent.header()}`` in order to invoke
+the parent's ``header`` block in addition to our own.  That's described in more detail below,
+in :ref:`parent_namespace`.
+
+Rendering a Named Block Multiple Times
+======================================
+
+Recall from the section :ref:`blocks` that a named block is just like a ``<%def>``,
+with some different usage rules.  We can call one of our named sections distinctly, for example
+a section that is used more than once, such as the title of a page:
+
+.. sourcecode:: mako
+
+    <html>
+        <head>
+            <title>${self.title()}</title>
+        </head>
+        <body>
+        <%block name="header">
+            <h2><%block name="title"/></h2>
+        </%block>
+        ${self.body()}
+        </body>
+    </html>
+
+Where above an inheriting template can define ``<%block name="title">`` just once, and it will be
+used in the base template both in the ``<title>`` section as well as the ``<h2>``.
+
+But what about Defs?
+====================
+
+The previous example used the ``<%block>`` tag to produce areas of content
+to be overridden.  Before Mako 0.4.1, there wasn't any such tag -- instead
+there was only the ``<%def>`` tag.   As it turns out, named blocks and defs are
+largely interchangeable.  The def simply doesn't call itself automatically,
+and has more open-ended naming and scoping rules that are more flexible and similar
+to Python itself, but less suited towards layout.  The first example from
+this chapter using defs would look like:
+
+.. sourcecode:: mako
+
+    ## index.html
+    <%inherit file="base.html"/>
+
+    <%def name="header()">
+        this is some header content
+    </%def>
+
+    this is the body content.
+
+And ``base.html``, the inherited template:
+
+.. sourcecode:: mako
+
+    ## base.html
+    <html>
+        <body>
+            <div class="header">
+                ${self.header()}
+            </div>
+
+            ${self.body()}
+
+            <div class="footer">
+                ${self.footer()}
+            </div>
+        </body>
+    </html>
+
+    <%def name="header()"/>
+    <%def name="footer()">
+        this is the footer
+    </%def>
+
+Above, we illustrate that defs differ from blocks in that their definition
+and invocation are defined in two separate places, instead of at once. You can *almost* do exactly what a
+block does if you put the two together:
+
+.. sourcecode:: mako
+
+    <div class="header">
+        <%def name="header()"></%def>${self.header()}
+    </div>
+
+The ``<%block>`` is obviously more streamlined than the ``<%def>`` for this kind
+of usage.  In addition,
+the above "inline" approach with ``<%def>`` does not work with nesting:
+
+.. sourcecode:: mako
+
+    <head>
+        <%def name="header()">
+            <title>
+            ## this won't work !
+            <%def name="title()">default title</%def>${self.title()}
+            </title>
+        </%def>${self.header()}
+    </head>
+
+Where above, the ``title()`` def, because it's a def within a def, is not part of the
+template's exported namespace and will not be part of ``self``.  If the inherited template
+did define its own ``title`` def at the top level, it would be called, but the "default title"
+above is not present at all on ``self`` no matter what.  For this to work as expected
+you'd instead need to say:
+
+.. sourcecode:: mako
+
+    <head>
+        <%def name="header()">
+            <title>
+            ${self.title()}
+            </title>
+        </%def>${self.header()}
+
+        <%def name="title()"/>
+    </head>
+
+That is, ``title`` is defined outside of any other defs so that it is in the ``self`` namespace.
+It works, but the definition needs to be potentially far away from the point of render.
+
+A named block is always placed in the ``self`` namespace, regardless of nesting,
+so this restriction is lifted:
+
+.. sourcecode:: mako
+
+    ## base.html
+    <head>
+        <%block name="header">
+            <title>
+            <%block name="title"/>
+            </title>
+        </%block>
+    </head>
+
+The above template defines ``title`` inside of ``header``, and an inheriting template can define
+one or both in **any** configuration, nested inside each other or not, in order for them to be used:
+
+.. sourcecode:: mako
+
+    ## index.html
+    <%inherit file="base.html"/>
+    <%block name="title">
+        the title
+    </%block>
+    <%block name="header">
+        the header
+    </%block>
+
+So while the ``<%block>`` tag lifts the restriction of nested blocks not being available externally,
+in order to achieve this it *adds* the restriction that all block names in a single template need
+to be globally unique within the template, and additionally that a ``<%block>`` can't be defined
+inside of a ``<%def>``. It's a more restricted tag suited towards a more specific use case than ``<%def>``.
+
+Using the ``next`` Namespace to Produce Content Wrapping
+========================================================
+
+Sometimes you have an inheritance chain that spans more than two
+templates. Or maybe you don't, but you'd like to build your
+system such that extra inherited templates can be inserted in
+the middle of a chain where they would be smoothly integrated.
+If each template wants to define its layout just within its main
+body, you can't just call ``self.body()`` to get at the
+inheriting template's body, since that is only the topmost body.
+To get at the body of the *next* template, you call upon the
+namespace ``next``, which is the namespace of the template
+**immediately following** the current template.
+
+Lets change the line in ``base.html`` which calls upon
+``self.body()`` to instead call upon ``next.body()``:
+
+.. sourcecode:: mako
+
+    ## base.html
+    <html>
+        <body>
+            <div class="header">
+                <%block name="header"/>
+            </div>
+
+            ${next.body()}
+
+            <div class="footer">
+                <%block name="footer">
+                    this is the footer
+                </%block>
+            </div>
+        </body>
+    </html>
+
+
+Lets also add an intermediate template called ``layout.html``,
+which inherits from ``base.html``:
+
+.. sourcecode:: mako
+
+    ## layout.html
+    <%inherit file="base.html"/>
+    <ul>
+        <%block name="toolbar">
+            <li>selection 1</li>
+            <li>selection 2</li>
+            <li>selection 3</li>
+        </%block>
+    </ul>
+    <div class="mainlayout">
+        ${next.body()}
+    </div>
+
+And finally change ``index.html`` to inherit from
+``layout.html`` instead:
+
+.. sourcecode:: mako
+
+    ## index.html
+    <%inherit file="layout.html"/>
+
+    ## .. rest of template
+
+In this setup, each call to ``next.body()`` will render the body
+of the next template in the inheritance chain (which can be
+written as ``base.html -> layout.html -> index.html``). Control
+is still first passed to the bottommost template ``base.html``,
+and ``self`` still references the topmost definition of any
+particular def.
+
+The output we get would be:
+
+.. sourcecode:: html
+
+    <html>
+        <body>
+            <div class="header">
+                this is some header content
+            </div>
+
+            <ul>
+                <li>selection 1</li>
+                <li>selection 2</li>
+                <li>selection 3</li>
+            </ul>
+
+            <div class="mainlayout">
+            this is the body content.
+            </div>
+
+            <div class="footer">
+                this is the footer
+            </div>
+        </body>
+    </html>
+
+So above, we have the ``<html>``, ``<body>`` and
+``header``/``footer`` layout of ``base.html``, we have the
+``<ul>`` and ``mainlayout`` section of ``layout.html``, and the
+main body of ``index.html`` as well as its overridden ``header``
+def. The ``layout.html`` template is inserted into the middle of
+the chain without ``base.html`` having to change anything.
+Without the ``next`` namespace, only the main body of
+``index.html`` could be used; there would be no way to call
+``layout.html``'s body content.
+
+.. _parent_namespace:
+
+Using the ``parent`` Namespace to Augment Defs
+==============================================
+
+Lets now look at the other inheritance-specific namespace, the
+opposite of ``next`` called ``parent``. ``parent`` is the
+namespace of the template **immediately preceding** the current
+template. What's useful about this namespace is that
+defs or blocks can call upon their overridden versions.
+This is not as hard as it sounds and
+is very much like using the ``super`` keyword in Python. Lets
+modify ``index.html`` to augment the list of selections provided
+by the ``toolbar`` function in ``layout.html``:
+
+.. sourcecode:: mako
+
+    ## index.html
+    <%inherit file="layout.html"/>
+
+    <%block name="header">
+        this is some header content
+    </%block>
+
+    <%block name="toolbar">
+        ## call the parent's toolbar first
+        ${parent.toolbar()}
+        <li>selection 4</li>
+        <li>selection 5</li>
+    </%block>
+
+    this is the body content.
+
+Above, we implemented a ``toolbar()`` function, which is meant
+to override the definition of ``toolbar`` within the inherited
+template ``layout.html``. However, since we want the content
+from that of ``layout.html`` as well, we call it via the
+``parent`` namespace whenever we want it's content, in this case
+before we add our own selections. So the output for the whole
+thing is now:
+
+.. sourcecode:: html
+
+    <html>
+        <body>
+            <div class="header">
+                this is some header content
+            </div>
+
+            <ul>
+                <li>selection 1</li>
+                <li>selection 2</li>
+                <li>selection 3</li>
+                <li>selection 4</li>
+                <li>selection 5</li>
+            </ul>
+
+            <div class="mainlayout">
+            this is the body content.
+            </div>
+
+            <div class="footer">
+                this is the footer
+            </div>
+        </body>
+    </html>
+
+and you're now a template inheritance ninja!
+
+Inheritable Attributes
+======================
+
+The :attr:`attr <.Namespace.attr>` accessor of the :class:`.Namespace` object
+allows access to module level variables declared in a template. By accessing
+``self.attr``, you can access regular attributes from the
+inheritance chain as declared in ``<%! %>`` sections. Such as:
+
+.. sourcecode:: mako
+
+    <%!
+        class_ = "grey"
+    %>
+
+    <div class="${self.attr.class_}">
+        ${self.body()}
+    </div>
+
+If an inheriting template overrides ``class_`` to be
+``"white"``, as in:
+
+.. sourcecode:: mako
+
+    <%!
+        class_ = "white"
+    %>
+    <%inherit file="parent.html"/>
+
+    This is the body
+
+you'll get output like:
+
+.. sourcecode:: html
+
+    <div class="white">
+        This is the body
+    </div>
+
diff --git a/lib/Mako-0.7.3/doc/_sources/namespaces.txt b/lib/Mako-0.7.3/doc/_sources/namespaces.txt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_sources/namespaces.txt
@@ -0,0 +1,349 @@
+.. _namespaces_toplevel:
+
+==========
+Namespaces
+==========
+
+Namespaces are used to organize groups of defs into
+categories, and also to "import" defs from other files.
+
+If the file ``components.html`` defines these two defs:
+
+.. sourcecode:: mako
+
+    ## components.html
+    <%def name="comp1()">
+        this is comp1
+    </%def>
+
+    <%def name="comp2(x)">
+        this is comp2, x is ${x}
+    </%def>
+
+you can make another file, for example ``index.html``, that
+pulls those two defs into a namespace called ``comp``:
+
+.. sourcecode:: mako
+
+    ## index.html
+    <%namespace name="comp" file="components.html"/>
+
+    Here's comp1:  ${comp.comp1()}
+    Here's comp2:  ${comp.comp2(x=5)}
+
+The ``comp`` variable above is an instance of
+:class:`.Namespace`, a **proxy object** which delivers
+method calls to the underlying template callable using the
+current context.
+
+``<%namespace>`` also provides an ``import`` attribute which can
+be used to pull the names into the local namespace, removing the
+need to call it via the "``.``" operator. When ``import`` is used, the
+``name`` attribute is optional.
+
+.. sourcecode:: mako
+
+    <%namespace file="components.html" import="comp1, comp2"/>
+
+    Heres comp1:  ${comp1()}
+    Heres comp2:  ${comp2(x=5)}
+
+``import`` also supports the "``*``" operator:
+
+.. sourcecode:: mako
+
+    <%namespace file="components.html" import="*"/>
+
+    Heres comp1:  ${comp1()}
+    Heres comp2:  ${comp2(x=5)}
+
+The names imported by the ``import`` attribute take precedence
+over any names that exist within the current context.
+
+.. note:: In current versions of Mako, usage of ``import='*'`` is
+   known to decrease performance of the template. This will be
+   fixed in a future release.
+
+The ``file`` argument allows expressions -- if looking for
+context variables, the ``context`` must be named explicitly:
+
+.. sourcecode:: mako
+
+    <%namespace name="dyn" file="${context['namespace_name']}"/>
+
+Ways to Call Namespaces
+=======================
+
+There are essentially four ways to call a function from a
+namespace.
+
+The "expression" format, as described previously. Namespaces are
+just Python objects with functions on them, and can be used in
+expressions like any other function:
+
+.. sourcecode:: mako
+
+    ${mynamespace.somefunction('some arg1', 'some arg2', arg3='some arg3', arg4='some arg4')}
+
+Synonymous with the "expression" format is the "custom tag"
+format, when a "closed" tag is used. This format, introduced in
+Mako 0.2.3, allows the usage of a "custom" Mako tag, with the
+function arguments passed in using named attributes:
+
+.. sourcecode:: mako
+
+    <%mynamespace:somefunction arg1="some arg1" arg2="some arg2" arg3="some arg3" arg4="some arg4"/>
+
+When using tags, the values of the arguments are taken as
+literal strings by default. To embed Python expressions as
+arguments, use the embedded expression format:
+
+.. sourcecode:: mako
+
+    <%mynamespace:somefunction arg1="${someobject.format()}" arg2="${somedef(5, 12)}"/>
+
+The "custom tag" format is intended mainly for namespace
+functions which recognize body content, which in Mako is known
+as a "def with embedded content":
+
+.. sourcecode:: mako
+
+    <%mynamespace:somefunction arg1="some argument" args="x, y">
+        Some record: ${x}, ${y}
+    </%mynamespace:somefunction>
+
+The "classic" way to call defs with embedded content is the ``<%call>`` tag:
+
+.. sourcecode:: mako
+
+    <%call expr="mynamespace.somefunction(arg1='some argument')" args="x, y">
+        Some record: ${x}, ${y}
+    </%call>
+
+For information on how to construct defs that embed content from
+the caller, see :ref:`defs_with_content`.
+
+.. _namespaces_python_modules:
+
+Namespaces from Regular Python Modules
+======================================
+
+Namespaces can also import regular Python functions from
+modules. These callables need to take at least one argument,
+``context``, an instance of :class:`.Context`. A module file 
+``some/module.py`` might contain the callable:
+
+.. sourcecode:: python
+
+    def my_tag(context):
+        context.write("hello world")
+        return ''
+
+A template can use this module via:
+
+.. sourcecode:: mako
+
+    <%namespace name="hw" module="some.module"/>
+
+    ${hw.my_tag()}
+
+Note that the ``context`` argument is not needed in the call;
+the :class:`.Namespace` tag creates a locally-scoped callable which
+takes care of it. The ``return ''`` is so that the def does not
+dump a ``None`` into the output stream -- the return value of any
+def is rendered after the def completes, in addition to whatever
+was passed to :meth:`.Context.write` within its body.
+
+If your def is to be called in an "embedded content" context,
+that is as described in :ref:`defs_with_content`, you should use
+the :func:`.supports_caller` decorator, which will ensure that Mako
+will ensure the correct "caller" variable is available when your
+def is called, supporting embedded content:
+
+.. sourcecode:: python
+
+    from mako.runtime import supports_caller
+
+    @supports_caller
+    def my_tag(context):
+        context.write("<div>")
+        context['caller'].body()
+        context.write("</div>")
+        return ''
+
+Capturing of output is available as well, using the
+outside-of-templates version of the :func:`.capture` function,
+which accepts the "context" as its first argument:
+
+.. sourcecode:: python
+
+    from mako.runtime import supports_caller, capture
+
+    @supports_caller
+    def my_tag(context):
+        return "<div>%s</div>" % \
+                capture(context, context['caller'].body, x="foo", y="bar")
+
+Declaring Defs in Namespaces
+============================
+
+The ``<%namespace>`` tag supports the definition of ``<%def>``\ s
+directly inside the tag. These defs become part of the namespace
+like any other function, and will override the definitions
+pulled in from a remote template or module:
+
+.. sourcecode:: mako
+
+    ## define a namespace
+    <%namespace name="stuff">
+        <%def name="comp1()">
+            comp1
+        </%def>
+    </%namespace>
+
+    ## then call it
+    ${stuff.comp1()}
+
+.. _namespaces_body:
+
+The ``body()`` Method
+=====================
+
+Every namespace that is generated from a template contains a
+method called ``body()``. This method corresponds to the main
+body of the template, and plays its most important roles when
+using inheritance relationships as well as
+def-calls-with-content.
+
+Since the ``body()`` method is available from a namespace just
+like all the other defs defined in a template, what happens if
+you send arguments to it? By default, the ``body()`` method
+accepts no positional arguments, and for usefulness in
+inheritance scenarios will by default dump all keyword arguments
+into a dictionary called ``pageargs``. But if you actually want
+to get at the keyword arguments, Mako recommends you define your
+own argument signature explicitly. You do this via using the
+``<%page>`` tag:
+
+.. sourcecode:: mako
+
+    <%page args="x, y, someval=8, scope='foo', **kwargs"/>
+
+A template which defines the above signature requires that the
+variables ``x`` and ``y`` are defined, defines default values
+for ``someval`` and ``scope``, and sets up ``**kwargs`` to
+receive all other keyword arguments. If ``**kwargs`` or similar
+is not present, the argument ``**pageargs`` gets tacked on by
+Mako. When the template is called as a top-level template (i.e.
+via :meth:`~.Template.render`) or via the ``<%include>`` tag, the
+values for these arguments will be pulled from the ``Context``.
+In all other cases, i.e. via calling the ``body()`` method, the
+arguments are taken as ordinary arguments from the method call.
+So above, the body might be called as:
+
+.. sourcecode:: mako
+
+    ${self.body(5, y=10, someval=15, delta=7)}
+
+The :class:`.Context` object also supplies a :attr:`~.Context.kwargs` accessor, for
+cases when you'd like to pass along whatever is in the context to
+a ``body()`` callable:
+
+.. sourcecode:: mako
+
+    ${next.body(**context.kwargs)}
+
+The usefulness of calls like the above become more apparent when
+one works with inheriting templates. For more information on
+this, as well as the meanings of the names ``self`` and
+``next``, see :ref:`inheritance_toplevel`.
+
+.. _namespaces_builtin:
+
+Built-in Namespaces
+===================
+
+The namespace is so great that Mako gives your template one (or
+two) for free. The names of these namespaces are ``local`` and
+``self``. Other built-in namespaces include ``parent`` and
+``next``, which are optional and are described in
+:ref:`inheritance_toplevel`.
+
+.. _namespace_local:
+
+``local``
+---------
+
+The ``local`` namespace is basically the namespace for the
+currently executing template. This means that all of the top
+level defs defined in your template, as well as your template's
+``body()`` function, are also available off of the ``local``
+namespace.
+
+The ``local`` namespace is also where properties like ``uri``,
+``filename``, and ``module`` and the ``get_namespace`` method
+can be particularly useful.
+
+.. _namespace_self:
+
+``self``
+--------
+
+The ``self`` namespace, in the case of a template that does not
+use inheritance, is synonymous with ``local``. If inheritance is
+used, then ``self`` references the topmost template in the
+inheritance chain, where it is most useful for providing the
+ultimate form of various "method" calls which may have been
+overridden at various points in an inheritance chain. See
+:ref:`inheritance_toplevel`.
+
+Inheritable Namespaces
+======================
+
+The ``<%namespace>`` tag includes an optional attribute
+``inheritable="True"``, which will cause the namespace to be
+attached to the ``self`` namespace. Since ``self`` is globally
+available throughout an inheritance chain (described in the next
+section), all the templates in an inheritance chain can get at
+the namespace imported in a super-template via ``self``.
+
+.. sourcecode:: mako
+
+    ## base.html
+    <%namespace name="foo" file="foo.html" inheritable="True"/>
+
+    ${next.body()}
+
+    ## somefile.html
+    <%inherit file="base.html"/>
+
+    ${self.foo.bar()}
+
+This allows a super-template to load a whole bunch of namespaces
+that its inheriting templates can get to, without them having to
+explicitly load those namespaces themselves.
+
+The ``import="*"`` part of the ``<%namespace>`` tag doesn't yet
+interact with the ``inheritable`` flag, so currently you have to
+use the explicit namespace name off of ``self``, followed by the
+desired function name. But more on this in a future release.
+
+API Reference
+=============
+
+.. autoclass:: mako.runtime.Namespace
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.runtime.TemplateNamespace
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.runtime.ModuleNamespace
+    :show-inheritance:
+    :members:
+ 
+.. autofunction:: mako.runtime.supports_caller
+
+.. autofunction:: mako.runtime.capture
+
diff --git a/lib/Mako-0.7.3/doc/_sources/runtime.txt b/lib/Mako-0.7.3/doc/_sources/runtime.txt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_sources/runtime.txt
@@ -0,0 +1,448 @@
+.. _runtime_toplevel:
+
+============================
+The Mako Runtime Environment
+============================
+
+This section describes a little bit about the objects and
+built-in functions that are available in templates.
+
+.. _context:
+
+Context
+=======
+
+The :class:`.Context` is the central object that is created when
+a template is first executed, and is responsible for handling
+all communication with the outside world.  Within the template
+environment, it is available via the :ref:`reserved name <reserved_names>`
+``context``.  The :class:`.Context` includes two
+major components, one of which is the output buffer, which is a
+file-like object such as Python's ``StringIO`` or similar, and
+the other a dictionary of variables that can be freely
+referenced within a template; this dictionary is a combination
+of the arguments sent to the :meth:`~.Template.render` function and
+some built-in variables provided by Mako's runtime environment.
+
+The Buffer
+----------
+
+The buffer is stored within the :class:`.Context`, and writing
+to it is achieved by calling the :meth:`~.Context.write` method
+-- in a template this looks like ``context.write('some string')``.
+You usually don't need to care about this, as all text within a template, as
+well as all expressions provided by ``${}``, automatically send
+everything to this method. The cases you might want to be aware
+of its existence are if you are dealing with various
+filtering/buffering scenarios, which are described in
+:ref:`filtering_toplevel`, or if you want to programmatically
+send content to the output stream, such as within a ``<% %>``
+block.
+
+.. sourcecode:: mako
+
+    <%
+        context.write("some programmatic text")
+    %>
+
+The actual buffer may or may not be the original buffer sent to
+the :class:`.Context` object, as various filtering/caching
+scenarios may "push" a new buffer onto the context's underlying
+buffer stack. For this reason, just stick with
+``context.write()`` and content will always go to the topmost
+buffer.
+
+.. _context_vars:
+
+Context Variables
+-----------------
+
+When your template is compiled into a Python module, the body
+content is enclosed within a Python function called
+``render_body``. Other top-level defs defined in the template are
+defined within their own function bodies which are named after
+the def's name with the prefix ``render_`` (i.e. ``render_mydef``).
+One of the first things that happens within these functions is
+that all variable names that are referenced within the function
+which are not defined in some other way (i.e. such as via
+assignment, module level imports, etc.) are pulled from the
+:class:`.Context` object's dictionary of variables. This is how you're
+able to freely reference variable names in a template which
+automatically correspond to what was passed into the current
+:class:`.Context`.
+
+* **What happens if I reference a variable name that is not in
+  the current context?** - The value you get back is a special
+  value called ``UNDEFINED``, or if the ``strict_undefined=True`` flag
+  is used a ``NameError`` is raised. ``UNDEFINED`` is just a simple global
+  variable with the class :class:`mako.runtime.Undefined`. The
+  ``UNDEFINED`` object throws an error when you call ``str()`` on
+  it, which is what happens if you try to use it in an
+  expression.
+* **UNDEFINED makes it hard for me to find what name is missing** - An alternative
+  is to specify the option ``strict_undefined=True``
+  to the :class:`.Template` or :class:`.TemplateLookup`.  This will cause
+  any non-present variables to raise an immediate ``NameError``
+  which includes the name of the variable in its message
+  when :meth:`~.Template.render` is called -- ``UNDEFINED`` is not used.
+
+  .. versionadded:: 0.3.6
+
+* **Why not just return None?** Using ``UNDEFINED``, or
+  raising a ``NameError`` is more
+  explicit and allows differentiation between a value of ``None``
+  that was explicitly passed to the :class:`.Context` and a value that
+  wasn't present at all.
+* **Why raise an exception when you call str() on it ? Why not
+  just return a blank string?** - Mako tries to stick to the
+  Python philosophy of "explicit is better than implicit". In
+  this case, it's decided that the template author should be made
+  to specifically handle a missing value rather than
+  experiencing what may be a silent failure. Since ``UNDEFINED``
+  is a singleton object just like Python's ``True`` or ``False``,
+  you can use the ``is`` operator to check for it:
+
+  .. sourcecode:: mako
+
+        % if someval is UNDEFINED:
+            someval is: no value
+        % else:
+            someval is: ${someval}
+        % endif
+
+Another facet of the :class:`.Context` is that its dictionary of
+variables is **immutable**. Whatever is set when
+:meth:`~.Template.render` is called is what stays. Of course, since
+its Python, you can hack around this and change values in the
+context's internal dictionary, but this will probably will not
+work as well as you'd think. The reason for this is that Mako in
+many cases creates copies of the :class:`.Context` object, which
+get sent to various elements of the template and inheriting
+templates used in an execution. So changing the value in your
+local :class:`.Context` will not necessarily make that value
+available in other parts of the template's execution. Examples
+of where Mako creates copies of the :class:`.Context` include
+within top-level def calls from the main body of the template
+(the context is used to propagate locally assigned variables
+into the scope of defs; since in the template's body they appear
+as inlined functions, Mako tries to make them act that way), and
+within an inheritance chain (each template in an inheritance
+chain has a different notion of ``parent`` and ``next``, which
+are all stored in unique :class:`.Context` instances).
+
+* **So what if I want to set values that are global to everyone
+  within a template request?** - All you have to do is provide a
+  dictionary to your :class:`.Context` when the template first
+  runs, and everyone can just get/set variables from that. Lets
+  say its called ``attributes``.
+
+  Running the template looks like:
+
+  .. sourcecode:: python
+
+      output = template.render(attributes={})
+
+  Within a template, just reference the dictionary:
+
+  .. sourcecode:: mako
+
+      <%
+          attributes['foo'] = 'bar'
+      %>
+      'foo' attribute is: ${attributes['foo']}
+
+* **Why can't "attributes" be a built-in feature of the
+  Context?** - This is an area where Mako is trying to make as
+  few decisions about your application as it possibly can.
+  Perhaps you don't want your templates to use this technique of
+  assigning and sharing data, or perhaps you have a different
+  notion of the names and kinds of data structures that should
+  be passed around. Once again Mako would rather ask the user to
+  be explicit.
+
+Context Methods and Accessors
+-----------------------------
+
+Significant members of :class:`.Context` include:
+
+* ``context[key]`` / ``context.get(key, default=None)`` -
+  dictionary-like accessors for the context. Normally, any
+  variable you use in your template is automatically pulled from
+  the context if it isn't defined somewhere already. Use the
+  dictionary accessor and/or ``get`` method when you want a
+  variable that *is* already defined somewhere else, such as in
+  the local arguments sent to a ``%def`` call. If a key is not
+  present, like a dictionary it raises ``KeyError``.
+* ``keys()`` - all the names defined within this context.
+* ``kwargs`` - this returns a **copy** of the context's
+  dictionary of variables. This is useful when you want to
+  propagate the variables in the current context to a function
+  as keyword arguments, i.e.:
+
+  .. sourcecode:: mako
+
+        ${next.body(**context.kwargs)}
+
+* ``write(text)`` - write some text to the current output
+  stream.
+* ``lookup`` - returns the :class:`.TemplateLookup` instance that is
+  used for all file-lookups within the current execution (even
+  though individual :class:`.Template` instances can conceivably have
+  different instances of a :class:`.TemplateLookup`, only the
+  :class:`.TemplateLookup` of the originally-called :class:`.Template` gets
+  used in a particular execution).
+
+.. _loop_context:
+
+The Loop Context
+================
+
+Within ``% for`` blocks, the :ref:`reserved name<reserved_names>` ``loop``
+is available.  ``loop`` tracks the progress of
+the ``for`` loop and makes it easy to use the iteration state to control
+template behavior:
+
+.. sourcecode:: mako
+
+    <ul>
+    % for a in ("one", "two", "three"):
+        <li>Item ${loop.index}: ${a}</li>
+    % endfor
+    </ul>
+
+.. versionadded:: 0.7
+
+Iterations
+----------
+
+Regardless of the type of iterable you're looping over, ``loop`` always tracks
+the 0-indexed iteration count (available at ``loop.index``), its parity
+(through the ``loop.even`` and ``loop.odd`` bools), and ``loop.first``, a bool
+indicating whether the loop is on its first iteration.  If your iterable
+provides a ``__len__`` method, ``loop`` also provides access to
+a count of iterations remaining at ``loop.reverse_index`` and ``loop.last``,
+a bool indicating whether the loop is on its last iteration; accessing these
+without ``__len__`` will raise a ``TypeError``.
+
+Cycling
+-------
+
+Cycling is available regardless of whether the iterable you're using provides
+a ``__len__`` method.  Prior to Mako 0.7, you might have generated a simple
+zebra striped list using ``enumerate``:
+
+.. sourcecode:: mako
+
+    <ul>
+    % for i, item in enumerate(('spam', 'ham', 'eggs')):
+      <li class="${'odd' if i % 2 else 'even'}">${item}</li>
+    % endfor
+    </ul>
+
+With ``loop.cycle``, you get the same results with cleaner code and less prep work:
+
+.. sourcecode:: mako
+
+    <ul>
+    % for item in ('spam', 'ham', 'eggs'):
+      <li class="${loop.cycle('even', 'odd')}">${item}</li>
+    % endfor
+    </ul>
+
+Both approaches produce output like the following:
+
+.. sourcecode:: html
+
+    <ul>
+      <li class="even">spam</li>
+      <li class="odd">ham</li>
+      <li class="even">eggs</li>
+    </ul>
+
+Parent Loops
+------------
+
+Loop contexts can also be transparently nested, and the Mako runtime will do
+the right thing and manage the scope for you.  You can access the parent loop
+context through ``loop.parent``.
+
+This allows you to reach all the way back up through the loop stack by
+chaining ``parent`` attribute accesses, i.e. ``loop.parent.parent....`` as
+long as the stack depth isn't exceeded.  For example, you can use the parent
+loop to make a checkered table:
+
+.. sourcecode:: mako
+
+    <table>
+    % for consonant in 'pbj':
+      <tr>
+      % for vowel in 'iou':
+        <td class="${'black' if (loop.parent.even == loop.even) else 'red'}">
+          ${consonant + vowel}t
+        </td>
+      % endfor
+      </tr>
+    % endfor
+    </table>
+
+.. sourcecode:: html
+
+    <table>
+      <tr>
+        <td class="black">
+          pit
+        </td>
+        <td class="red">
+          pot
+        </td>
+        <td class="black">
+          put
+        </td>
+      </tr>
+      <tr>
+        <td class="red">
+          bit
+        </td>
+        <td class="black">
+          bot
+        </td>
+        <td class="red">
+          but
+        </td>
+      </tr>
+      <tr>
+        <td class="black">
+          jit
+        </td>
+        <td class="red">
+          jot
+        </td>
+        <td class="black">
+          jut
+        </td>
+      </tr>
+    </table>
+
+.. _migrating_loop:
+
+Migrating Legacy Templates that Use the Word "loop"
+---------------------------------------------------
+
+.. versionchanged:: 0.7
+   The ``loop`` name is now :ref:`reserved <reserved_names>` in Mako,
+   which means a template that refers to a variable named ``loop``
+   won't function correctly when used in Mako 0.7.
+
+To ease the transition for such systems, the feature can be disabled across the board for
+all templates, then re-enabled on a per-template basis for those templates which wish
+to make use of the new system.
+
+First, the ``enable_loop=False`` flag is passed to either the :class:`.TemplateLookup`
+or :class:`.Template` object in use:
+
+.. sourcecode:: python
+
+    lookup = TemplateLookup(directories=['/docs'], enable_loop=False)
+
+or:
+
+.. sourcecode:: python
+
+    template = Template("some template", enable_loop=False)
+
+An individual template can make usage of the feature when ``enable_loop`` is set to
+``False`` by switching it back on within the ``<%page>`` tag:
+
+.. sourcecode:: mako
+
+    <%page enable_loop="True"/>
+
+    % for i in collection:
+        ${i} ${loop.index}
+    % endfor
+
+Using the above scheme, it's safe to pass the name ``loop`` to the :meth:`.Template.render`
+method as well as to freely make usage of a variable named ``loop`` within a template, provided
+the ``<%page>`` tag doesn't override it.  New templates that want to use the ``loop`` context
+can then set up ``<%page enable_loop="True"/>`` to use the new feature without affecting
+old templates.
+
+All the Built-in Names
+======================
+
+A one-stop shop for all the names Mako defines. Most of these
+names are instances of :class:`.Namespace`, which are described
+in the next section, :ref:`namespaces_toplevel`. Also, most of
+these names other than ``context``, ``UNDEFINED``, and ``loop`` are
+also present *within* the :class:`.Context` itself.   The names
+``context``, ``loop`` and ``UNDEFINED`` themselves can't be passed
+to the context and can't be substituted -- see the section :ref:`reserved_names`.
+
+* ``context`` - this is the :class:`.Context` object, introduced
+  at :ref:`context`.
+* ``local`` - the namespace of the current template, described
+  in :ref:`namespaces_builtin`.
+* ``self`` - the namespace of the topmost template in an
+  inheritance chain (if any, otherwise the same as ``local``),
+  mostly described in :ref:`inheritance_toplevel`.
+* ``parent`` - the namespace of the parent template in an
+  inheritance chain (otherwise undefined); see
+  :ref:`inheritance_toplevel`.
+* ``next`` - the namespace of the next template in an
+  inheritance chain (otherwise undefined); see
+  :ref:`inheritance_toplevel`.
+* ``caller`` - a "mini" namespace created when using the
+  ``<%call>`` tag to define a "def call with content"; described
+  in :ref:`defs_with_content`.
+* ``loop`` - this provides access to :class:`.LoopContext` objects when
+  they are requested within ``% for`` loops, introduced at :ref:`loop_context`.
+* ``capture`` - a function that calls a given def and captures
+  its resulting content into a string, which is returned. Usage
+  is described in :ref:`filtering_toplevel`.
+* ``UNDEFINED`` - a global singleton that is applied to all
+  otherwise uninitialized template variables that were not
+  located within the :class:`.Context` when rendering began,
+  unless the :class:`.Template` flag ``strict_undefined``
+  is set to ``True``. ``UNDEFINED`` is
+  an instance of :class:`.Undefined`, and raises an
+  exception when its ``__str__()`` method is called.
+* ``pageargs`` - this is a dictionary which is present in a
+  template which does not define any ``**kwargs`` section in its
+  ``<%page>`` tag. All keyword arguments sent to the ``body()``
+  function of a template (when used via namespaces) go here by
+  default unless otherwise defined as a page argument. If this
+  makes no sense, it shouldn't; read the section
+  :ref:`namespaces_body`.
+
+.. _reserved_names:
+
+Reserved Names
+--------------
+
+Mako has a few names that are considered to be "reserved" and can't be used
+as variable names.
+
+.. versionchanged:: 0.7
+   Mako raises an error if these words are found passed to the template
+   as context arguments, whereas in previous versions they'd be silently
+   ignored or lead to other error messages.
+
+* ``context`` - see :ref:`context`.
+* ``UNDEFINED`` - see :ref:`context_vars`.
+* ``loop`` - see :ref:`loop_context`.  Note this can be disabled for legacy templates
+  via the ``enable_loop=False`` argument; see :ref:`migrating_loop`.
+
+API Reference
+=============
+
+.. autoclass:: mako.runtime.Context
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.runtime.LoopContext
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.runtime.Undefined
+    :show-inheritance:
+
diff --git a/lib/Mako-0.7.3/doc/_sources/syntax.txt b/lib/Mako-0.7.3/doc/_sources/syntax.txt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_sources/syntax.txt
@@ -0,0 +1,469 @@
+.. _syntax_toplevel:
+
+======
+Syntax
+======
+
+A Mako template is parsed from a text stream containing any kind
+of content, XML, HTML, email text, etc. The template can further
+contain Mako-specific directives which represent variable and/or
+expression substitutions, control structures (i.e. conditionals
+and loops), server-side comments, full blocks of Python code, as
+well as various tags that offer additional functionality. All of
+these constructs compile into real Python code. This means that
+you can leverage the full power of Python in almost every aspect
+of a Mako template.
+
+Expression Substitution
+=======================
+
+The simplest expression is just a variable substitution. The
+syntax for this is the ``${}`` construct, which is inspired by
+Perl, Genshi, JSP EL, and others:
+
+.. sourcecode:: mako
+
+    this is x: ${x}
+
+Above, the string representation of ``x`` is applied to the
+template's output stream. If you're wondering where ``x`` comes
+from, it's usually from the :class:`.Context` supplied to the
+template's rendering function. If ``x`` was not supplied to the
+template and was not otherwise assigned locally, it evaluates to
+a special value ``UNDEFINED``. More on that later.
+
+The contents within the ``${}`` tag are evaluated by Python
+directly, so full expressions are OK:
+
+.. sourcecode:: mako
+
+    pythagorean theorem:  ${pow(x,2) + pow(y,2)}
+
+The results of the expression are evaluated into a string result
+in all cases before being rendered to the output stream, such as
+the above example where the expression produces a numeric
+result.
+
+Expression Escaping
+===================
+
+Mako includes a number of built-in escaping mechanisms,
+including HTML, URI and XML escaping, as well as a "trim"
+function. These escapes can be added to an expression
+substitution using the ``|`` operator:
+
+.. sourcecode:: mako
+
+    ${"this is some text" | u}
+
+The above expression applies URL escaping to the expression, and
+produces ``this+is+some+text``. The ``u`` name indicates URL
+escaping, whereas ``h`` represents HTML escaping, ``x``
+represents XML escaping, and ``trim`` applies a trim function.
+
+Read more about built-in filtering functions, including how to
+make your own filter functions, in :ref:`filtering_toplevel`.
+
+Control Structures
+==================
+
+A control structure refers to all those things that control the
+flow of a program -- conditionals (i.e. ``if``/``else``), loops (like
+``while`` and ``for``), as well as things like ``try``/``except``. In Mako,
+control structures are written using the ``%`` marker followed
+by a regular Python control expression, and are "closed" by
+using another ``%`` marker with the tag "``end<name>``", where
+"``<name>``" is the keyword of the expression:
+
+.. sourcecode:: mako
+
+    % if x==5:
+        this is some output
+    % endif
+
+The ``%`` can appear anywhere on the line as long as no text
+precedes it; indentation is not significant. The full range of
+Python "colon" expressions are allowed here, including
+``if``/``elif``/``else``, ``while``, ``for``, and even ``def``, although
+Mako has a built-in tag for defs which is more full-featured.
+
+.. sourcecode:: mako
+
+    % for a in ['one', 'two', 'three', 'four', 'five']:
+        % if a[0] == 't':
+        its two or three
+        % elif a[0] == 'f':
+        four/five
+        % else:
+        one
+        % endif
+    % endfor
+
+The ``%`` sign can also be "escaped", if you actually want to
+emit a percent sign as the first non whitespace character on a
+line, by escaping it as in ``%%``:
+
+.. sourcecode:: mako
+
+    %% some text
+
+        %% some more text
+
+The Loop Context
+----------------
+
+The **loop context** provides additional information about a loop
+while inside of a ``% for`` structure:
+
+.. sourcecode:: mako
+
+    <ul>
+    % for a in ("one", "two", "three"):
+        <li>Item ${loop.index}: ${a}</li>
+    % endfor
+    </ul>
+
+See :ref:`loop_context` for more information on this feature.
+
+.. versionadded:: 0.7
+
+Comments
+========
+
+Comments come in two varieties. The single line comment uses
+``##`` as the first non-space characters on a line:
+
+.. sourcecode:: mako
+
+    ## this is a comment.
+    ...text ...
+
+A multiline version exists using ``<%doc> ...text... </%doc>``:
+
+.. sourcecode:: mako
+
+    <%doc>
+        these are comments
+        more comments
+    </%doc>
+
+Newline Filters
+===============
+
+The backslash ("``\``") character, placed at the end of any
+line, will consume the newline character before continuing to
+the next line:
+
+.. sourcecode:: mako
+
+    here is a line that goes onto \
+    another line.
+
+The above text evaluates to:
+
+.. sourcecode:: text
+
+    here is a line that goes onto another line.
+
+Python Blocks
+=============
+
+Any arbitrary block of python can be dropped in using the ``<%
+%>`` tags:
+
+.. sourcecode:: mako
+
+    this is a template
+    <%
+        x = db.get_resource('foo')
+        y = [z.element for z in x if x.frobnizzle==5]
+    %>
+    % for elem in y:
+        element: ${elem}
+    % endfor
+
+Within ``<% %>``, you're writing a regular block of Python code.
+While the code can appear with an arbitrary level of preceding
+whitespace, it has to be consistently formatted with itself.
+Mako's compiler will adjust the block of Python to be consistent
+with the surrounding generated Python code.
+
+Module-level Blocks
+===================
+
+A variant on ``<% %>`` is the module-level code block, denoted
+by ``<%! %>``. Code within these tags is executed at the module
+level of the template, and not within the rendering function of
+the template. Therefore, this code does not have access to the
+template's context and is only executed when the template is
+loaded into memory (which can be only once per application, or
+more, depending on the runtime environment). Use the ``<%! %>``
+tags to declare your template's imports, as well as any
+pure-Python functions you might want to declare:
+
+.. sourcecode:: mako
+
+    <%!
+        import mylib
+        import re
+
+        def filter(text):
+            return re.sub(r'^@', '', text)
+    %>
+
+Any number of ``<%! %>`` blocks can be declared anywhere in a
+template; they will be rendered in the resulting module 
+in a single contiguous block above all render callables,
+in the order in which they appear in the source template.
+
+Tags
+====
+
+The rest of what Mako offers takes place in the form of tags.
+All tags use the same syntax, which is similar to an XML tag
+except that the first character of the tag name is a ``%``
+character. The tag is closed either by a contained slash
+character, or an explicit closing tag:
+
+.. sourcecode:: mako
+
+    <%include file="foo.txt"/>
+
+    <%def name="foo" buffered="True">
+        this is a def
+    </%def>
+
+All tags have a set of attributes which are defined for each
+tag. Some of these attributes are required. Also, many
+attributes support **evaluation**, meaning you can embed an
+expression (using ``${}``) inside the attribute text:
+
+.. sourcecode:: mako
+
+    <%include file="/foo/bar/${myfile}.txt"/>
+
+Whether or not an attribute accepts runtime evaluation depends
+on the type of tag and how that tag is compiled into the
+template. The best way to find out if you can stick an
+expression in is to try it! The lexer will tell you if it's not
+valid.
+
+Heres a quick summary of all the tags:
+
+``<%page>``
+-----------
+
+This tag defines general characteristics of the template,
+including caching arguments, and optional lists of arguments
+which the template expects when invoked.
+
+.. sourcecode:: mako
+
+    <%page args="x, y, z='default'"/>
+
+Or a page tag that defines caching characteristics:
+
+.. sourcecode:: mako
+
+    <%page cached="True" cache_type="memory"/>
+
+Currently, only one ``<%page>`` tag gets used per template, the
+rest get ignored. While this will be improved in a future
+release, for now make sure you have only one ``<%page>`` tag
+defined in your template, else you may not get the results you
+want. The details of what ``<%page>`` is used for are described
+further in :ref:`namespaces_body` as well as :ref:`caching_toplevel`.
+
+``<%include>``
+--------------
+
+A tag that is familiar from other template languages, ``%include``
+is a regular joe that just accepts a file argument and calls in
+the rendered result of that file:
+
+.. sourcecode:: mako
+
+    <%include file="header.html"/>
+
+        hello world
+
+    <%include file="footer.html"/>
+
+Include also accepts arguments which are available as ``<%page>`` arguments in the receiving template:
+
+.. sourcecode:: mako
+
+    <%include file="toolbar.html" args="current_section='members', username='ed'"/>
+
+``<%def>``
+----------
+
+The ``%def`` tag defines a Python function which contains a set
+of content, that can be called at some other point in the
+template. The basic idea is simple:
+
+.. sourcecode:: mako
+
+    <%def name="myfunc(x)">
+        this is myfunc, x is ${x}
+    </%def>
+
+    ${myfunc(7)}
+
+The ``%def`` tag is a lot more powerful than a plain Python ``def``, as
+the Mako compiler provides many extra services with ``%def`` that
+you wouldn't normally have, such as the ability to export defs
+as template "methods", automatic propagation of the current
+:class:`.Context`, buffering/filtering/caching flags, and def calls
+with content, which enable packages of defs to be sent as
+arguments to other def calls (not as hard as it sounds). Get the
+full deal on what ``%def`` can do in :ref:`defs_toplevel`.
+
+``<%block>``
+------------
+
+``%block`` is a tag that is close to a ``%def``,
+except executes itself immediately in its base-most scope,
+and can also be anonymous (i.e. with no name):
+
+.. sourcecode:: mako
+
+    <%block filter="h">
+        some <html> stuff.
+    </%block>
+
+Inspired by Jinja2 blocks, named blocks offer a syntactically pleasing way
+to do inheritance:
+
+.. sourcecode:: mako
+
+    <html>
+        <body>
+        <%block name="header">
+            <h2><%block name="title"/></h2>
+        </%block>
+        ${self.body()}
+        </body>
+    </html>
+
+Blocks are introduced in :ref:`blocks` and further described in :ref:`inheritance_toplevel`.
+
+.. versionadded:: 0.4.1
+
+``<%namespace>``
+----------------
+
+``%namespace`` is Mako's equivalent of Python's ``import``
+statement. It allows access to all the rendering functions and
+metadata of other template files, plain Python modules, as well
+as locally defined "packages" of functions.
+
+.. sourcecode:: mako
+
+    <%namespace file="functions.html" import="*"/>
+
+The underlying object generated by ``%namespace``, an instance of
+:class:`.mako.runtime.Namespace`, is a central construct used in
+templates to reference template-specific information such as the
+current URI, inheritance structures, and other things that are
+not as hard as they sound right here. Namespaces are described
+in :ref:`namespaces_toplevel`.
+
+``<%inherit>``
+--------------
+
+Inherit allows templates to arrange themselves in **inheritance
+chains**. This is a concept familiar in many other template
+languages.
+
+.. sourcecode:: mako
+
+    <%inherit file="base.html"/>
+
+When using the ``%inherit`` tag, control is passed to the topmost
+inherited template first, which then decides how to handle
+calling areas of content from its inheriting templates. Mako
+offers a lot of flexibility in this area, including dynamic
+inheritance, content wrapping, and polymorphic method calls.
+Check it out in :ref:`inheritance_toplevel`.
+
+``<%``\ nsname\ ``:``\ defname\ ``>``
+-------------------------------------
+
+Any user-defined "tag" can be created against
+a namespace by using a tag with a name of the form
+``<%<namespacename>:<defname>>``. The closed and open formats of such a
+tag are equivalent to an inline expression and the ``<%call>``
+tag, respectively.
+
+.. sourcecode:: mako
+
+    <%mynamespace:somedef param="some value">
+        this is the body
+    </%mynamespace:somedef>
+
+To create custom tags which accept a body, see
+:ref:`defs_with_content`.
+
+.. versionadded:: 0.2.3
+
+``<%call>``
+-----------
+
+The call tag is the "classic" form of a user-defined tag, and is
+roughly equivalent to the ``<%namespacename:defname>`` syntax
+described above. This tag is also described in :ref:`defs_with_content`.
+
+``<%doc>``
+----------
+
+The ``%doc`` tag handles multiline comments:
+
+.. sourcecode:: mako
+
+    <%doc>
+        these are comments
+        more comments
+    </%doc>
+
+Also the ``##`` symbol as the first non-space characters on a line can be used for single line comments.
+
+``<%text>``
+-----------
+
+This tag suspends the Mako lexer's normal parsing of Mako
+template directives, and returns its entire body contents as
+plain text. It is used pretty much to write documentation about
+Mako:
+
+.. sourcecode:: mako
+
+    <%text filter="h">
+        heres some fake mako ${syntax}
+        <%def name="x()">${x}</%def>
+    </%text>
+
+Returning Early from a Template
+===============================
+
+Sometimes you want to stop processing a template or ``<%def>``
+method in the middle and just use the text you've accumulated so
+far. You can use a ``return`` statement inside a Python
+block to do that.
+
+.. sourcecode:: mako
+
+    % if not len(records):
+        No records found.
+        <% return %>
+    % endif
+
+Or perhaps:
+
+.. sourcecode:: mako
+
+    <%
+        if not len(records):
+            return
+    %>
+
diff --git a/lib/Mako-0.7.3/doc/_sources/unicode.txt b/lib/Mako-0.7.3/doc/_sources/unicode.txt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_sources/unicode.txt
@@ -0,0 +1,345 @@
+.. _unicode_toplevel:
+
+===================
+The Unicode Chapter
+===================
+
+The Python language supports two ways of representing what we
+know as "strings", i.e. series of characters. In Python 2, the
+two types are ``string`` and ``unicode``, and in Python 3 they are
+``bytes`` and ``string``. A key aspect of the Python 2 ``string`` and
+Python 3 ``bytes`` types are that they contain no information
+regarding what **encoding** the data is stored in. For this
+reason they were commonly referred to as **byte strings** on
+Python 2, and Python 3 makes this name more explicit. The
+origins of this come from Python's background of being developed
+before the Unicode standard was even available, back when
+strings were C-style strings and were just that, a series of
+bytes. Strings that had only values below 128 just happened to
+be **ASCII** strings and were printable on the console, whereas
+strings with values above 128 would produce all kinds of
+graphical characters and bells.
+
+Contrast the "byte-string" type with the "unicode/string" type.
+Objects of this latter type are created whenever you say something like
+``u"hello world"`` (or in Python 3, just ``"hello world"``). In this
+case, Python represents each character in the string internally
+using multiple bytes per character (something similar to
+UTF-16). What's important is that when using the
+``unicode``/``string`` type to store strings, Python knows the
+data's encoding; it's in its own internal format. Whereas when
+using the ``string``/``bytes`` type, it does not.
+
+When Python 2 attempts to treat a byte-string as a string, which
+means it's attempting to compare/parse its characters, to coerce
+it into another encoding, or to decode it to a unicode object,
+it has to guess what the encoding is. In this case, it will
+pretty much always guess the encoding as ``ascii``... and if the
+byte-string contains bytes above value 128, you'll get an error.
+Python 3 eliminates much of this confusion by just raising an
+error unconditionally if a byte-string is used in a
+character-aware context.
+
+There is one operation that Python *can* do with a non-ASCII
+byte-string, and it's a great source of confusion: it can dump the
+byte-string straight out to a stream or a file, with nary a care
+what the encoding is. To Python, this is pretty much like
+dumping any other kind of binary data (like an image) to a
+stream somewhere. In Python 2, it is common to see programs that
+embed all kinds of international characters and encodings into
+plain byte-strings (i.e. using ``"hello world"`` style literals)
+can fly right through their run, sending reams of strings out to
+wherever they are going, and the programmer, seeing the same
+output as was expressed in the input, is now under the illusion
+that his or her program is Unicode-compliant. In fact, their
+program has no unicode awareness whatsoever, and similarly has
+no ability to interact with libraries that *are* unicode aware.
+Python 3 makes this much less likely by defaulting to unicode as
+the storage format for strings.
+
+The "pass through encoded data" scheme is what template
+languages like Cheetah and earlier versions of Myghty do by
+default. Mako as of version 0.2 also supports this mode of
+operation when using Python 2, using the ``disable_unicode=True``
+flag. However, when using Mako in its default mode of
+unicode-aware, it requires explicitness when dealing with
+non-ASCII encodings. Additionally, if you ever need to handle
+unicode strings and other kinds of encoding conversions more
+intelligently, the usage of raw byte-strings quickly becomes a
+nightmare, since you are sending the Python interpreter
+collections of bytes for which it can make no intelligent
+decisions with regards to encoding. In Python 3 Mako only allows
+usage of native, unicode strings.
+
+In normal Mako operation, all parsed template constructs and
+output streams are handled internally as Python ``unicode``
+objects. It's only at the point of :meth:`~.Template.render` that this unicode
+stream may be rendered into whatever the desired output encoding
+is. The implication here is that the template developer must
+:ensure that :ref:`the encoding of all non-ASCII templates is explicit
+<set_template_file_encoding>` (still required in Python 3),
+that :ref:`all non-ASCII-encoded expressions are in one way or another
+converted to unicode <handling_non_ascii_expressions>`
+(not much of a burden in Python 3), and that :ref:`the output stream of the
+template is handled as a unicode stream being encoded to some
+encoding <defining_output_encoding>` (still required in Python 3).
+
+.. _set_template_file_encoding:
+
+Specifying the Encoding of a Template File
+==========================================
+
+This is the most basic encoding-related setting, and it is
+equivalent to Python's "magic encoding comment", as described in
+`pep-0263 <http://www.python.org/dev/peps/pep-0263/>`_. Any
+template that contains non-ASCII characters requires that this
+comment be present so that Mako can decode to unicode (and also
+make usage of Python's AST parsing services). Mako's lexer will
+use this encoding in order to convert the template source into a
+``unicode`` object before continuing its parsing:
+
+.. sourcecode:: mako
+
+    ## -*- coding: utf-8 -*-
+
+    Alors vous imaginez ma surprise, au lever du jour, quand 
+    une drôle de petite voix m’a réveillé. Elle disait:
+     « S’il vous plaît… dessine-moi un mouton! »
+
+For the picky, the regular expression used is derived from that
+of the above mentioned pep:
+
+.. sourcecode:: python
+
+    #.*coding[:=]\s*([-\w.]+).*\n
+
+The lexer will convert to unicode in all cases, so that if any
+characters exist in the template that are outside of the
+specified encoding (or the default of ``ascii``), the error will
+be immediate.
+
+As an alternative, the template encoding can be specified
+programmatically to either :class:`.Template` or :class:`.TemplateLookup` via
+the ``input_encoding`` parameter:
+
+.. sourcecode:: python
+
+    t = TemplateLookup(directories=['./'], input_encoding='utf-8')
+
+The above will assume all located templates specify ``utf-8``
+encoding, unless the template itself contains its own magic
+encoding comment, which takes precedence.
+
+.. _handling_non_ascii_expressions:
+
+Handling Expressions
+====================
+
+The next area that encoding comes into play is in expression
+constructs. By default, Mako's treatment of an expression like
+this:
+
+.. sourcecode:: mako
+
+    ${"hello world"}
+
+looks something like this:
+
+.. sourcecode:: python
+
+    context.write(unicode("hello world"))
+
+In Python 3, it's just:
+
+.. sourcecode:: python
+
+    context.write(str("hello world"))
+
+That is, **the output of all expressions is run through the
+``unicode`` built-in**. This is the default setting, and can be
+modified to expect various encodings. The ``unicode`` step serves
+both the purpose of rendering non-string expressions into
+strings (such as integers or objects which contain ``__str()__``
+methods), and to ensure that the final output stream is
+constructed as a unicode object. The main implication of this is
+that **any raw byte-strings that contain an encoding other than
+ASCII must first be decoded to a Python unicode object**. It
+means you can't say this in Python 2:
+
+.. sourcecode:: mako
+
+    ${"voix m’a réveillé."}  ## error in Python 2!
+
+You must instead say this:
+
+.. sourcecode:: mako
+
+    ${u"voix m’a réveillé."}  ## OK !
+
+Similarly, if you are reading data from a file that is streaming
+bytes, or returning data from some object that is returning a
+Python byte-string containing a non-ASCII encoding, you have to
+explicitly decode to unicode first, such as:
+
+.. sourcecode:: mako
+
+    ${call_my_object().decode('utf-8')}
+
+Note that filehandles acquired by ``open()`` in Python 3 default
+to returning "text", that is the decoding is done for you. See
+Python 3's documentation for the ``open()`` built-in for details on
+this.
+
+If you want a certain encoding applied to *all* expressions,
+override the ``unicode`` builtin with the ``decode`` built-in at the
+:class:`.Template` or :class:`.TemplateLookup` level:
+
+.. sourcecode:: python
+
+    t = Template(templatetext, default_filters=['decode.utf8'])
+
+Note that the built-in ``decode`` object is slower than the
+``unicode`` function, since unlike ``unicode`` it's not a Python
+built-in, and it also checks the type of the incoming data to
+determine if string conversion is needed first.
+
+The ``default_filters`` argument can be used to entirely customize
+the filtering process of expressions. This argument is described
+in :ref:`filtering_default_filters`.
+
+.. _defining_output_encoding:
+
+Defining Output Encoding
+========================
+
+Now that we have a template which produces a pure unicode output
+stream, all the hard work is done. We can take the output and do
+anything with it.
+
+As stated in the :doc:`"Usage" chapter <usage>`, both :class:`.Template` and
+:class:`.TemplateLookup` accept ``output_encoding`` and ``encoding_errors``
+parameters which can be used to encode the output in any Python
+supported codec:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+    from mako.lookup import TemplateLookup
+
+    mylookup = TemplateLookup(directories=['/docs'], output_encoding='utf-8', encoding_errors='replace')
+
+    mytemplate = mylookup.get_template("foo.txt")
+    print mytemplate.render()
+
+:meth:`~.Template.render` will return a ``bytes`` object in Python 3 if an output
+encoding is specified. By default it performs no encoding and
+returns a native string.
+
+:meth:`~.Template.render_unicode` will return the template output as a Python
+``unicode`` object (or ``string`` in Python 3):
+
+.. sourcecode:: python
+
+    print mytemplate.render_unicode()
+
+The above method disgards the output encoding keyword argument;
+you can encode yourself by saying:
+
+.. sourcecode:: python
+
+    print mytemplate.render_unicode().encode('utf-8', 'replace')
+
+Buffer Selection
+----------------
+
+Mako does play some games with the style of buffering used
+internally, to maximize performance. Since the buffer is by far
+the most heavily used object in a render operation, it's
+important!
+
+When calling :meth:`~.Template.render` on a template that does not specify any
+output encoding (i.e. it's ``ascii``), Python's ``cStringIO`` module,
+which cannot handle encoding of non-ASCII ``unicode`` objects
+(even though it can send raw byte-strings through), is used for
+buffering. Otherwise, a custom Mako class called
+``FastEncodingBuffer`` is used, which essentially is a super
+dumbed-down version of ``StringIO`` that gathers all strings into
+a list and uses ``u''.join(elements)`` to produce the final output
+-- it's markedly faster than ``StringIO``.
+
+.. _unicode_disabled:
+
+Saying to Heck with It: Disabling the Usage of Unicode Entirely
+===============================================================
+
+Some segments of Mako's userbase choose to make no usage of
+Unicode whatsoever, and instead would prefer the "pass through"
+approach; all string expressions in their templates return
+encoded byte-strings, and they would like these strings to pass
+right through. The only advantage to this approach is that
+templates need not use ``u""`` for literal strings; there's an
+arguable speed improvement as well since raw byte-strings
+generally perform slightly faster than unicode objects in
+Python. For these users, assuming they're sticking with Python
+2, they can hit the ``disable_unicode=True`` flag as so:
+
+.. sourcecode:: python
+
+    # -*- encoding:utf-8 -*-
+    from mako.template import Template
+
+    t = Template("drôle de petite voix m’a réveillé.", disable_unicode=True, input_encoding='utf-8')
+    print t.code
+
+The ``disable_unicode`` mode is strictly a Python 2 thing. It is
+not supported at all in Python 3.
+
+The generated module source code will contain elements like
+these:
+
+.. sourcecode:: python
+
+    # -*- encoding:utf-8 -*-
+    #  ...more generated code ...
+
+    def render_body(context,**pageargs):
+        context.caller_stack.push_frame()
+        try:
+            __M_locals = dict(pageargs=pageargs)
+            # SOURCE LINE 1
+            context.write('dr\xc3\xb4le de petite voix m\xe2\x80\x99a r\xc3\xa9veill\xc3\xa9.')
+            return ''
+        finally:
+            context.caller_stack.pop_frame()
+
+Where above that the string literal used within :meth:`.Context.write`
+is a regular byte-string.
+
+When ``disable_unicode=True`` is turned on, the ``default_filters``
+argument which normally defaults to ``["unicode"]`` now defaults
+to ``["str"]`` instead. Setting ``default_filters`` to the empty list
+``[]`` can remove the overhead of the ``str`` call. Also, in this
+mode you **cannot** safely call :meth:`~.Template.render_unicode` -- you'll get
+unicode/decode errors.
+
+The ``h`` filter (HTML escape) uses a less performant pure Python
+escape function in non-unicode mode. This because
+MarkupSafe only supports Python unicode objects for non-ASCII
+strings.
+
+.. versionchanged:: 0.3.4
+   In prior versions, it used ``cgi.escape()``, which has been replaced
+   with a function that also escapes single quotes.
+
+Rules for using ``disable_unicode=True``
+----------------------------------------
+
+* Don't use this mode unless you really, really want to and you
+  absolutely understand what you're doing.
+* Don't use this option just because you don't want to learn to
+  use Unicode properly; we aren't supporting user issues in this
+  mode of operation. We will however offer generous help for the
+  vast majority of users who stick to the Unicode program.
+* Python 3 is unicode by default, and the flag is not available
+  when running on Python 3.
+
diff --git a/lib/Mako-0.7.3/doc/_sources/usage.txt b/lib/Mako-0.7.3/doc/_sources/usage.txt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_sources/usage.txt
@@ -0,0 +1,520 @@
+.. _usage_toplevel:
+
+=====
+Usage
+=====
+
+Basic Usage
+===========
+
+This section describes the Python API for Mako templates. If you
+are using Mako within a web framework such as Pylons, the work
+of integrating Mako's API is already done for you, in which case
+you can skip to the next section, :ref:`syntax_toplevel`.
+
+The most basic way to create a template and render it is through
+the :class:`.Template` class:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+
+    mytemplate = Template("hello world!")
+    print mytemplate.render()
+
+Above, the text argument to :class:`.Template` is **compiled** into a
+Python module representation. This module contains a function
+called ``render_body()``, which produces the output of the
+template. When ``mytemplate.render()`` is called, Mako sets up a
+runtime environment for the template and calls the
+``render_body()`` function, capturing the output into a buffer and
+returning its string contents.
+
+
+The code inside the ``render_body()`` function has access to a
+namespace of variables. You can specify these variables by
+sending them as additional keyword arguments to the :meth:`~.Template.render`
+method:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+
+    mytemplate = Template("hello, ${name}!")
+    print mytemplate.render(name="jack")
+
+The :meth:`~.Template.render` method calls upon Mako to create a
+:class:`.Context` object, which stores all the variable names accessible
+to the template and also stores a buffer used to capture output.
+You can create this :class:`.Context` yourself and have the template
+render with it, using the :meth:`~.Template.render_context` method:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+    from mako.runtime import Context
+    from StringIO import StringIO
+
+    mytemplate = Template("hello, ${name}!")
+    buf = StringIO()
+    ctx = Context(buf, name="jack")
+    mytemplate.render_context(ctx)
+    print buf.getvalue()
+
+Using File-Based Templates
+==========================
+
+A :class:`.Template` can also load its template source code from a file,
+using the ``filename`` keyword argument:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+
+    mytemplate = Template(filename='/docs/mytmpl.txt')
+    print mytemplate.render()
+
+For improved performance, a :class:`.Template` which is loaded from a
+file can also cache the source code to its generated module on
+the filesystem as a regular Python module file (i.e. a ``.py``
+file). To do this, just add the ``module_directory`` argument to
+the template:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+
+    mytemplate = Template(filename='/docs/mytmpl.txt', module_directory='/tmp/mako_modules')
+    print mytemplate.render()
+
+When the above code is rendered, a file
+``/tmp/mako_modules/docs/mytmpl.txt.py`` is created containing the
+source code for the module. The next time a :class:`.Template` with the
+same arguments is created, this module file will be
+automatically re-used.
+
+.. _usage_templatelookup:
+
+Using ``TemplateLookup``
+========================
+
+All of the examples thus far have dealt with the usage of a
+single :class:`.Template` object. If the code within those templates
+tries to locate another template resource, it will need some way
+to find them, using simple URI strings. For this need, the
+resolution of other templates from within a template is
+accomplished by the :class:`.TemplateLookup` class. This class is
+constructed given a list of directories in which to search for
+templates, as well as keyword arguments that will be passed to
+the :class:`.Template` objects it creates:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+    from mako.lookup import TemplateLookup
+
+    mylookup = TemplateLookup(directories=['/docs'])
+    mytemplate = Template("""<%include file="header.txt"/> hello world!""", lookup=mylookup)
+
+Above, we created a textual template which includes the file
+``"header.txt"``. In order for it to have somewhere to look for
+``"header.txt"``, we passed a :class:`.TemplateLookup` object to it, which
+will search in the directory ``/docs`` for the file ``"header.txt"``.
+
+Usually, an application will store most or all of its templates
+as text files on the filesystem. So far, all of our examples
+have been a little bit contrived in order to illustrate the
+basic concepts. But a real application would get most or all of
+its templates directly from the :class:`.TemplateLookup`, using the
+aptly named :meth:`~.TemplateLookup.get_template` method, which accepts the URI of the
+desired template:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+    from mako.lookup import TemplateLookup
+
+    mylookup = TemplateLookup(directories=['/docs'], module_directory='/tmp/mako_modules')
+
+    def serve_template(templatename, **kwargs):
+        mytemplate = mylookup.get_template(templatename)
+        print mytemplate.render(**kwargs)
+
+In the example above, we create a :class:`.TemplateLookup` which will
+look for templates in the ``/docs`` directory, and will store
+generated module files in the ``/tmp/mako_modules`` directory. The
+lookup locates templates by appending the given URI to each of
+its search directories; so if you gave it a URI of
+``/etc/beans/info.txt``, it would search for the file
+``/docs/etc/beans/info.txt``, else raise a :class:`.TopLevelNotFound`
+exception, which is a custom Mako exception.
+
+When the lookup locates templates, it will also assign a ``uri``
+property to the :class:`.Template` which is the URI passed to the
+:meth:`~.TemplateLookup.get_template()` call. :class:`.Template` uses this URI to calculate the
+name of its module file. So in the above example, a
+``templatename`` argument of ``/etc/beans/info.txt`` will create a
+module file ``/tmp/mako_modules/etc/beans/info.txt.py``.
+
+Setting the Collection Size
+---------------------------
+
+The :class:`.TemplateLookup` also serves the important need of caching a
+fixed set of templates in memory at a given time, so that
+successive URI lookups do not result in full template
+compilations and/or module reloads on each request. By default,
+the :class:`.TemplateLookup` size is unbounded. You can specify a fixed
+size using the ``collection_size`` argument:
+
+.. sourcecode:: python
+
+    mylookup = TemplateLookup(directories=['/docs'],
+                    module_directory='/tmp/mako_modules', collection_size=500)
+
+The above lookup will continue to load templates into memory
+until it reaches a count of around 500. At that point, it will
+clean out a certain percentage of templates using a least
+recently used scheme.
+
+Setting Filesystem Checks
+-------------------------
+
+Another important flag on :class:`.TemplateLookup` is
+``filesystem_checks``. This defaults to ``True``, and says that each
+time a template is returned by the :meth:`~.TemplateLookup.get_template()` method, the
+revision time of the original template file is checked against
+the last time the template was loaded, and if the file is newer
+will reload its contents and recompile the template. On a
+production system, setting ``filesystem_checks`` to ``False`` can
+afford a small to moderate performance increase (depending on
+the type of filesystem used).
+
+.. _usage_unicode:
+
+Using Unicode and Encoding
+==========================
+
+Both :class:`.Template` and :class:`.TemplateLookup` accept ``output_encoding``
+and ``encoding_errors`` parameters which can be used to encode the
+output in any Python supported codec:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+    from mako.lookup import TemplateLookup
+
+    mylookup = TemplateLookup(directories=['/docs'], output_encoding='utf-8', encoding_errors='replace')
+
+    mytemplate = mylookup.get_template("foo.txt")
+    print mytemplate.render()
+
+When using Python 3, the :meth:`~.Template.render` method will return a ``bytes``
+object, **if** ``output_encoding`` is set. Otherwise it returns a
+``string``.
+
+Additionally, the :meth:`~.Template.render_unicode()` method exists which will
+return the template output as a Python ``unicode`` object, or in
+Python 3 a ``string``:
+
+.. sourcecode:: python
+
+    print mytemplate.render_unicode()
+
+The above method disregards the output encoding keyword
+argument; you can encode yourself by saying:
+
+.. sourcecode:: python
+
+    print mytemplate.render_unicode().encode('utf-8', 'replace')
+
+Note that Mako's ability to return data in any encoding and/or
+``unicode`` implies that the underlying output stream of the
+template is a Python unicode object. This behavior is described
+fully in :ref:`unicode_toplevel`.
+
+.. _handling_exceptions:
+
+Handling Exceptions
+===================
+
+Template exceptions can occur in two distinct places. One is
+when you **lookup, parse and compile** the template, the other
+is when you **run** the template. Within the running of a
+template, exceptions are thrown normally from whatever Python
+code originated the issue. Mako has its own set of exception
+classes which mostly apply to the lookup and lexer/compiler
+stages of template construction. Mako provides some library
+routines that can be used to help provide Mako-specific
+information about any exception's stack trace, as well as
+formatting the exception within textual or HTML format. In all
+cases, the main value of these handlers is that of converting
+Python filenames, line numbers, and code samples into Mako
+template filenames, line numbers, and code samples. All lines
+within a stack trace which correspond to a Mako template module
+will be converted to be against the originating template file.
+
+To format exception traces, the :func:`.text_error_template` and
+:func:`.html_error_template` functions are provided. They make usage of
+``sys.exc_info()`` to get at the most recently thrown exception.
+Usage of these handlers usually looks like:
+
+.. sourcecode:: python
+
+    from mako import exceptions
+
+    try:
+        template = lookup.get_template(uri)
+        print template.render()
+    except:
+        print exceptions.text_error_template().render()
+
+Or for the HTML render function:
+
+.. sourcecode:: python
+
+    from mako import exceptions
+
+    try:
+        template = lookup.get_template(uri)
+        print template.render()
+    except:
+        print exceptions.html_error_template().render()
+
+The :func:`.html_error_template` template accepts two options:
+specifying ``full=False`` causes only a section of an HTML
+document to be rendered. Specifying ``css=False`` will disable the
+default stylesheet from being rendered.
+
+E.g.:
+
+.. sourcecode:: python
+
+    print exceptions.html_error_template().render(full=False)
+
+The HTML render function is also available built-in to
+:class:`.Template` using the ``format_exceptions`` flag. In this case, any
+exceptions raised within the **render** stage of the template
+will result in the output being substituted with the output of
+:func:`.html_error_template`:
+
+.. sourcecode:: python
+
+    template = Template(filename="/foo/bar", format_exceptions=True)
+    print template.render()
+
+Note that the compile stage of the above template occurs when
+you construct the :class:`.Template` itself, and no output stream is
+defined. Therefore exceptions which occur within the
+lookup/parse/compile stage will not be handled and will
+propagate normally. While the pre-render traceback usually will
+not include any Mako-specific lines anyway, it will mean that
+exceptions which occur previous to rendering and those which
+occur within rendering will be handled differently... so the
+``try``/``except`` patterns described previously are probably of more
+general use.
+
+The underlying object used by the error template functions is
+the :class:`.RichTraceback` object. This object can also be used
+directly to provide custom error views. Here's an example usage
+which describes its general API:
+
+.. sourcecode:: python
+
+    from mako.exceptions import RichTraceback
+
+    try:
+        template = lookup.get_template(uri)
+        print template.render()
+    except:
+        traceback = RichTraceback()
+        for (filename, lineno, function, line) in traceback.traceback:
+            print "File %s, line %s, in %s" % (filename, lineno, function)
+            print line, "\n"
+        print "%s: %s" % (str(traceback.error.__class__.__name__), traceback.error)
+
+Common Framework Integrations
+=============================
+
+The Mako distribution includes a little bit of helper code for
+the purpose of using Mako in some popular web framework
+scenarios. This is a brief description of what's included.
+
+WSGI
+----
+
+A sample WSGI application is included in the distribution in the
+file ``examples/wsgi/run_wsgi.py``. This runner is set up to pull
+files from a `templates` as well as an `htdocs` directory and
+includes a rudimental two-file layout. The WSGI runner acts as a
+fully functional standalone web server, using ``wsgiutils`` to run
+itself, and propagates GET and POST arguments from the request
+into the :class:`.Context`, can serve images, CSS files and other kinds
+of files, and also displays errors using Mako's included
+exception-handling utilities.
+
+Pygments
+--------
+
+A `Pygments <http://pygments.pocoo.org>`_-compatible syntax
+highlighting module is included under :mod:`mako.ext.pygmentplugin`.
+This module is used in the generation of Mako documentation and
+also contains various `setuptools` entry points under the heading
+``pygments.lexers``, including ``mako``, ``html+mako``, ``xml+mako``
+(see the ``setup.py`` file for all the entry points).
+
+Babel
+-----
+
+Mako provides support for extracting `gettext` messages from
+templates via a `Babel`_ extractor
+entry point under ``mako.ext.babelplugin``.
+
+`Gettext` messages are extracted from all Python code sections,
+including those of control lines and expressions embedded
+in tags.
+
+`Translator
+comments <http://babel.edgewall.org/wiki/Documentation/messages.html#comments-tags-and-translator-comments-explanation>`_
+may also be extracted from Mako templates when a comment tag is
+specified to `Babel`_ (such as with
+the ``-c`` option).
+
+For example, a project ``"myproj"`` contains the following Mako
+template at ``myproj/myproj/templates/name.html``:
+
+.. sourcecode:: mako
+
+    <div id="name">
+      Name:
+      ## TRANSLATORS: This is a proper name. See the gettext
+      ## manual, section Names.
+      ${_('Francois Pinard')}
+    </div>
+
+To extract gettext messages from this template the project needs
+a Mako section in its `Babel Extraction Method Mapping
+file <http://babel.edgewall.org/wiki/Documentation/messages.html#extraction-method-mapping-and-configuration>`_
+(typically located at ``myproj/babel.cfg``):
+
+.. sourcecode:: cfg
+
+    # Extraction from Python source files
+
+    [python: myproj/**.py]
+
+    # Extraction from Mako templates
+
+    [mako: myproj/templates/**.html]
+    input_encoding = utf-8
+
+The Mako extractor supports an optional ``input_encoding``
+parameter specifying the encoding of the templates (identical to
+:class:`.Template`/:class:`.TemplateLookup`'s ``input_encoding`` parameter).
+
+Invoking `Babel`_'s extractor at the
+command line in the project's root directory:
+
+.. sourcecode:: sh
+
+    myproj$ pybabel extract -F babel.cfg -c "TRANSLATORS:" .
+
+will output a `gettext` catalog to `stdout` including the following:
+
+.. sourcecode:: pot
+
+    #. TRANSLATORS: This is a proper name. See the gettext
+    #. manual, section Names.
+    #: myproj/templates/name.html:5
+    msgid "Francois Pinard"
+    msgstr ""
+
+This is only a basic example:
+`Babel`_ can be invoked from ``setup.py``
+and its command line options specified in the accompanying
+``setup.cfg`` via `Babel Distutils/Setuptools
+Integration <http://babel.edgewall.org/wiki/Documentation/setup.html>`_.
+
+Comments must immediately precede a `gettext` message to be
+extracted. In the following case the ``TRANSLATORS:`` comment would
+not have been extracted:
+
+.. sourcecode:: mako
+
+    <div id="name">
+      ## TRANSLATORS: This is a proper name. See the gettext
+      ## manual, section Names.
+      Name: ${_('Francois Pinard')}
+    </div>
+
+See the `Babel User
+Guide <http://babel.edgewall.org/wiki/Documentation/index.html>`_
+for more information.
+
+.. _babel: http://babel.edgewall.org/
+
+
+API Reference
+=============
+
+.. autoclass:: mako.template.Template
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.template.DefTemplate
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.lookup.TemplateCollection
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.lookup.TemplateLookup
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.exceptions.RichTraceback
+    :show-inheritance:
+
+    .. py:attribute:: error
+
+       the exception instance.
+
+    .. py:attribute:: message
+
+       the exception error message as unicode.
+
+    .. py:attribute:: source
+
+       source code of the file where the error occurred.
+       If the error occurred within a compiled template,
+       this is the template source.
+
+    .. py:attribute:: lineno
+
+       line number where the error occurred.  If the error
+       occurred within a compiled template, the line number
+       is adjusted to that of the template source.
+
+    .. py:attribute:: records
+
+       a list of 8-tuples containing the original
+       python traceback elements, plus the
+       filename, line number, source line, and full template source
+       for the traceline mapped back to its originating source
+       template, if any for that traceline (else the fields are ``None``).
+
+    .. py:attribute:: reverse_records
+
+       the list of records in reverse
+       traceback -- a list of 4-tuples, in the same format as a regular
+       python traceback, with template-corresponding
+       traceback records replacing the originals.
+
+    .. py:attribute:: reverse_traceback
+
+       the traceback list in reverse.
+
+.. autofunction:: mako.exceptions.html_error_template
+
+.. autofunction:: mako.exceptions.text_error_template
+
diff --git a/lib/Mako-0.7.3/doc/_static/basic.css b/lib/Mako-0.7.3/doc/_static/basic.css
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_static/basic.css
@@ -0,0 +1,540 @@
+/*
+ * basic.css
+ * ~~~~~~~~~
+ *
+ * Sphinx stylesheet -- basic theme.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/* -- main layout ----------------------------------------------------------- */
+
+div.clearer {
+    clear: both;
+}
+
+/* -- relbar ---------------------------------------------------------------- */
+
+div.related {
+    width: 100%;
+    font-size: 90%;
+}
+
+div.related h3 {
+    display: none;
+}
+
+div.related ul {
+    margin: 0;
+    padding: 0 0 0 10px;
+    list-style: none;
+}
+
+div.related li {
+    display: inline;
+}
+
+div.related li.right {
+    float: right;
+    margin-right: 5px;
+}
+
+/* -- sidebar --------------------------------------------------------------- */
+
+div.sphinxsidebarwrapper {
+    padding: 10px 5px 0 10px;
+}
+
+div.sphinxsidebar {
+    float: left;
+    width: 230px;
+    margin-left: -100%;
+    font-size: 90%;
+}
+
+div.sphinxsidebar ul {
+    list-style: none;
+}
+
+div.sphinxsidebar ul ul,
+div.sphinxsidebar ul.want-points {
+    margin-left: 20px;
+    list-style: square;
+}
+
+div.sphinxsidebar ul ul {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+div.sphinxsidebar form {
+    margin-top: 10px;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #98dbcc;
+    font-family: sans-serif;
+    font-size: 1em;
+}
+
+div.sphinxsidebar #searchbox input[type="text"] {
+    width: 170px;
+}
+
+div.sphinxsidebar #searchbox input[type="submit"] {
+    width: 30px;
+}
+
+img {
+    border: 0;
+}
+
+/* -- search page ----------------------------------------------------------- */
+
+ul.search {
+    margin: 10px 0 0 20px;
+    padding: 0;
+}
+
+ul.search li {
+    padding: 5px 0 5px 20px;
+    background-image: url(file.png);
+    background-repeat: no-repeat;
+    background-position: 0 7px;
+}
+
+ul.search li a {
+    font-weight: bold;
+}
+
+ul.search li div.context {
+    color: #888;
+    margin: 2px 0 0 30px;
+    text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+    font-weight: bold;
+}
+
+/* -- index page ------------------------------------------------------------ */
+
+table.contentstable {
+    width: 90%;
+}
+
+table.contentstable p.biglink {
+    line-height: 150%;
+}
+
+a.biglink {
+    font-size: 1.3em;
+}
+
+span.linkdescr {
+    font-style: italic;
+    padding-top: 5px;
+    font-size: 90%;
+}
+
+/* -- general index --------------------------------------------------------- */
+
+table.indextable {
+    width: 100%;
+}
+
+table.indextable td {
+    text-align: left;
+    vertical-align: top;
+}
+
+table.indextable dl, table.indextable dd {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+table.indextable tr.pcap {
+    height: 10px;
+}
+
+table.indextable tr.cap {
+    margin-top: 10px;
+    background-color: #f2f2f2;
+}
+
+img.toggler {
+    margin-right: 3px;
+    margin-top: 3px;
+    cursor: pointer;
+}
+
+div.modindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+div.genindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+/* -- general body styles --------------------------------------------------- */
+
+a.headerlink {
+    visibility: hidden;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink {
+    visibility: visible;
+}
+
+div.body p.caption {
+    text-align: inherit;
+}
+
+div.body td {
+    text-align: left;
+}
+
+.field-list ul {
+    padding-left: 1em;
+}
+
+.first {
+    margin-top: 0 !important;
+}
+
+p.rubric {
+    margin-top: 30px;
+    font-weight: bold;
+}
+
+img.align-left, .figure.align-left, object.align-left {
+    clear: left;
+    float: left;
+    margin-right: 1em;
+}
+
+img.align-right, .figure.align-right, object.align-right {
+    clear: right;
+    float: right;
+    margin-left: 1em;
+}
+
+img.align-center, .figure.align-center, object.align-center {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+.align-left {
+    text-align: left;
+}
+
+.align-center {
+    text-align: center;
+}
+
+.align-right {
+    text-align: right;
+}
+
+/* -- sidebars -------------------------------------------------------------- */
+
+div.sidebar {
+    margin: 0 0 0.5em 1em;
+    border: 1px solid #ddb;
+    padding: 7px 7px 0 7px;
+    background-color: #ffe;
+    width: 40%;
+    float: right;
+}
+
+p.sidebar-title {
+    font-weight: bold;
+}
+
+/* -- topics ---------------------------------------------------------------- */
+
+div.topic {
+    border: 1px solid #ccc;
+    padding: 7px 7px 0 7px;
+    margin: 10px 0 10px 0;
+}
+
+p.topic-title {
+    font-size: 1.1em;
+    font-weight: bold;
+    margin-top: 10px;
+}
+
+/* -- admonitions ----------------------------------------------------------- */
+
+div.admonition {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    padding: 7px;
+}
+
+div.admonition dt {
+    font-weight: bold;
+}
+
+div.admonition dl {
+    margin-bottom: 0;
+}
+
+p.admonition-title {
+    margin: 0px 10px 5px 0px;
+    font-weight: bold;
+}
+
+div.body p.centered {
+    text-align: center;
+    margin-top: 25px;
+}
+
+/* -- tables ---------------------------------------------------------------- */
+
+table.docutils {
+    border: 0;
+    border-collapse: collapse;
+}
+
+table.docutils td, table.docutils th {
+    padding: 1px 8px 1px 5px;
+    border-top: 0;
+    border-left: 0;
+    border-right: 0;
+    border-bottom: 1px solid #aaa;
+}
+
+table.field-list td, table.field-list th {
+    border: 0 !important;
+}
+
+table.footnote td, table.footnote th {
+    border: 0 !important;
+}
+
+th {
+    text-align: left;
+    padding-right: 5px;
+}
+
+table.citation {
+    border-left: solid 1px gray;
+    margin-left: 1px;
+}
+
+table.citation td {
+    border-bottom: none;
+}
+
+/* -- other body styles ----------------------------------------------------- */
+
+ol.arabic {
+    list-style: decimal;
+}
+
+ol.loweralpha {
+    list-style: lower-alpha;
+}
+
+ol.upperalpha {
+    list-style: upper-alpha;
+}
+
+ol.lowerroman {
+    list-style: lower-roman;
+}
+
+ol.upperroman {
+    list-style: upper-roman;
+}
+
+dl {
+    margin-bottom: 15px;
+}
+
+dd p {
+    margin-top: 0px;
+}
+
+dd ul, dd table {
+    margin-bottom: 10px;
+}
+
+dd {
+    margin-top: 3px;
+    margin-bottom: 10px;
+    margin-left: 30px;
+}
+
+dt:target, .highlighted {
+    background-color: #fbe54e;
+}
+
+dl.glossary dt {
+    font-weight: bold;
+    font-size: 1.1em;
+}
+
+.field-list ul {
+    margin: 0;
+    padding-left: 1em;
+}
+
+.field-list p {
+    margin: 0;
+}
+
+.refcount {
+    color: #060;
+}
+
+.optional {
+    font-size: 1.3em;
+}
+
+.versionmodified {
+    font-style: italic;
+}
+
+.system-message {
+    background-color: #fda;
+    padding: 5px;
+    border: 3px solid red;
+}
+
+.footnote:target  {
+    background-color: #ffa;
+}
+
+.line-block {
+    display: block;
+    margin-top: 1em;
+    margin-bottom: 1em;
+}
+
+.line-block .line-block {
+    margin-top: 0;
+    margin-bottom: 0;
+    margin-left: 1.5em;
+}
+
+.guilabel, .menuselection {
+    font-family: sans-serif;
+}
+
+.accelerator {
+    text-decoration: underline;
+}
+
+.classifier {
+    font-style: oblique;
+}
+
+abbr, acronym {
+    border-bottom: dotted 1px;
+    cursor: help;
+}
+
+/* -- code displays --------------------------------------------------------- */
+
+pre {
+    overflow: auto;
+    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
+}
+
+td.linenos pre {
+    padding: 5px 0px;
+    border: 0;
+    background-color: transparent;
+    color: #aaa;
+}
+
+table.highlighttable {
+    margin-left: 0.5em;
+}
+
+table.highlighttable td {
+    padding: 0 0.5em 0 0.5em;
+}
+
+tt.descname {
+    background-color: transparent;
+    font-weight: bold;
+    font-size: 1.2em;
+}
+
+tt.descclassname {
+    background-color: transparent;
+}
+
+tt.xref, a tt {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
+    background-color: transparent;
+}
+
+.viewcode-link {
+    float: right;
+}
+
+.viewcode-back {
+    float: right;
+    font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+    margin: -1px -10px;
+    padding: 0 10px;
+}
+
+/* -- math display ---------------------------------------------------------- */
+
+img.math {
+    vertical-align: middle;
+}
+
+div.body div.math p {
+    text-align: center;
+}
+
+span.eqno {
+    float: right;
+}
+
+/* -- printout stylesheet --------------------------------------------------- */
+
+ at media print {
+    div.document,
+    div.documentwrapper,
+    div.bodywrapper {
+        margin: 0 !important;
+        width: 100%;
+    }
+
+    div.sphinxsidebar,
+    div.related,
+    div.footer,
+    #top-link {
+        display: none;
+    }
+}
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/doc/_static/comment-bright.png b/lib/Mako-0.7.3/doc/_static/comment-bright.png
new file mode 100644
index 0000000000000000000000000000000000000000..551517b8c83b76f734ff791f847829a760ad1903
GIT binary patch
[stripped]
diff --git a/lib/Mako-0.7.3/doc/_static/comment-close.png b/lib/Mako-0.7.3/doc/_static/comment-close.png
new file mode 100644
index 0000000000000000000000000000000000000000..09b54be46da3f0d4a5061da289dc91d8a2cdbc9c
GIT binary patch
[stripped]
diff --git a/lib/Mako-0.7.3/doc/_static/comment.png b/lib/Mako-0.7.3/doc/_static/comment.png
new file mode 100644
index 0000000000000000000000000000000000000000..92feb52b8824c6b0f59b658b1196c61de9162a95
GIT binary patch
[stripped]
diff --git a/lib/Mako-0.7.3/doc/_static/default.css b/lib/Mako-0.7.3/doc/_static/default.css
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_static/default.css
@@ -0,0 +1,256 @@
+/*
+ * default.css_t
+ * ~~~~~~~~~~~~~
+ *
+ * Sphinx stylesheet -- default theme.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+ at import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+    font-family: sans-serif;
+    font-size: 100%;
+    background-color: #11303d;
+    color: #000;
+    margin: 0;
+    padding: 0;
+}
+
+div.document {
+    background-color: #1c4e63;
+}
+
+div.documentwrapper {
+    float: left;
+    width: 100%;
+}
+
+div.bodywrapper {
+    margin: 0 0 0 230px;
+}
+
+div.body {
+    background-color: #ffffff;
+    color: #000000;
+    padding: 0 20px 30px 20px;
+}
+
+div.footer {
+    color: #ffffff;
+    width: 100%;
+    padding: 9px 0 9px 0;
+    text-align: center;
+    font-size: 75%;
+}
+
+div.footer a {
+    color: #ffffff;
+    text-decoration: underline;
+}
+
+div.related {
+    background-color: #133f52;
+    line-height: 30px;
+    color: #ffffff;
+}
+
+div.related a {
+    color: #ffffff;
+}
+
+div.sphinxsidebar {
+}
+
+div.sphinxsidebar h3 {
+    font-family: 'Trebuchet MS', sans-serif;
+    color: #ffffff;
+    font-size: 1.4em;
+    font-weight: normal;
+    margin: 0;
+    padding: 0;
+}
+
+div.sphinxsidebar h3 a {
+    color: #ffffff;
+}
+
+div.sphinxsidebar h4 {
+    font-family: 'Trebuchet MS', sans-serif;
+    color: #ffffff;
+    font-size: 1.3em;
+    font-weight: normal;
+    margin: 5px 0 0 0;
+    padding: 0;
+}
+
+div.sphinxsidebar p {
+    color: #ffffff;
+}
+
+div.sphinxsidebar p.topless {
+    margin: 5px 10px 10px 10px;
+}
+
+div.sphinxsidebar ul {
+    margin: 10px;
+    padding: 0;
+    color: #ffffff;
+}
+
+div.sphinxsidebar a {
+    color: #98dbcc;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #98dbcc;
+    font-family: sans-serif;
+    font-size: 1em;
+}
+
+
+
+/* -- hyperlink styles ------------------------------------------------------ */
+
+a {
+    color: #355f7c;
+    text-decoration: none;
+}
+
+a:visited {
+    color: #355f7c;
+    text-decoration: none;
+}
+
+a:hover {
+    text-decoration: underline;
+}
+
+
+
+/* -- body styles ----------------------------------------------------------- */
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+    font-family: 'Trebuchet MS', sans-serif;
+    background-color: #f2f2f2;
+    font-weight: normal;
+    color: #20435c;
+    border-bottom: 1px solid #ccc;
+    margin: 20px -20px 10px -20px;
+    padding: 3px 0 3px 10px;
+}
+
+div.body h1 { margin-top: 0; font-size: 200%; }
+div.body h2 { font-size: 160%; }
+div.body h3 { font-size: 140%; }
+div.body h4 { font-size: 120%; }
+div.body h5 { font-size: 110%; }
+div.body h6 { font-size: 100%; }
+
+a.headerlink {
+    color: #c60f0f;
+    font-size: 0.8em;
+    padding: 0 4px 0 4px;
+    text-decoration: none;
+}
+
+a.headerlink:hover {
+    background-color: #c60f0f;
+    color: white;
+}
+
+div.body p, div.body dd, div.body li {
+    text-align: justify;
+    line-height: 130%;
+}
+
+div.admonition p.admonition-title + p {
+    display: inline;
+}
+
+div.admonition p {
+    margin-bottom: 5px;
+}
+
+div.admonition pre {
+    margin-bottom: 5px;
+}
+
+div.admonition ul, div.admonition ol {
+    margin-bottom: 5px;
+}
+
+div.note {
+    background-color: #eee;
+    border: 1px solid #ccc;
+}
+
+div.seealso {
+    background-color: #ffc;
+    border: 1px solid #ff6;
+}
+
+div.topic {
+    background-color: #eee;
+}
+
+div.warning {
+    background-color: #ffe4e4;
+    border: 1px solid #f66;
+}
+
+p.admonition-title {
+    display: inline;
+}
+
+p.admonition-title:after {
+    content: ":";
+}
+
+pre {
+    padding: 5px;
+    background-color: #eeffcc;
+    color: #333333;
+    line-height: 120%;
+    border: 1px solid #ac9;
+    border-left: none;
+    border-right: none;
+}
+
+tt {
+    background-color: #ecf0f3;
+    padding: 0 1px 0 1px;
+    font-size: 0.95em;
+}
+
+th {
+    background-color: #ede;
+}
+
+.warning tt {
+    background: #efc2c2;
+}
+
+.note tt {
+    background: #d6d6d6;
+}
+
+.viewcode-back {
+    font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+    background-color: #f4debf;
+    border-top: 1px solid #ac9;
+    border-bottom: 1px solid #ac9;
+}
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/doc/_static/docs.css b/lib/Mako-0.7.3/doc/_static/docs.css
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_static/docs.css
@@ -0,0 +1,438 @@
+/* global */
+
+body {
+  background-color: #FDFBFC;
+  margin:38px;
+  color:#333333;
+}
+
+a {
+    font-weight:normal; 
+    text-decoration:none;
+}
+
+form {
+    display:inline;
+}
+
+/* hyperlinks */
+
+a:link, a:visited, a:active {
+    color:#0000FF;
+}
+a:hover {
+    color:#700000;
+    text-decoration:underline;
+}
+
+/* paragraph links after sections.
+   These aren't visible until hovering
+   over the <h> tag, then have a 
+   "reverse video" effect over the actual
+   link
+ */
+
+a.headerlink {
+    font-size: 0.8em;
+    padding: 0 4px 0 4px;
+    text-decoration: none;
+    visibility: hidden;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink {
+    visibility: visible;
+}
+
+a.headerlink:hover {
+    background-color: #990000;
+    color: white;
+}
+
+
+/* Container setup */
+
+#docs-container {
+  max-width:1000px;
+}
+
+
+/* header/footer elements */
+
+#docs-header h1 {
+    font-size:20px;
+    color: #222222;
+    margin: 0;
+    padding: 0;
+}
+
+#docs-header {
+  font-family:Tahoma, Geneva,sans-serif;
+
+  font-size:.9em;
+
+}
+
+#docs-top-navigation,
+#docs-bottom-navigation {
+  font-family: Tahoma, Geneva, sans-serif;
+  background-color: #EEE;
+  border: solid 1px #CCC;
+  padding:10px;
+  font-size:.9em;
+}
+
+#docs-top-navigation {
+  margin:10px 0px 10px 0px;
+  line-height:1.2em;
+}
+
+.docs-navigation-links {
+  font-family:Tahoma, Geneva,sans-serif;
+}
+
+#docs-bottom-navigation {
+    float:right;
+    margin: 1em 0 1em 5px;
+}
+
+#docs-copyright {
+    font-size:.85em;
+    padding:5px 0px;
+}
+
+#docs-header h1,
+#docs-top-navigation h1,
+#docs-top-navigation h2 {
+  font-family:Tahoma,Geneva,sans-serif;
+  font-weight:normal;
+}
+
+#docs-top-navigation h2 {
+    margin:16px 4px 7px 5px;
+    font-size:2em;
+}
+
+#docs-search {
+    float:right;
+}
+
+#docs-top-page-control {
+  float:right;
+  width:350px;
+}
+
+#docs-top-page-control ul {
+  padding:0;
+  margin:0;
+}
+
+#docs-top-page-control li {
+    list-style-type:none;
+    padding:1px 8px;
+}
+
+
+#docs-container .version-num {
+    font-weight: bold;
+}
+
+
+/* content container, sidebar */
+
+#docs-body-container {
+  background-color:#EFEFEF;
+  border: solid 1px #CCC;
+
+}
+
+#docs-body,
+#docs-sidebar
+ {
+  /*font-family: helvetica, arial, sans-serif;
+  font-size:.9em;*/
+
+  font-family: Tahoma, Geneva, sans-serif;
+  /*font-size:.85em;*/
+  line-height:1.5em;
+
+}
+
+#docs-sidebar > ul {
+  font-size:.9em;
+}
+
+#docs-sidebar {
+  float:left;
+  width:212px;
+  padding: 10px 0 0 15px;
+  /*font-size:.85em;*/
+}
+
+#docs-sidebar h3, #docs-sidebar h4 {
+    background-color: #DDDDDD;
+    color: #222222;
+    font-family: Tahoma, Geneva,sans-serif;
+    font-size: 1.1em;
+    font-weight: normal;
+    margin: 10px 0 0 -15px;
+    padding: 5px 10px 5px 10px;
+    text-shadow: 1px 1px 0 white;
+    width:210px;
+}
+
+#docs-sidebar h3 a, #docs-sidebar h4 a {
+  color: #222222;
+}
+#docs-sidebar ul {
+  margin: 10px 10px 10px 0px;
+  padding: 0;
+  list-style: none outside none;
+}
+
+
+#docs-sidebar ul ul {
+    margin-bottom: 0;
+    margin-top: 0;
+    list-style: square outside none;
+    margin-left: 20px;
+}
+
+#docs-body {
+  background-color:#FFFFFF;
+  padding:1px 10px 10px 10px;
+}
+
+#docs-body.withsidebar {
+  margin: 0 0 0 230px;
+  border-left:3px solid #DFDFDF;
+}
+
+#docs-body h1,
+#docs-body h2,
+#docs-body h3,
+#docs-body h4 {
+  font-family:Tahoma, Geneva, sans-serif;
+}
+
+#docs-body h1 {
+  /* hide the <h1> for each content section. */
+  display:none;
+  font-size:1.8em;
+}
+
+#docs-body h2 {
+  font-size:1.6em;
+}
+
+#docs-body h3 {
+  font-size:1.4em;
+}
+
+/* SQL popup, code styles */
+
+.highlight {
+  background:none;
+}
+
+#docs-container pre {
+  font-size:1.2em;
+}
+
+#docs-container .pre {
+  font-size:1.1em;
+}
+
+#docs-container pre {
+  background-color: #f0f0f0;  
+  border: solid 1px #ccc;
+  box-shadow: 2px 2px 3px #DFDFDF;
+  padding:10px;
+  margin: 5px 0px 5px 0px;
+  overflow:auto;
+  line-height:1.3em;
+}
+
+.popup_sql, .show_sql
+{
+    background-color: #FBFBEE;
+    padding:5px 10px;
+    margin:10px -5px;
+    border:1px dashed;
+}
+
+/* the [SQL] links used to display SQL */
+#docs-container .sql_link
+{
+  font-weight:normal;
+  font-family: arial, sans-serif;
+  font-size:.9em;
+  text-transform: uppercase;
+  color:#990000;
+  border:1px solid;
+  padding:1px 2px 1px 2px;
+  margin:0px 10px 0px 15px;
+  float:right;
+  line-height:1.2em;
+}
+
+#docs-container a.sql_link, 
+#docs-container .sql_link
+{
+    text-decoration: none;
+    padding:1px 2px;
+}
+
+#docs-container a.sql_link:hover {
+    text-decoration: none;
+    color:#fff;
+    border:1px solid #900;
+    background-color: #900;
+}
+
+/* docutils-specific elements */
+
+th.field-name {
+    text-align:right;
+}
+
+div.note, div.warning, p.deprecated, div.topic  {
+    background-color:#EEFFEF;
+}
+
+
+div.admonition, div.topic, p.deprecated, p.versionadded, p.versionchanged {
+    border:1px solid #CCCCCC;
+    padding:5px 10px;
+    font-size:.9em;
+    box-shadow: 2px 2px 3px #DFDFDF;
+}
+
+div.warning .admonition-title {
+    color:#FF0000;
+}
+
+div.admonition .admonition-title, div.topic .topic-title {
+    font-weight:bold;
+}
+
+.viewcode-back, .viewcode-link {
+    float:right;
+}
+
+dl.function > dt,
+dl.attribute > dt,
+dl.classmethod > dt,
+dl.method > dt,
+dl.class > dt,
+dl.exception > dt
+{
+    background-color:#F0F0F0;
+    margin:25px -10px 10px 10px;
+    padding: 0px 10px;
+}
+
+p.versionadded span.versionmodified,
+p.versionchanged span.versionmodified,
+p.deprecated span.versionmodified {
+    background-color: #F0F0F0;
+    font-style: italic;
+}
+
+dt:target, span.highlight {
+    background-color:#FBE54E;
+}
+
+a.headerlink {
+    font-size: 0.8em;
+    padding: 0 4px 0 4px;
+    text-decoration: none;
+    visibility: hidden;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink {
+    visibility: visible;
+}
+
+a.headerlink:hover {
+    background-color: #00f;
+    color: white;
+}
+
+.clearboth {
+    clear:both;
+}
+
+tt.descname {
+    background-color:transparent;
+    font-size:1.2em;
+    font-weight:bold;
+}
+
+tt.descclassname {
+    background-color:transparent;
+}
+
+tt {
+    background-color:#ECF0F3;
+    padding:0 1px;
+}
+
+/* syntax highlighting overrides */
+.k, .kn {color:#0908CE;}
+.o {color:#BF0005;}
+.go {color:#804049;}
+
+
+/* special "index page" sections 
+   with specific formatting
+*/
+
+div#sqlalchemy-documentation {
+  font-size:.95em;
+}
+div#sqlalchemy-documentation em {
+  font-style:normal;
+}
+div#sqlalchemy-documentation .rubric{
+  font-size:14px;
+  background-color:#EEFFEF;
+  padding:5px;
+  border:1px solid #BFBFBF;
+}
+div#sqlalchemy-documentation a, div#sqlalchemy-documentation li {
+  padding:5px 0px;
+}
+
+div#getting-started {
+  border-bottom:1px solid;
+}
+
+div#sqlalchemy-documentation div#sqlalchemy-orm {
+  float:left;
+  width:48%;
+}
+
+div#sqlalchemy-documentation div#sqlalchemy-core {
+  float:left;
+  width:48%;
+  margin:0;
+  padding-left:10px;
+  border-left:1px solid;
+}
+
+div#dialect-documentation {
+  border-top:1px solid;
+  /*clear:left;*/
+}
diff --git a/lib/Mako-0.7.3/doc/_static/doctools.js b/lib/Mako-0.7.3/doc/_static/doctools.js
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_static/doctools.js
@@ -0,0 +1,247 @@
+/*
+ * doctools.js
+ * ~~~~~~~~~~~
+ *
+ * Sphinx JavaScript utilities for all documentation.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/**
+ * select a different prefix for underscore
+ */
+$u = _.noConflict();
+
+/**
+ * make the code below compatible with browsers without
+ * an installed firebug like debugger
+if (!window.console || !console.firebug) {
+  var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
+    "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
+    "profile", "profileEnd"];
+  window.console = {};
+  for (var i = 0; i < names.length; ++i)
+    window.console[names[i]] = function() {};
+}
+ */
+
+/**
+ * small helper function to urldecode strings
+ */
+jQuery.urldecode = function(x) {
+  return decodeURIComponent(x).replace(/\+/g, ' ');
+}
+
+/**
+ * small helper function to urlencode strings
+ */
+jQuery.urlencode = encodeURIComponent;
+
+/**
+ * This function returns the parsed url parameters of the
+ * current request. Multiple values per key are supported,
+ * it will always return arrays of strings for the value parts.
+ */
+jQuery.getQueryParameters = function(s) {
+  if (typeof s == 'undefined')
+    s = document.location.search;
+  var parts = s.substr(s.indexOf('?') + 1).split('&');
+  var result = {};
+  for (var i = 0; i < parts.length; i++) {
+    var tmp = parts[i].split('=', 2);
+    var key = jQuery.urldecode(tmp[0]);
+    var value = jQuery.urldecode(tmp[1]);
+    if (key in result)
+      result[key].push(value);
+    else
+      result[key] = [value];
+  }
+  return result;
+};
+
+/**
+ * small function to check if an array contains
+ * a given item.
+ */
+jQuery.contains = function(arr, item) {
+  for (var i = 0; i < arr.length; i++) {
+    if (arr[i] == item)
+      return true;
+  }
+  return false;
+};
+
+/**
+ * highlight a given string on a jquery object by wrapping it in
+ * span elements with the given class name.
+ */
+jQuery.fn.highlightText = function(text, className) {
+  function highlight(node) {
+    if (node.nodeType == 3) {
+      var val = node.nodeValue;
+      var pos = val.toLowerCase().indexOf(text);
+      if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
+        var span = document.createElement("span");
+        span.className = className;
+        span.appendChild(document.createTextNode(val.substr(pos, text.length)));
+        node.parentNode.insertBefore(span, node.parentNode.insertBefore(
+          document.createTextNode(val.substr(pos + text.length)),
+          node.nextSibling));
+        node.nodeValue = val.substr(0, pos);
+      }
+    }
+    else if (!jQuery(node).is("button, select, textarea")) {
+      jQuery.each(node.childNodes, function() {
+        highlight(this);
+      });
+    }
+  }
+  return this.each(function() {
+    highlight(this);
+  });
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+var Documentation = {
+
+  init : function() {
+    this.fixFirefoxAnchorBug();
+    this.highlightSearchWords();
+    this.initIndexTable();
+  },
+
+  /**
+   * i18n support
+   */
+  TRANSLATIONS : {},
+  PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
+  LOCALE : 'unknown',
+
+  // gettext and ngettext don't access this so that the functions
+  // can safely bound to a different name (_ = Documentation.gettext)
+  gettext : function(string) {
+    var translated = Documentation.TRANSLATIONS[string];
+    if (typeof translated == 'undefined')
+      return string;
+    return (typeof translated == 'string') ? translated : translated[0];
+  },
+
+  ngettext : function(singular, plural, n) {
+    var translated = Documentation.TRANSLATIONS[singular];
+    if (typeof translated == 'undefined')
+      return (n == 1) ? singular : plural;
+    return translated[Documentation.PLURALEXPR(n)];
+  },
+
+  addTranslations : function(catalog) {
+    for (var key in catalog.messages)
+      this.TRANSLATIONS[key] = catalog.messages[key];
+    this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
+    this.LOCALE = catalog.locale;
+  },
+
+  /**
+   * add context elements like header anchor links
+   */
+  addContextElements : function() {
+    $('div[id] > :header:first').each(function() {
+      $('<a class="headerlink">\u00B6</a>').
+      attr('href', '#' + this.id).
+      attr('title', _('Permalink to this headline')).
+      appendTo(this);
+    });
+    $('dt[id]').each(function() {
+      $('<a class="headerlink">\u00B6</a>').
+      attr('href', '#' + this.id).
+      attr('title', _('Permalink to this definition')).
+      appendTo(this);
+    });
+  },
+
+  /**
+   * workaround a firefox stupidity
+   */
+  fixFirefoxAnchorBug : function() {
+    if (document.location.hash && $.browser.mozilla)
+      window.setTimeout(function() {
+        document.location.href += '';
+      }, 10);
+  },
+
+  /**
+   * highlight the search words provided in the url in the text
+   */
+  highlightSearchWords : function() {
+    var params = $.getQueryParameters();
+    var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
+    if (terms.length) {
+      var body = $('div.body');
+      window.setTimeout(function() {
+        $.each(terms, function() {
+          body.highlightText(this.toLowerCase(), 'highlighted');
+        });
+      }, 10);
+      $('<p class="highlight-link"><a href="javascript:Documentation.' +
+        'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
+          .appendTo($('#searchbox'));
+    }
+  },
+
+  /**
+   * init the domain index toggle buttons
+   */
+  initIndexTable : function() {
+    var togglers = $('img.toggler').click(function() {
+      var src = $(this).attr('src');
+      var idnum = $(this).attr('id').substr(7);
+      $('tr.cg-' + idnum).toggle();
+      if (src.substr(-9) == 'minus.png')
+        $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
+      else
+        $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
+    }).css('display', '');
+    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
+        togglers.click();
+    }
+  },
+
+  /**
+   * helper function to hide the search marks again
+   */
+  hideSearchWords : function() {
+    $('#searchbox .highlight-link').fadeOut(300);
+    $('span.highlighted').removeClass('highlighted');
+  },
+
+  /**
+   * make the url absolute
+   */
+  makeURL : function(relativeURL) {
+    return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
+  },
+
+  /**
+   * get the current relative url
+   */
+  getCurrentURL : function() {
+    var path = document.location.pathname;
+    var parts = path.split(/\//);
+    $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
+      if (this == '..')
+        parts.pop();
+    });
+    var url = parts.join('/');
+    return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
+  }
+};
+
+// quick alias for translations
+_ = Documentation.gettext;
+
+$(document).ready(function() {
+  Documentation.init();
+});
diff --git a/lib/Mako-0.7.3/doc/_static/down-pressed.png b/lib/Mako-0.7.3/doc/_static/down-pressed.png
new file mode 100644
index 0000000000000000000000000000000000000000..6f7ad782782e4f8e39b0c6e15c7344700cdd2527
GIT binary patch
[stripped]
diff --git a/lib/Mako-0.7.3/doc/_static/down.png b/lib/Mako-0.7.3/doc/_static/down.png
new file mode 100644
index 0000000000000000000000000000000000000000..3003a88770de3977d47a2ba69893436a2860f9e7
GIT binary patch
[stripped]
diff --git a/lib/Mako-0.7.3/doc/_static/file.png b/lib/Mako-0.7.3/doc/_static/file.png
new file mode 100644
index 0000000000000000000000000000000000000000..d18082e397e7e54f20721af768c4c2983258f1b4
GIT binary patch
[stripped]
diff --git a/lib/Mako-0.7.3/doc/_static/jquery.js b/lib/Mako-0.7.3/doc/_static/jquery.js
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_static/jquery.js
@@ -0,0 +1,154 @@
+/*!
+ * jQuery JavaScript Library v1.4.2
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Sat Feb 13 22:33:48 2010 -0500
+ */
+(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
+e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
+j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
+"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
+true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
+Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
+(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
+a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
+"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
+function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
+c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
+L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
+"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
+a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
+d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
+a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
+!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
+true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
+parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
+false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
+s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
+applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
+else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
+a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
+w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
+cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
+i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
+" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
+this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
+e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
+c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
+a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
+function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
+k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
+C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
+null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
+e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
+f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
+if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
+d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
+"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
+a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
+isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
+{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
+if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
+e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
+"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
+d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
+!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
+toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
+u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
+function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
+if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
+t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
+g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
+for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
+1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
+CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
+relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
+l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
+h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
+CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
+g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
+text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
+setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
+h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
+m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
+"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
+h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
+!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
+h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
+q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
+if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
+(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
+function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
+gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
+c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
+{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
+"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
+d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
+a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
+1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
+a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
+c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
+wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
+prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
+this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
+return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
+""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
+this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
+u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
+1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
+return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
+""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
+c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
+c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
+function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
+Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
+"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
+a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
+a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
+"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
+serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
+function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
+global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
+e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
+"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
+false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
+false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
+c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
+d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
+g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
+1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
+"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
+if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
+this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
+"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
+animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
+j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
+this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
+"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
+c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
+this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
+this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
+e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
+c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
+function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
+this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
+k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
+f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
+a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
+c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
+d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
+f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
+"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
+e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
diff --git a/lib/Mako-0.7.3/doc/_static/makoLogo.png b/lib/Mako-0.7.3/doc/_static/makoLogo.png
new file mode 100644
index 0000000000000000000000000000000000000000..c43c087eb48ebfc2223b76cf3df2fa7868c2a72b
GIT binary patch
[stripped]
diff --git a/lib/Mako-0.7.3/doc/_static/minus.png b/lib/Mako-0.7.3/doc/_static/minus.png
new file mode 100644
index 0000000000000000000000000000000000000000..da1c5620d10c047525a467a425abe9ff5269cfc2
GIT binary patch
[stripped]
diff --git a/lib/Mako-0.7.3/doc/_static/plus.png b/lib/Mako-0.7.3/doc/_static/plus.png
new file mode 100644
index 0000000000000000000000000000000000000000..b3cb37425ea68b39ffa7b2e5fb69161275a87541
GIT binary patch
[stripped]
diff --git a/lib/Mako-0.7.3/doc/_static/pygments.css b/lib/Mako-0.7.3/doc/_static/pygments.css
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_static/pygments.css
@@ -0,0 +1,62 @@
+.highlight .hll { background-color: #ffffcc }
+.highlight  { background: #eeffcc; }
+.highlight .c { color: #408090; font-style: italic } /* Comment */
+.highlight .err { border: 1px solid #FF0000 } /* Error */
+.highlight .k { color: #007020; font-weight: bold } /* Keyword */
+.highlight .o { color: #666666 } /* Operator */
+.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #007020 } /* Comment.Preproc */
+.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #303030 } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0040D0 } /* Generic.Traceback */
+.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #007020 } /* Keyword.Pseudo */
+.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #902000 } /* Keyword.Type */
+.highlight .m { color: #208050 } /* Literal.Number */
+.highlight .s { color: #4070a0 } /* Literal.String */
+.highlight .na { color: #4070a0 } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
+.highlight .no { color: #60add5 } /* Name.Constant */
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #007020 } /* Name.Exception */
+.highlight .nf { color: #06287e } /* Name.Function */
+.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
+.highlight .nv { color: #bb60d5 } /* Name.Variable */
+.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mf { color: #208050 } /* Literal.Number.Float */
+.highlight .mh { color: #208050 } /* Literal.Number.Hex */
+.highlight .mi { color: #208050 } /* Literal.Number.Integer */
+.highlight .mo { color: #208050 } /* Literal.Number.Oct */
+.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
+.highlight .sc { color: #4070a0 } /* Literal.String.Char */
+.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
+.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
+.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
+.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
+.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
+.highlight .sx { color: #c65d09 } /* Literal.String.Other */
+.highlight .sr { color: #235388 } /* Literal.String.Regex */
+.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
+.highlight .ss { color: #517918 } /* Literal.String.Symbol */
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
+.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
+.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
+.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/doc/_static/searchtools.js b/lib/Mako-0.7.3/doc/_static/searchtools.js
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_static/searchtools.js
@@ -0,0 +1,560 @@
+/*
+ * searchtools.js_t
+ * ~~~~~~~~~~~~~~~~
+ *
+ * Sphinx JavaScript utilties for the full-text search.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/**
+ * helper function to return a node containing the
+ * search summary for a given text. keywords is a list
+ * of stemmed words, hlwords is the list of normal, unstemmed
+ * words. the first one is used to find the occurance, the
+ * latter for highlighting it.
+ */
+
+jQuery.makeSearchSummary = function(text, keywords, hlwords) {
+  var textLower = text.toLowerCase();
+  var start = 0;
+  $.each(keywords, function() {
+    var i = textLower.indexOf(this.toLowerCase());
+    if (i > -1)
+      start = i;
+  });
+  start = Math.max(start - 120, 0);
+  var excerpt = ((start > 0) ? '...' : '') +
+  $.trim(text.substr(start, 240)) +
+  ((start + 240 - text.length) ? '...' : '');
+  var rv = $('<div class="context"></div>').text(excerpt);
+  $.each(hlwords, function() {
+    rv = rv.highlightText(this, 'highlighted');
+  });
+  return rv;
+}
+
+
+/**
+ * Porter Stemmer
+ */
+var Stemmer = function() {
+
+  var step2list = {
+    ational: 'ate',
+    tional: 'tion',
+    enci: 'ence',
+    anci: 'ance',
+    izer: 'ize',
+    bli: 'ble',
+    alli: 'al',
+    entli: 'ent',
+    eli: 'e',
+    ousli: 'ous',
+    ization: 'ize',
+    ation: 'ate',
+    ator: 'ate',
+    alism: 'al',
+    iveness: 'ive',
+    fulness: 'ful',
+    ousness: 'ous',
+    aliti: 'al',
+    iviti: 'ive',
+    biliti: 'ble',
+    logi: 'log'
+  };
+
+  var step3list = {
+    icate: 'ic',
+    ative: '',
+    alize: 'al',
+    iciti: 'ic',
+    ical: 'ic',
+    ful: '',
+    ness: ''
+  };
+
+  var c = "[^aeiou]";          // consonant
+  var v = "[aeiouy]";          // vowel
+  var C = c + "[^aeiouy]*";    // consonant sequence
+  var V = v + "[aeiou]*";      // vowel sequence
+
+  var mgr0 = "^(" + C + ")?" + V + C;                      // [C]VC... is m>0
+  var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$";    // [C]VC[V] is m=1
+  var mgr1 = "^(" + C + ")?" + V + C + V + C;              // [C]VCVC... is m>1
+  var s_v   = "^(" + C + ")?" + v;                         // vowel in stem
+
+  this.stemWord = function (w) {
+    var stem;
+    var suffix;
+    var firstch;
+    var origword = w;
+
+    if (w.length < 3)
+      return w;
+
+    var re;
+    var re2;
+    var re3;
+    var re4;
+
+    firstch = w.substr(0,1);
+    if (firstch == "y")
+      w = firstch.toUpperCase() + w.substr(1);
+
+    // Step 1a
+    re = /^(.+?)(ss|i)es$/;
+    re2 = /^(.+?)([^s])s$/;
+
+    if (re.test(w))
+      w = w.replace(re,"$1$2");
+    else if (re2.test(w))
+      w = w.replace(re2,"$1$2");
+
+    // Step 1b
+    re = /^(.+?)eed$/;
+    re2 = /^(.+?)(ed|ing)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      re = new RegExp(mgr0);
+      if (re.test(fp[1])) {
+        re = /.$/;
+        w = w.replace(re,"");
+      }
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1];
+      re2 = new RegExp(s_v);
+      if (re2.test(stem)) {
+        w = stem;
+        re2 = /(at|bl|iz)$/;
+        re3 = new RegExp("([^aeiouylsz])\\1$");
+        re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+        if (re2.test(w))
+          w = w + "e";
+        else if (re3.test(w)) {
+          re = /.$/;
+          w = w.replace(re,"");
+        }
+        else if (re4.test(w))
+          w = w + "e";
+      }
+    }
+
+    // Step 1c
+    re = /^(.+?)y$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(s_v);
+      if (re.test(stem))
+        w = stem + "i";
+    }
+
+    // Step 2
+    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step2list[suffix];
+    }
+
+    // Step 3
+    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step3list[suffix];
+    }
+
+    // Step 4
+    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
+    re2 = /^(.+?)(s|t)(ion)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      if (re.test(stem))
+        w = stem;
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1] + fp[2];
+      re2 = new RegExp(mgr1);
+      if (re2.test(stem))
+        w = stem;
+    }
+
+    // Step 5
+    re = /^(.+?)e$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      re2 = new RegExp(meq1);
+      re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
+        w = stem;
+    }
+    re = /ll$/;
+    re2 = new RegExp(mgr1);
+    if (re.test(w) && re2.test(w)) {
+      re = /.$/;
+      w = w.replace(re,"");
+    }
+
+    // and turn initial Y back to y
+    if (firstch == "y")
+      w = firstch.toLowerCase() + w.substr(1);
+    return w;
+  }
+}
+
+
+/**
+ * Search Module
+ */
+var Search = {
+
+  _index : null,
+  _queued_query : null,
+  _pulse_status : -1,
+
+  init : function() {
+      var params = $.getQueryParameters();
+      if (params.q) {
+          var query = params.q[0];
+          $('input[name="q"]')[0].value = query;
+          this.performSearch(query);
+      }
+  },
+
+  loadIndex : function(url) {
+    $.ajax({type: "GET", url: url, data: null, success: null,
+            dataType: "script", cache: true});
+  },
+
+  setIndex : function(index) {
+    var q;
+    this._index = index;
+    if ((q = this._queued_query) !== null) {
+      this._queued_query = null;
+      Search.query(q);
+    }
+  },
+
+  hasIndex : function() {
+      return this._index !== null;
+  },
+
+  deferQuery : function(query) {
+      this._queued_query = query;
+  },
+
+  stopPulse : function() {
+      this._pulse_status = 0;
+  },
+
+  startPulse : function() {
+    if (this._pulse_status >= 0)
+        return;
+    function pulse() {
+      Search._pulse_status = (Search._pulse_status + 1) % 4;
+      var dotString = '';
+      for (var i = 0; i < Search._pulse_status; i++)
+        dotString += '.';
+      Search.dots.text(dotString);
+      if (Search._pulse_status > -1)
+        window.setTimeout(pulse, 500);
+    };
+    pulse();
+  },
+
+  /**
+   * perform a search for something
+   */
+  performSearch : function(query) {
+    // create the required interface elements
+    this.out = $('#search-results');
+    this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
+    this.dots = $('<span></span>').appendTo(this.title);
+    this.status = $('<p style="display: none"></p>').appendTo(this.out);
+    this.output = $('<ul class="search"/>').appendTo(this.out);
+
+    $('#search-progress').text(_('Preparing search...'));
+    this.startPulse();
+
+    // index already loaded, the browser was quick!
+    if (this.hasIndex())
+      this.query(query);
+    else
+      this.deferQuery(query);
+  },
+
+  query : function(query) {
+    var stopwords = ["and","then","into","it","as","are","in","if","for","no","there","their","was","is","be","to","that","but","they","not","such","with","by","a","on","these","of","will","this","near","the","or","at"];
+
+    // Stem the searchterms and add them to the correct list
+    var stemmer = new Stemmer();
+    var searchterms = [];
+    var excluded = [];
+    var hlterms = [];
+    var tmp = query.split(/\s+/);
+    var objectterms = [];
+    for (var i = 0; i < tmp.length; i++) {
+      if (tmp[i] != "") {
+          objectterms.push(tmp[i].toLowerCase());
+      }
+
+      if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) ||
+          tmp[i] == "") {
+        // skip this "word"
+        continue;
+      }
+      // stem the word
+      var word = stemmer.stemWord(tmp[i]).toLowerCase();
+      // select the correct list
+      if (word[0] == '-') {
+        var toAppend = excluded;
+        word = word.substr(1);
+      }
+      else {
+        var toAppend = searchterms;
+        hlterms.push(tmp[i].toLowerCase());
+      }
+      // only add if not already in the list
+      if (!$.contains(toAppend, word))
+        toAppend.push(word);
+    };
+    var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
+
+    // console.debug('SEARCH: searching for:');
+    // console.info('required: ', searchterms);
+    // console.info('excluded: ', excluded);
+
+    // prepare search
+    var filenames = this._index.filenames;
+    var titles = this._index.titles;
+    var terms = this._index.terms;
+    var fileMap = {};
+    var files = null;
+    // different result priorities
+    var importantResults = [];
+    var objectResults = [];
+    var regularResults = [];
+    var unimportantResults = [];
+    $('#search-progress').empty();
+
+    // lookup as object
+    for (var i = 0; i < objectterms.length; i++) {
+      var others = [].concat(objectterms.slice(0,i),
+                             objectterms.slice(i+1, objectterms.length))
+      var results = this.performObjectSearch(objectterms[i], others);
+      // Assume first word is most likely to be the object,
+      // other words more likely to be in description.
+      // Therefore put matches for earlier words first.
+      // (Results are eventually used in reverse order).
+      objectResults = results[0].concat(objectResults);
+      importantResults = results[1].concat(importantResults);
+      unimportantResults = results[2].concat(unimportantResults);
+    }
+
+    // perform the search on the required terms
+    for (var i = 0; i < searchterms.length; i++) {
+      var word = searchterms[i];
+      // no match but word was a required one
+      if ((files = terms[word]) == null)
+        break;
+      if (files.length == undefined) {
+        files = [files];
+      }
+      // create the mapping
+      for (var j = 0; j < files.length; j++) {
+        var file = files[j];
+        if (file in fileMap)
+          fileMap[file].push(word);
+        else
+          fileMap[file] = [word];
+      }
+    }
+
+    // now check if the files don't contain excluded terms
+    for (var file in fileMap) {
+      var valid = true;
+
+      // check if all requirements are matched
+      if (fileMap[file].length != searchterms.length)
+        continue;
+
+      // ensure that none of the excluded terms is in the
+      // search result.
+      for (var i = 0; i < excluded.length; i++) {
+        if (terms[excluded[i]] == file ||
+            $.contains(terms[excluded[i]] || [], file)) {
+          valid = false;
+          break;
+        }
+      }
+
+      // if we have still a valid result we can add it
+      // to the result list
+      if (valid)
+        regularResults.push([filenames[file], titles[file], '', null]);
+    }
+
+    // delete unused variables in order to not waste
+    // memory until list is retrieved completely
+    delete filenames, titles, terms;
+
+    // now sort the regular results descending by title
+    regularResults.sort(function(a, b) {
+      var left = a[1].toLowerCase();
+      var right = b[1].toLowerCase();
+      return (left > right) ? -1 : ((left < right) ? 1 : 0);
+    });
+
+    // combine all results
+    var results = unimportantResults.concat(regularResults)
+      .concat(objectResults).concat(importantResults);
+
+    // print the results
+    var resultCount = results.length;
+    function displayNextItem() {
+      // results left, load the summary and display it
+      if (results.length) {
+        var item = results.pop();
+        var listItem = $('<li style="display:none"></li>');
+        if (DOCUMENTATION_OPTIONS.FILE_SUFFIX == '') {
+          // dirhtml builder
+          var dirname = item[0] + '/';
+          if (dirname.match(/\/index\/$/)) {
+            dirname = dirname.substring(0, dirname.length-6);
+          } else if (dirname == 'index/') {
+            dirname = '';
+          }
+          listItem.append($('<a/>').attr('href',
+            DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
+            highlightstring + item[2]).html(item[1]));
+        } else {
+          // normal html builders
+          listItem.append($('<a/>').attr('href',
+            item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
+            highlightstring + item[2]).html(item[1]));
+        }
+        if (item[3]) {
+          listItem.append($('<span> (' + item[3] + ')</span>'));
+          Search.output.append(listItem);
+          listItem.slideDown(5, function() {
+            displayNextItem();
+          });
+        } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
+          $.get(DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' +
+                item[0] + '.txt', function(data) {
+            if (data != '') {
+              listItem.append($.makeSearchSummary(data, searchterms, hlterms));
+              Search.output.append(listItem);
+            }
+            listItem.slideDown(5, function() {
+              displayNextItem();
+            });
+          }, "text");
+        } else {
+          // no source available, just display title
+          Search.output.append(listItem);
+          listItem.slideDown(5, function() {
+            displayNextItem();
+          });
+        }
+      }
+      // search finished, update title and status message
+      else {
+        Search.stopPulse();
+        Search.title.text(_('Search Results'));
+        if (!resultCount)
+          Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
+        else
+            Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
+        Search.status.fadeIn(500);
+      }
+    }
+    displayNextItem();
+  },
+
+  performObjectSearch : function(object, otherterms) {
+    var filenames = this._index.filenames;
+    var objects = this._index.objects;
+    var objnames = this._index.objnames;
+    var titles = this._index.titles;
+
+    var importantResults = [];
+    var objectResults = [];
+    var unimportantResults = [];
+
+    for (var prefix in objects) {
+      for (var name in objects[prefix]) {
+        var fullname = (prefix ? prefix + '.' : '') + name;
+        if (fullname.toLowerCase().indexOf(object) > -1) {
+          var match = objects[prefix][name];
+          var objname = objnames[match[1]][2];
+          var title = titles[match[0]];
+          // If more than one term searched for, we require other words to be
+          // found in the name/title/description
+          if (otherterms.length > 0) {
+            var haystack = (prefix + ' ' + name + ' ' +
+                            objname + ' ' + title).toLowerCase();
+            var allfound = true;
+            for (var i = 0; i < otherterms.length; i++) {
+              if (haystack.indexOf(otherterms[i]) == -1) {
+                allfound = false;
+                break;
+              }
+            }
+            if (!allfound) {
+              continue;
+            }
+          }
+          var descr = objname + _(', in ') + title;
+          anchor = match[3];
+          if (anchor == '')
+            anchor = fullname;
+          else if (anchor == '-')
+            anchor = objnames[match[1]][1] + '-' + fullname;
+          result = [filenames[match[0]], fullname, '#'+anchor, descr];
+          switch (match[2]) {
+          case 1: objectResults.push(result); break;
+          case 0: importantResults.push(result); break;
+          case 2: unimportantResults.push(result); break;
+          }
+        }
+      }
+    }
+
+    // sort results descending
+    objectResults.sort(function(a, b) {
+      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
+    });
+
+    importantResults.sort(function(a, b) {
+      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
+    });
+
+    unimportantResults.sort(function(a, b) {
+      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
+    });
+
+    return [importantResults, objectResults, unimportantResults]
+  }
+}
+
+$(document).ready(function() {
+  Search.init();
+});
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/doc/_static/sidebar.js b/lib/Mako-0.7.3/doc/_static/sidebar.js
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_static/sidebar.js
@@ -0,0 +1,151 @@
+/*
+ * sidebar.js
+ * ~~~~~~~~~~
+ *
+ * This script makes the Sphinx sidebar collapsible.
+ *
+ * .sphinxsidebar contains .sphinxsidebarwrapper.  This script adds
+ * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
+ * used to collapse and expand the sidebar.
+ *
+ * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
+ * and the width of the sidebar and the margin-left of the document
+ * are decreased. When the sidebar is expanded the opposite happens.
+ * This script saves a per-browser/per-session cookie used to
+ * remember the position of the sidebar among the pages.
+ * Once the browser is closed the cookie is deleted and the position
+ * reset to the default (expanded).
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+$(function() {
+  // global elements used by the functions.
+  // the 'sidebarbutton' element is defined as global after its
+  // creation, in the add_sidebar_button function
+  var bodywrapper = $('.bodywrapper');
+  var sidebar = $('.sphinxsidebar');
+  var sidebarwrapper = $('.sphinxsidebarwrapper');
+
+  // for some reason, the document has no sidebar; do not run into errors
+  if (!sidebar.length) return;
+
+  // original margin-left of the bodywrapper and width of the sidebar
+  // with the sidebar expanded
+  var bw_margin_expanded = bodywrapper.css('margin-left');
+  var ssb_width_expanded = sidebar.width();
+
+  // margin-left of the bodywrapper and width of the sidebar
+  // with the sidebar collapsed
+  var bw_margin_collapsed = '.8em';
+  var ssb_width_collapsed = '.8em';
+
+  // colors used by the current theme
+  var dark_color = $('.related').css('background-color');
+  var light_color = $('.document').css('background-color');
+
+  function sidebar_is_collapsed() {
+    return sidebarwrapper.is(':not(:visible)');
+  }
+
+  function toggle_sidebar() {
+    if (sidebar_is_collapsed())
+      expand_sidebar();
+    else
+      collapse_sidebar();
+  }
+
+  function collapse_sidebar() {
+    sidebarwrapper.hide();
+    sidebar.css('width', ssb_width_collapsed);
+    bodywrapper.css('margin-left', bw_margin_collapsed);
+    sidebarbutton.css({
+        'margin-left': '0',
+        'height': bodywrapper.height()
+    });
+    sidebarbutton.find('span').text('»');
+    sidebarbutton.attr('title', _('Expand sidebar'));
+    document.cookie = 'sidebar=collapsed';
+  }
+
+  function expand_sidebar() {
+    bodywrapper.css('margin-left', bw_margin_expanded);
+    sidebar.css('width', ssb_width_expanded);
+    sidebarwrapper.show();
+    sidebarbutton.css({
+        'margin-left': ssb_width_expanded-12,
+        'height': bodywrapper.height()
+    });
+    sidebarbutton.find('span').text('«');
+    sidebarbutton.attr('title', _('Collapse sidebar'));
+    document.cookie = 'sidebar=expanded';
+  }
+
+  function add_sidebar_button() {
+    sidebarwrapper.css({
+        'float': 'left',
+        'margin-right': '0',
+        'width': ssb_width_expanded - 28
+    });
+    // create the button
+    sidebar.append(
+        '<div id="sidebarbutton"><span>«</span></div>'
+    );
+    var sidebarbutton = $('#sidebarbutton');
+    light_color = sidebarbutton.css('background-color');
+    // find the height of the viewport to center the '<<' in the page
+    var viewport_height;
+    if (window.innerHeight)
+ 	  viewport_height = window.innerHeight;
+    else
+	  viewport_height = $(window).height();
+    sidebarbutton.find('span').css({
+        'display': 'block',
+        'margin-top': (viewport_height - sidebar.position().top - 20) / 2
+    });
+
+    sidebarbutton.click(toggle_sidebar);
+    sidebarbutton.attr('title', _('Collapse sidebar'));
+    sidebarbutton.css({
+        'color': '#FFFFFF',
+        'border-left': '1px solid ' + dark_color,
+        'font-size': '1.2em',
+        'cursor': 'pointer',
+        'height': bodywrapper.height(),
+        'padding-top': '1px',
+        'margin-left': ssb_width_expanded - 12
+    });
+
+    sidebarbutton.hover(
+      function () {
+          $(this).css('background-color', dark_color);
+      },
+      function () {
+          $(this).css('background-color', light_color);
+      }
+    );
+  }
+
+  function set_position_from_cookie() {
+    if (!document.cookie)
+      return;
+    var items = document.cookie.split(';');
+    for(var k=0; k<items.length; k++) {
+      var key_val = items[k].split('=');
+      var key = key_val[0];
+      if (key == 'sidebar') {
+        var value = key_val[1];
+        if ((value == 'collapsed') && (!sidebar_is_collapsed()))
+          collapse_sidebar();
+        else if ((value == 'expanded') && (sidebar_is_collapsed()))
+          expand_sidebar();
+      }
+    }
+  }
+
+  add_sidebar_button();
+  var sidebarbutton = $('#sidebarbutton');
+  set_position_from_cookie();
+});
diff --git a/lib/Mako-0.7.3/doc/_static/site.css b/lib/Mako-0.7.3/doc/_static/site.css
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_static/site.css
@@ -0,0 +1,86 @@
+body {
+    font-family: Tahoma, Geneva, sans-serif;
+    line-height:1.4em;
+    margin:15px;
+    background-color:#FFFFFF;
+}
+img {border:none;}
+a { text-decoration: none;}
+a:visited  { color: #2929ff;}
+a:hover { color: #0000ff;}
+
+#wrap {
+    margin:0 auto;
+    max-width:1024px;
+    min-width:480px;
+    position:relative;
+
+}
+h1 {
+    font-size:1.6em;
+    font-weight:bold;
+}
+
+h2 {
+    font-size:1.1em;
+    font-weight:bold;
+    margin:10px 0px 10px 0px;
+}
+
+.clearfix{
+    clear:both;
+}
+
+.red {
+	font-weight:bold;
+	color:#FF0000;
+}
+.rightbar {
+    float:right;
+}
+.slogan {
+    margin-top:10px;
+}
+#gittip_nav {
+    float:right;
+    margin:10px 0px 0px 0px;
+}
+
+.toolbar {
+    margin-top:20px;
+}
+.copyright {
+    font-size:.8em;
+    text-align:center;
+    color:909090;
+}
+.pylogo {
+	text-align:right;
+	float:right;
+}
+.code {
+    font-family:monospace;
+}
+
+li {
+    margin:1px 0px 1px 0px;
+}
+
+.speedchart td {
+    font-size:small;
+}
+
+pre.codesample {
+    margin: 1.5em;
+    padding: .5em;
+    font-size: .95em;
+    line-height:1em;
+    background-color: #eee;
+    border: 1px solid #ccc;
+    width:450px;
+    overflow:auto;
+}
+
+#speedchart {
+    margin:5px 10px 5px 10px;
+}
diff --git a/lib/Mako-0.7.3/doc/_static/underscore.js b/lib/Mako-0.7.3/doc/_static/underscore.js
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_static/underscore.js
@@ -0,0 +1,23 @@
+// Underscore.js 0.5.5
+// (c) 2009 Jeremy Ashkenas, DocumentCloud Inc.
+// Underscore is freely distributable under the terms of the MIT license.
+// Portions of Underscore are inspired by or borrowed from Prototype.js,
+// Oliver Steele's Functional, and John Resig's Micro-Templating.
+// For all details and documentation:
+// http://documentcloud.github.com/underscore/
+(function(){var j=this,n=j._,i=function(a){this._wrapped=a},m=typeof StopIteration!=="undefined"?StopIteration:"__break__",b=j._=function(a){return new i(a)};if(typeof exports!=="undefined")exports._=b;var k=Array.prototype.slice,o=Array.prototype.unshift,p=Object.prototype.toString,q=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;b.VERSION="0.5.5";b.each=function(a,c,d){try{if(a.forEach)a.forEach(c,d);else if(b.isArray(a)||b.isArguments(a))for(var e=0,f=a.length;e<f;e++)c.call(d,
+a[e],e,a);else{var g=b.keys(a);f=g.length;for(e=0;e<f;e++)c.call(d,a[g[e]],g[e],a)}}catch(h){if(h!=m)throw h;}return a};b.map=function(a,c,d){if(a&&b.isFunction(a.map))return a.map(c,d);var e=[];b.each(a,function(f,g,h){e.push(c.call(d,f,g,h))});return e};b.reduce=function(a,c,d,e){if(a&&b.isFunction(a.reduce))return a.reduce(b.bind(d,e),c);b.each(a,function(f,g,h){c=d.call(e,c,f,g,h)});return c};b.reduceRight=function(a,c,d,e){if(a&&b.isFunction(a.reduceRight))return a.reduceRight(b.bind(d,e),c);
+var f=b.clone(b.toArray(a)).reverse();b.each(f,function(g,h){c=d.call(e,c,g,h,a)});return c};b.detect=function(a,c,d){var e;b.each(a,function(f,g,h){if(c.call(d,f,g,h)){e=f;b.breakLoop()}});return e};b.select=function(a,c,d){if(a&&b.isFunction(a.filter))return a.filter(c,d);var e=[];b.each(a,function(f,g,h){c.call(d,f,g,h)&&e.push(f)});return e};b.reject=function(a,c,d){var e=[];b.each(a,function(f,g,h){!c.call(d,f,g,h)&&e.push(f)});return e};b.all=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.every))return a.every(c,
+d);var e=true;b.each(a,function(f,g,h){(e=e&&c.call(d,f,g,h))||b.breakLoop()});return e};b.any=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.some))return a.some(c,d);var e=false;b.each(a,function(f,g,h){if(e=c.call(d,f,g,h))b.breakLoop()});return e};b.include=function(a,c){if(b.isArray(a))return b.indexOf(a,c)!=-1;var d=false;b.each(a,function(e){if(d=e===c)b.breakLoop()});return d};b.invoke=function(a,c){var d=b.rest(arguments,2);return b.map(a,function(e){return(c?e[c]:e).apply(e,d)})};b.pluck=
+function(a,c){return b.map(a,function(d){return d[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);var e={computed:-Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g>=e.computed&&(e={value:f,computed:g})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);var e={computed:Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g<e.computed&&(e={value:f,computed:g})});return e.value};b.sortBy=function(a,c,d){return b.pluck(b.map(a,
+function(e,f,g){return{value:e,criteria:c.call(d,e,f,g)}}).sort(function(e,f){e=e.criteria;f=f.criteria;return e<f?-1:e>f?1:0}),"value")};b.sortedIndex=function(a,c,d){d=d||b.identity;for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?(e=g+1):(f=g)}return e};b.toArray=function(a){if(!a)return[];if(a.toArray)return a.toArray();if(b.isArray(a))return a;if(b.isArguments(a))return k.call(a);return b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=function(a,c,d){return c&&!d?k.call(a,
+0,c):a[0]};b.rest=function(a,c,d){return k.call(a,b.isUndefined(c)||d?1:c)};b.last=function(a){return a[a.length-1]};b.compact=function(a){return b.select(a,function(c){return!!c})};b.flatten=function(a){return b.reduce(a,[],function(c,d){if(b.isArray(d))return c.concat(b.flatten(d));c.push(d);return c})};b.without=function(a){var c=b.rest(arguments);return b.select(a,function(d){return!b.include(c,d)})};b.uniq=function(a,c){return b.reduce(a,[],function(d,e,f){if(0==f||(c===true?b.last(d)!=e:!b.include(d,
+e)))d.push(e);return d})};b.intersect=function(a){var c=b.rest(arguments);return b.select(b.uniq(a),function(d){return b.all(c,function(e){return b.indexOf(e,d)>=0})})};b.zip=function(){for(var a=b.toArray(arguments),c=b.max(b.pluck(a,"length")),d=new Array(c),e=0;e<c;e++)d[e]=b.pluck(a,String(e));return d};b.indexOf=function(a,c){if(a.indexOf)return a.indexOf(c);for(var d=0,e=a.length;d<e;d++)if(a[d]===c)return d;return-1};b.lastIndexOf=function(a,c){if(a.lastIndexOf)return a.lastIndexOf(c);for(var d=
+a.length;d--;)if(a[d]===c)return d;return-1};b.range=function(a,c,d){var e=b.toArray(arguments),f=e.length<=1;a=f?0:e[0];c=f?e[0]:e[1];d=e[2]||1;e=Math.ceil((c-a)/d);if(e<=0)return[];e=new Array(e);f=a;for(var g=0;1;f+=d){if((d>0?f-c:c-f)>=0)return e;e[g++]=f}};b.bind=function(a,c){var d=b.rest(arguments,2);return function(){return a.apply(c||j,d.concat(b.toArray(arguments)))}};b.bindAll=function(a){var c=b.rest(arguments);if(c.length==0)c=b.functions(a);b.each(c,function(d){a[d]=b.bind(a[d],a)});
+return a};b.delay=function(a,c){var d=b.rest(arguments,2);return setTimeout(function(){return a.apply(a,d)},c)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(b.rest(arguments)))};b.wrap=function(a,c){return function(){var d=[a].concat(b.toArray(arguments));return c.apply(c,d)}};b.compose=function(){var a=b.toArray(arguments);return function(){for(var c=b.toArray(arguments),d=a.length-1;d>=0;d--)c=[a[d].apply(this,c)];return c[0]}};b.keys=function(a){if(b.isArray(a))return b.range(0,a.length);
+var c=[];for(var d in a)q.call(a,d)&&c.push(d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=function(a){return b.select(b.keys(a),function(c){return b.isFunction(a[c])}).sort()};b.extend=function(a,c){for(var d in c)a[d]=c[d];return a};b.clone=function(a){if(b.isArray(a))return a.slice(0);return b.extend({},a)};b.tap=function(a,c){c(a);return a};b.isEqual=function(a,c){if(a===c)return true;var d=typeof a;if(d!=typeof c)return false;if(a==c)return true;if(!a&&c||a&&!c)return false;
+if(a.isEqual)return a.isEqual(c);if(b.isDate(a)&&b.isDate(c))return a.getTime()===c.getTime();if(b.isNaN(a)&&b.isNaN(c))return true;if(b.isRegExp(a)&&b.isRegExp(c))return a.source===c.source&&a.global===c.global&&a.ignoreCase===c.ignoreCase&&a.multiline===c.multiline;if(d!=="object")return false;if(a.length&&a.length!==c.length)return false;d=b.keys(a);var e=b.keys(c);if(d.length!=e.length)return false;for(var f in a)if(!b.isEqual(a[f],c[f]))return false;return true};b.isEmpty=function(a){return b.keys(a).length==
+0};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=function(a){return!!(a&&a.concat&&a.unshift)};b.isArguments=function(a){return a&&b.isNumber(a.length)&&!b.isArray(a)&&!r.call(a,"length")};b.isFunction=function(a){return!!(a&&a.constructor&&a.call&&a.apply)};b.isString=function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)};b.isNumber=function(a){return p.call(a)==="[object Number]"};b.isDate=function(a){return!!(a&&a.getTimezoneOffset&&a.setUTCFullYear)};b.isRegExp=function(a){return!!(a&&
+a.test&&a.exec&&(a.ignoreCase||a.ignoreCase===false))};b.isNaN=function(a){return b.isNumber(a)&&isNaN(a)};b.isNull=function(a){return a===null};b.isUndefined=function(a){return typeof a=="undefined"};b.noConflict=function(){j._=n;return this};b.identity=function(a){return a};b.breakLoop=function(){throw m;};var s=0;b.uniqueId=function(a){var c=s++;return a?a+c:c};b.template=function(a,c){a=new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+a.replace(/[\r\t\n]/g,
+" ").replace(/'(?=[^%]*%>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<%=(.+?)%>/g,"',$1,'").split("<%").join("');").split("%>").join("p.push('")+"');}return p.join('');");return c?a(c):a};b.forEach=b.each;b.foldl=b.inject=b.reduce;b.foldr=b.reduceRight;b.filter=b.select;b.every=b.all;b.some=b.any;b.head=b.first;b.tail=b.rest;b.methods=b.functions;var l=function(a,c){return c?b(a).chain():a};b.each(b.functions(b),function(a){var c=b[a];i.prototype[a]=function(){var d=b.toArray(arguments);
+o.call(d,this._wrapped);return l(c.apply(b,d),this._chain)}});b.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){c.apply(this._wrapped,arguments);return l(this._wrapped,this._chain)}});b.each(["concat","join","slice"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){return l(c.apply(this._wrapped,arguments),this._chain)}});i.prototype.chain=function(){this._chain=true;return this};i.prototype.value=function(){return this._wrapped}})();
diff --git a/lib/Mako-0.7.3/doc/_static/up-pressed.png b/lib/Mako-0.7.3/doc/_static/up-pressed.png
new file mode 100644
index 0000000000000000000000000000000000000000..8bd587afee2fe38989383ff82010147ea56b93dd
GIT binary patch
[stripped]
diff --git a/lib/Mako-0.7.3/doc/_static/up.png b/lib/Mako-0.7.3/doc/_static/up.png
new file mode 100644
index 0000000000000000000000000000000000000000..b94625680b4a4b9647c3a6f3f283776930696aa9
GIT binary patch
[stripped]
diff --git a/lib/Mako-0.7.3/doc/_static/websupport.js b/lib/Mako-0.7.3/doc/_static/websupport.js
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/_static/websupport.js
@@ -0,0 +1,808 @@
+/*
+ * websupport.js
+ * ~~~~~~~~~~~~~
+ *
+ * sphinx.websupport utilties for all documentation.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+(function($) {
+  $.fn.autogrow = function() {
+    return this.each(function() {
+    var textarea = this;
+
+    $.fn.autogrow.resize(textarea);
+
+    $(textarea)
+      .focus(function() {
+        textarea.interval = setInterval(function() {
+          $.fn.autogrow.resize(textarea);
+        }, 500);
+      })
+      .blur(function() {
+        clearInterval(textarea.interval);
+      });
+    });
+  };
+
+  $.fn.autogrow.resize = function(textarea) {
+    var lineHeight = parseInt($(textarea).css('line-height'), 10);
+    var lines = textarea.value.split('\n');
+    var columns = textarea.cols;
+    var lineCount = 0;
+    $.each(lines, function() {
+      lineCount += Math.ceil(this.length / columns) || 1;
+    });
+    var height = lineHeight * (lineCount + 1);
+    $(textarea).css('height', height);
+  };
+})(jQuery);
+
+(function($) {
+  var comp, by;
+
+  function init() {
+    initEvents();
+    initComparator();
+  }
+
+  function initEvents() {
+    $('a.comment-close').live("click", function(event) {
+      event.preventDefault();
+      hide($(this).attr('id').substring(2));
+    });
+    $('a.vote').live("click", function(event) {
+      event.preventDefault();
+      handleVote($(this));
+    });
+    $('a.reply').live("click", function(event) {
+      event.preventDefault();
+      openReply($(this).attr('id').substring(2));
+    });
+    $('a.close-reply').live("click", function(event) {
+      event.preventDefault();
+      closeReply($(this).attr('id').substring(2));
+    });
+    $('a.sort-option').live("click", function(event) {
+      event.preventDefault();
+      handleReSort($(this));
+    });
+    $('a.show-proposal').live("click", function(event) {
+      event.preventDefault();
+      showProposal($(this).attr('id').substring(2));
+    });
+    $('a.hide-proposal').live("click", function(event) {
+      event.preventDefault();
+      hideProposal($(this).attr('id').substring(2));
+    });
+    $('a.show-propose-change').live("click", function(event) {
+      event.preventDefault();
+      showProposeChange($(this).attr('id').substring(2));
+    });
+    $('a.hide-propose-change').live("click", function(event) {
+      event.preventDefault();
+      hideProposeChange($(this).attr('id').substring(2));
+    });
+    $('a.accept-comment').live("click", function(event) {
+      event.preventDefault();
+      acceptComment($(this).attr('id').substring(2));
+    });
+    $('a.delete-comment').live("click", function(event) {
+      event.preventDefault();
+      deleteComment($(this).attr('id').substring(2));
+    });
+    $('a.comment-markup').live("click", function(event) {
+      event.preventDefault();
+      toggleCommentMarkupBox($(this).attr('id').substring(2));
+    });
+  }
+
+  /**
+   * Set comp, which is a comparator function used for sorting and
+   * inserting comments into the list.
+   */
+  function setComparator() {
+    // If the first three letters are "asc", sort in ascending order
+    // and remove the prefix.
+    if (by.substring(0,3) == 'asc') {
+      var i = by.substring(3);
+      comp = function(a, b) { return a[i] - b[i]; };
+    } else {
+      // Otherwise sort in descending order.
+      comp = function(a, b) { return b[by] - a[by]; };
+    }
+
+    // Reset link styles and format the selected sort option.
+    $('a.sel').attr('href', '#').removeClass('sel');
+    $('a.by' + by).removeAttr('href').addClass('sel');
+  }
+
+  /**
+   * Create a comp function. If the user has preferences stored in
+   * the sortBy cookie, use those, otherwise use the default.
+   */
+  function initComparator() {
+    by = 'rating'; // Default to sort by rating.
+    // If the sortBy cookie is set, use that instead.
+    if (document.cookie.length > 0) {
+      var start = document.cookie.indexOf('sortBy=');
+      if (start != -1) {
+        start = start + 7;
+        var end = document.cookie.indexOf(";", start);
+        if (end == -1) {
+          end = document.cookie.length;
+          by = unescape(document.cookie.substring(start, end));
+        }
+      }
+    }
+    setComparator();
+  }
+
+  /**
+   * Show a comment div.
+   */
+  function show(id) {
+    $('#ao' + id).hide();
+    $('#ah' + id).show();
+    var context = $.extend({id: id}, opts);
+    var popup = $(renderTemplate(popupTemplate, context)).hide();
+    popup.find('textarea[name="proposal"]').hide();
+    popup.find('a.by' + by).addClass('sel');
+    var form = popup.find('#cf' + id);
+    form.submit(function(event) {
+      event.preventDefault();
+      addComment(form);
+    });
+    $('#s' + id).after(popup);
+    popup.slideDown('fast', function() {
+      getComments(id);
+    });
+  }
+
+  /**
+   * Hide a comment div.
+   */
+  function hide(id) {
+    $('#ah' + id).hide();
+    $('#ao' + id).show();
+    var div = $('#sc' + id);
+    div.slideUp('fast', function() {
+      div.remove();
+    });
+  }
+
+  /**
+   * Perform an ajax request to get comments for a node
+   * and insert the comments into the comments tree.
+   */
+  function getComments(id) {
+    $.ajax({
+     type: 'GET',
+     url: opts.getCommentsURL,
+     data: {node: id},
+     success: function(data, textStatus, request) {
+       var ul = $('#cl' + id);
+       var speed = 100;
+       $('#cf' + id)
+         .find('textarea[name="proposal"]')
+         .data('source', data.source);
+
+       if (data.comments.length === 0) {
+         ul.html('<li>No comments yet.</li>');
+         ul.data('empty', true);
+       } else {
+         // If there are comments, sort them and put them in the list.
+         var comments = sortComments(data.comments);
+         speed = data.comments.length * 100;
+         appendComments(comments, ul);
+         ul.data('empty', false);
+       }
+       $('#cn' + id).slideUp(speed + 200);
+       ul.slideDown(speed);
+     },
+     error: function(request, textStatus, error) {
+       showError('Oops, there was a problem retrieving the comments.');
+     },
+     dataType: 'json'
+    });
+  }
+
+  /**
+   * Add a comment via ajax and insert the comment into the comment tree.
+   */
+  function addComment(form) {
+    var node_id = form.find('input[name="node"]').val();
+    var parent_id = form.find('input[name="parent"]').val();
+    var text = form.find('textarea[name="comment"]').val();
+    var proposal = form.find('textarea[name="proposal"]').val();
+
+    if (text == '') {
+      showError('Please enter a comment.');
+      return;
+    }
+
+    // Disable the form that is being submitted.
+    form.find('textarea,input').attr('disabled', 'disabled');
+
+    // Send the comment to the server.
+    $.ajax({
+      type: "POST",
+      url: opts.addCommentURL,
+      dataType: 'json',
+      data: {
+        node: node_id,
+        parent: parent_id,
+        text: text,
+        proposal: proposal
+      },
+      success: function(data, textStatus, error) {
+        // Reset the form.
+        if (node_id) {
+          hideProposeChange(node_id);
+        }
+        form.find('textarea')
+          .val('')
+          .add(form.find('input'))
+          .removeAttr('disabled');
+	var ul = $('#cl' + (node_id || parent_id));
+        if (ul.data('empty')) {
+          $(ul).empty();
+          ul.data('empty', false);
+        }
+        insertComment(data.comment);
+        var ao = $('#ao' + node_id);
+        ao.find('img').attr({'src': opts.commentBrightImage});
+        if (node_id) {
+          // if this was a "root" comment, remove the commenting box
+          // (the user can get it back by reopening the comment popup)
+          $('#ca' + node_id).slideUp();
+        }
+      },
+      error: function(request, textStatus, error) {
+        form.find('textarea,input').removeAttr('disabled');
+        showError('Oops, there was a problem adding the comment.');
+      }
+    });
+  }
+
+  /**
+   * Recursively append comments to the main comment list and children
+   * lists, creating the comment tree.
+   */
+  function appendComments(comments, ul) {
+    $.each(comments, function() {
+      var div = createCommentDiv(this);
+      ul.append($(document.createElement('li')).html(div));
+      appendComments(this.children, div.find('ul.comment-children'));
+      // To avoid stagnating data, don't store the comments children in data.
+      this.children = null;
+      div.data('comment', this);
+    });
+  }
+
+  /**
+   * After adding a new comment, it must be inserted in the correct
+   * location in the comment tree.
+   */
+  function insertComment(comment) {
+    var div = createCommentDiv(comment);
+
+    // To avoid stagnating data, don't store the comments children in data.
+    comment.children = null;
+    div.data('comment', comment);
+
+    var ul = $('#cl' + (comment.node || comment.parent));
+    var siblings = getChildren(ul);
+
+    var li = $(document.createElement('li'));
+    li.hide();
+
+    // Determine where in the parents children list to insert this comment.
+    for(i=0; i < siblings.length; i++) {
+      if (comp(comment, siblings[i]) <= 0) {
+        $('#cd' + siblings[i].id)
+          .parent()
+          .before(li.html(div));
+        li.slideDown('fast');
+        return;
+      }
+    }
+
+    // If we get here, this comment rates lower than all the others,
+    // or it is the only comment in the list.
+    ul.append(li.html(div));
+    li.slideDown('fast');
+  }
+
+  function acceptComment(id) {
+    $.ajax({
+      type: 'POST',
+      url: opts.acceptCommentURL,
+      data: {id: id},
+      success: function(data, textStatus, request) {
+        $('#cm' + id).fadeOut('fast');
+        $('#cd' + id).removeClass('moderate');
+      },
+      error: function(request, textStatus, error) {
+        showError('Oops, there was a problem accepting the comment.');
+      }
+    });
+  }
+
+  function deleteComment(id) {
+    $.ajax({
+      type: 'POST',
+      url: opts.deleteCommentURL,
+      data: {id: id},
+      success: function(data, textStatus, request) {
+        var div = $('#cd' + id);
+        if (data == 'delete') {
+          // Moderator mode: remove the comment and all children immediately
+          div.slideUp('fast', function() {
+            div.remove();
+          });
+          return;
+        }
+        // User mode: only mark the comment as deleted
+        div
+          .find('span.user-id:first')
+          .text('[deleted]').end()
+          .find('div.comment-text:first')
+          .text('[deleted]').end()
+          .find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
+                ', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
+          .remove();
+        var comment = div.data('comment');
+        comment.username = '[deleted]';
+        comment.text = '[deleted]';
+        div.data('comment', comment);
+      },
+      error: function(request, textStatus, error) {
+        showError('Oops, there was a problem deleting the comment.');
+      }
+    });
+  }
+
+  function showProposal(id) {
+    $('#sp' + id).hide();
+    $('#hp' + id).show();
+    $('#pr' + id).slideDown('fast');
+  }
+
+  function hideProposal(id) {
+    $('#hp' + id).hide();
+    $('#sp' + id).show();
+    $('#pr' + id).slideUp('fast');
+  }
+
+  function showProposeChange(id) {
+    $('#pc' + id).hide();
+    $('#hc' + id).show();
+    var textarea = $('#pt' + id);
+    textarea.val(textarea.data('source'));
+    $.fn.autogrow.resize(textarea[0]);
+    textarea.slideDown('fast');
+  }
+
+  function hideProposeChange(id) {
+    $('#hc' + id).hide();
+    $('#pc' + id).show();
+    var textarea = $('#pt' + id);
+    textarea.val('').removeAttr('disabled');
+    textarea.slideUp('fast');
+  }
+
+  function toggleCommentMarkupBox(id) {
+    $('#mb' + id).toggle();
+  }
+
+  /** Handle when the user clicks on a sort by link. */
+  function handleReSort(link) {
+    var classes = link.attr('class').split(/\s+/);
+    for (var i=0; i<classes.length; i++) {
+      if (classes[i] != 'sort-option') {
+	by = classes[i].substring(2);
+      }
+    }
+    setComparator();
+    // Save/update the sortBy cookie.
+    var expiration = new Date();
+    expiration.setDate(expiration.getDate() + 365);
+    document.cookie= 'sortBy=' + escape(by) +
+                     ';expires=' + expiration.toUTCString();
+    $('ul.comment-ul').each(function(index, ul) {
+      var comments = getChildren($(ul), true);
+      comments = sortComments(comments);
+      appendComments(comments, $(ul).empty());
+    });
+  }
+
+  /**
+   * Function to process a vote when a user clicks an arrow.
+   */
+  function handleVote(link) {
+    if (!opts.voting) {
+      showError("You'll need to login to vote.");
+      return;
+    }
+
+    var id = link.attr('id');
+    if (!id) {
+      // Didn't click on one of the voting arrows.
+      return;
+    }
+    // If it is an unvote, the new vote value is 0,
+    // Otherwise it's 1 for an upvote, or -1 for a downvote.
+    var value = 0;
+    if (id.charAt(1) != 'u') {
+      value = id.charAt(0) == 'u' ? 1 : -1;
+    }
+    // The data to be sent to the server.
+    var d = {
+      comment_id: id.substring(2),
+      value: value
+    };
+
+    // Swap the vote and unvote links.
+    link.hide();
+    $('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
+      .show();
+
+    // The div the comment is displayed in.
+    var div = $('div#cd' + d.comment_id);
+    var data = div.data('comment');
+
+    // If this is not an unvote, and the other vote arrow has
+    // already been pressed, unpress it.
+    if ((d.value !== 0) && (data.vote === d.value * -1)) {
+      $('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
+      $('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
+    }
+
+    // Update the comments rating in the local data.
+    data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
+    data.vote = d.value;
+    div.data('comment', data);
+
+    // Change the rating text.
+    div.find('.rating:first')
+      .text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
+
+    // Send the vote information to the server.
+    $.ajax({
+      type: "POST",
+      url: opts.processVoteURL,
+      data: d,
+      error: function(request, textStatus, error) {
+        showError('Oops, there was a problem casting that vote.');
+      }
+    });
+  }
+
+  /**
+   * Open a reply form used to reply to an existing comment.
+   */
+  function openReply(id) {
+    // Swap out the reply link for the hide link
+    $('#rl' + id).hide();
+    $('#cr' + id).show();
+
+    // Add the reply li to the children ul.
+    var div = $(renderTemplate(replyTemplate, {id: id})).hide();
+    $('#cl' + id)
+      .prepend(div)
+      // Setup the submit handler for the reply form.
+      .find('#rf' + id)
+      .submit(function(event) {
+        event.preventDefault();
+        addComment($('#rf' + id));
+        closeReply(id);
+      })
+      .find('input[type=button]')
+      .click(function() {
+        closeReply(id);
+      });
+    div.slideDown('fast', function() {
+      $('#rf' + id).find('textarea').focus();
+    });
+  }
+
+  /**
+   * Close the reply form opened with openReply.
+   */
+  function closeReply(id) {
+    // Remove the reply div from the DOM.
+    $('#rd' + id).slideUp('fast', function() {
+      $(this).remove();
+    });
+
+    // Swap out the hide link for the reply link
+    $('#cr' + id).hide();
+    $('#rl' + id).show();
+  }
+
+  /**
+   * Recursively sort a tree of comments using the comp comparator.
+   */
+  function sortComments(comments) {
+    comments.sort(comp);
+    $.each(comments, function() {
+      this.children = sortComments(this.children);
+    });
+    return comments;
+  }
+
+  /**
+   * Get the children comments from a ul. If recursive is true,
+   * recursively include childrens' children.
+   */
+  function getChildren(ul, recursive) {
+    var children = [];
+    ul.children().children("[id^='cd']")
+      .each(function() {
+        var comment = $(this).data('comment');
+        if (recursive)
+          comment.children = getChildren($(this).find('#cl' + comment.id), true);
+        children.push(comment);
+      });
+    return children;
+  }
+
+  /** Create a div to display a comment in. */
+  function createCommentDiv(comment) {
+    if (!comment.displayed && !opts.moderator) {
+      return $('<div class="moderate">Thank you!  Your comment will show up '
+               + 'once it is has been approved by a moderator.</div>');
+    }
+    // Prettify the comment rating.
+    comment.pretty_rating = comment.rating + ' point' +
+      (comment.rating == 1 ? '' : 's');
+    // Make a class (for displaying not yet moderated comments differently)
+    comment.css_class = comment.displayed ? '' : ' moderate';
+    // Create a div for this comment.
+    var context = $.extend({}, opts, comment);
+    var div = $(renderTemplate(commentTemplate, context));
+
+    // If the user has voted on this comment, highlight the correct arrow.
+    if (comment.vote) {
+      var direction = (comment.vote == 1) ? 'u' : 'd';
+      div.find('#' + direction + 'v' + comment.id).hide();
+      div.find('#' + direction + 'u' + comment.id).show();
+    }
+
+    if (opts.moderator || comment.text != '[deleted]') {
+      div.find('a.reply').show();
+      if (comment.proposal_diff)
+        div.find('#sp' + comment.id).show();
+      if (opts.moderator && !comment.displayed)
+        div.find('#cm' + comment.id).show();
+      if (opts.moderator || (opts.username == comment.username))
+        div.find('#dc' + comment.id).show();
+    }
+    return div;
+  }
+
+  /**
+   * A simple template renderer. Placeholders such as <%id%> are replaced
+   * by context['id'] with items being escaped. Placeholders such as <#id#>
+   * are not escaped.
+   */
+  function renderTemplate(template, context) {
+    var esc = $(document.createElement('div'));
+
+    function handle(ph, escape) {
+      var cur = context;
+      $.each(ph.split('.'), function() {
+        cur = cur[this];
+      });
+      return escape ? esc.text(cur || "").html() : cur;
+    }
+
+    return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
+      return handle(arguments[2], arguments[1] == '%' ? true : false);
+    });
+  }
+
+  /** Flash an error message briefly. */
+  function showError(message) {
+    $(document.createElement('div')).attr({'class': 'popup-error'})
+      .append($(document.createElement('div'))
+               .attr({'class': 'error-message'}).text(message))
+      .appendTo('body')
+      .fadeIn("slow")
+      .delay(2000)
+      .fadeOut("slow");
+  }
+
+  /** Add a link the user uses to open the comments popup. */
+  $.fn.comment = function() {
+    return this.each(function() {
+      var id = $(this).attr('id').substring(1);
+      var count = COMMENT_METADATA[id];
+      var title = count + ' comment' + (count == 1 ? '' : 's');
+      var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
+      var addcls = count == 0 ? ' nocomment' : '';
+      $(this)
+        .append(
+          $(document.createElement('a')).attr({
+            href: '#',
+            'class': 'sphinx-comment-open' + addcls,
+            id: 'ao' + id
+          })
+            .append($(document.createElement('img')).attr({
+              src: image,
+              alt: 'comment',
+              title: title
+            }))
+            .click(function(event) {
+              event.preventDefault();
+              show($(this).attr('id').substring(2));
+            })
+        )
+        .append(
+          $(document.createElement('a')).attr({
+            href: '#',
+            'class': 'sphinx-comment-close hidden',
+            id: 'ah' + id
+          })
+            .append($(document.createElement('img')).attr({
+              src: opts.closeCommentImage,
+              alt: 'close',
+              title: 'close'
+            }))
+            .click(function(event) {
+              event.preventDefault();
+              hide($(this).attr('id').substring(2));
+            })
+        );
+    });
+  };
+
+  var opts = {
+    processVoteURL: '/_process_vote',
+    addCommentURL: '/_add_comment',
+    getCommentsURL: '/_get_comments',
+    acceptCommentURL: '/_accept_comment',
+    deleteCommentURL: '/_delete_comment',
+    commentImage: '/static/_static/comment.png',
+    closeCommentImage: '/static/_static/comment-close.png',
+    loadingImage: '/static/_static/ajax-loader.gif',
+    commentBrightImage: '/static/_static/comment-bright.png',
+    upArrow: '/static/_static/up.png',
+    downArrow: '/static/_static/down.png',
+    upArrowPressed: '/static/_static/up-pressed.png',
+    downArrowPressed: '/static/_static/down-pressed.png',
+    voting: false,
+    moderator: false
+  };
+
+  if (typeof COMMENT_OPTIONS != "undefined") {
+    opts = jQuery.extend(opts, COMMENT_OPTIONS);
+  }
+
+  var popupTemplate = '\
+    <div class="sphinx-comments" id="sc<%id%>">\
+      <p class="sort-options">\
+        Sort by:\
+        <a href="#" class="sort-option byrating">best rated</a>\
+        <a href="#" class="sort-option byascage">newest</a>\
+        <a href="#" class="sort-option byage">oldest</a>\
+      </p>\
+      <div class="comment-header">Comments</div>\
+      <div class="comment-loading" id="cn<%id%>">\
+        loading comments... <img src="<%loadingImage%>" alt="" /></div>\
+      <ul id="cl<%id%>" class="comment-ul"></ul>\
+      <div id="ca<%id%>">\
+      <p class="add-a-comment">Add a comment\
+        (<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
+      <div class="comment-markup-box" id="mb<%id%>">\
+        reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
+        <tt>``code``</tt>, \
+        code blocks: <tt>::</tt> and an indented block after blank line</div>\
+      <form method="post" id="cf<%id%>" class="comment-form" action="">\
+        <textarea name="comment" cols="80"></textarea>\
+        <p class="propose-button">\
+          <a href="#" id="pc<%id%>" class="show-propose-change">\
+            Propose a change ▹\
+          </a>\
+          <a href="#" id="hc<%id%>" class="hide-propose-change">\
+            Propose a change ▿\
+          </a>\
+        </p>\
+        <textarea name="proposal" id="pt<%id%>" cols="80"\
+                  spellcheck="false"></textarea>\
+        <input type="submit" value="Add comment" />\
+        <input type="hidden" name="node" value="<%id%>" />\
+        <input type="hidden" name="parent" value="" />\
+      </form>\
+      </div>\
+    </div>';
+
+  var commentTemplate = '\
+    <div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
+      <div class="vote">\
+        <div class="arrow">\
+          <a href="#" id="uv<%id%>" class="vote" title="vote up">\
+            <img src="<%upArrow%>" />\
+          </a>\
+          <a href="#" id="uu<%id%>" class="un vote" title="vote up">\
+            <img src="<%upArrowPressed%>" />\
+          </a>\
+        </div>\
+        <div class="arrow">\
+          <a href="#" id="dv<%id%>" class="vote" title="vote down">\
+            <img src="<%downArrow%>" id="da<%id%>" />\
+          </a>\
+          <a href="#" id="du<%id%>" class="un vote" title="vote down">\
+            <img src="<%downArrowPressed%>" />\
+          </a>\
+        </div>\
+      </div>\
+      <div class="comment-content">\
+        <p class="tagline comment">\
+          <span class="user-id"><%username%></span>\
+          <span class="rating"><%pretty_rating%></span>\
+          <span class="delta"><%time.delta%></span>\
+        </p>\
+        <div class="comment-text comment"><#text#></div>\
+        <p class="comment-opts comment">\
+          <a href="#" class="reply hidden" id="rl<%id%>">reply ▹</a>\
+          <a href="#" class="close-reply" id="cr<%id%>">reply ▿</a>\
+          <a href="#" id="sp<%id%>" class="show-proposal">proposal ▹</a>\
+          <a href="#" id="hp<%id%>" class="hide-proposal">proposal ▿</a>\
+          <a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
+          <span id="cm<%id%>" class="moderation hidden">\
+            <a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
+          </span>\
+        </p>\
+        <pre class="proposal" id="pr<%id%>">\
+<#proposal_diff#>\
+        </pre>\
+          <ul class="comment-children" id="cl<%id%>"></ul>\
+        </div>\
+        <div class="clearleft"></div>\
+      </div>\
+    </div>';
+
+  var replyTemplate = '\
+    <li>\
+      <div class="reply-div" id="rd<%id%>">\
+        <form id="rf<%id%>">\
+          <textarea name="comment" cols="80"></textarea>\
+          <input type="submit" value="Add reply" />\
+          <input type="button" value="Cancel" />\
+          <input type="hidden" name="parent" value="<%id%>" />\
+          <input type="hidden" name="node" value="" />\
+        </form>\
+      </div>\
+    </li>';
+
+  $(document).ready(function() {
+    init();
+  });
+})(jQuery);
+
+$(document).ready(function() {
+  // add comment anchors for all paragraphs that are commentable
+  $('.sphinx-has-comment').comment();
+
+  // highlight search words in search results
+  $("div.context").each(function() {
+    var params = $.getQueryParameters();
+    var terms = (params.q) ? params.q[0].split(/\s+/) : [];
+    var result = $(this);
+    $.each(terms, function() {
+      result.highlightText(this.toLowerCase(), 'highlighted');
+    });
+  });
+
+  // directly open comment window if requested
+  var anchor = document.location.hash;
+  if (anchor.substring(0, 9) == '#comment-') {
+    $('#ao' + anchor.substring(9)).click();
+    document.location.hash = '#s' + anchor.substring(9);
+  }
+});
diff --git a/lib/Mako-0.7.3/doc/build/Makefile b/lib/Mako-0.7.3/doc/build/Makefile
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/Makefile
@@ -0,0 +1,137 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = output
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest dist-html site-mako
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dist-html  same as html, but places files in /doc"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	-rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html -A mako_layout=html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dist-html:
+	$(SPHINXBUILD) -b html -A mako_layout=html $(ALLSPHINXOPTS) ..
+	@echo
+	@echo "Build finished.  The HTML pages are in ../."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/SQLAlchemy.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/SQLAlchemy.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/SQLAlchemy"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/SQLAlchemy"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	cp texinputs/* $(BUILDDIR)/latex/
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	make -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) .
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/lib/Mako-0.7.3/doc/build/builder/__init__.py b/lib/Mako-0.7.3/doc/build/builder/__init__.py
new file mode 100644
diff --git a/lib/Mako-0.7.3/doc/build/builder/builders.py b/lib/Mako-0.7.3/doc/build/builder/builders.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/builder/builders.py
@@ -0,0 +1,97 @@
+from sphinx.application import TemplateBridge
+from sphinx.builders.html import StandaloneHTMLBuilder
+from sphinx.highlighting import PygmentsBridge
+from sphinx.jinja2glue import BuiltinTemplateLoader
+from pygments import highlight
+from pygments.lexer import RegexLexer, bygroups, using
+from pygments.token import *
+from pygments.filter import Filter, apply_filters
+from pygments.lexers import PythonLexer, PythonConsoleLexer
+from pygments.formatters import HtmlFormatter, LatexFormatter
+import re
+import os
+from mako.lookup import TemplateLookup
+from mako.template import Template
+from mako.ext.pygmentplugin import MakoLexer
+
+rtd = os.environ.get('READTHEDOCS', None) == 'True'
+
+class MakoBridge(TemplateBridge):
+    def init(self, builder, *args, **kw):
+        self.jinja2_fallback = BuiltinTemplateLoader()
+        self.jinja2_fallback.init(builder, *args, **kw)
+
+        builder.config.html_context['site_base'] = builder.config['site_base']
+
+        self.lookup = TemplateLookup(
+            directories=builder.config.templates_path,
+            imports=[
+                "from builder import util"
+            ]
+        )
+
+    def render(self, template, context):
+        template = template.replace(".html", ".mako")
+        context['prevtopic'] = context.pop('prev', None)
+        context['nexttopic'] = context.pop('next', None)
+
+        # RTD layout
+        if rtd:
+            # add variables if not present, such 
+            # as if local test of READTHEDOCS variable
+            if 'MEDIA_URL' not in context:
+                context['MEDIA_URL'] = "http://media.readthedocs.org/"
+            if 'slug' not in context:
+                context['slug'] = "mako-test-slug"
+            if 'url' not in context:
+                context['url'] = "/some/test/url"
+            if 'current_version' not in context:
+                context['current_version'] = "some_version"
+            if 'versions' not in context:
+                context['versions'] = [('default', '/default/')]
+
+            context['docs_base'] = "http://readthedocs.org"
+            context['toolbar'] = True
+            context['layout'] = "rtd_layout.mako"
+            context['pdf_url'] = "%spdf/%s/%s/%s.pdf" % (
+                    context['MEDIA_URL'],
+                    context['slug'],
+                    context['current_version'],
+                    context['slug']
+            )
+        # local docs layout
+        else:
+            context['toolbar'] = False
+            context['docs_base'] = "/"
+            context['layout'] = "layout.mako"
+
+        context.setdefault('_', lambda x:x)
+        return self.lookup.get_template(template).render_unicode(**context)
+
+    def render_string(self, template, context):
+        # this is used for  .js, .css etc. and we don't have
+        # local copies of that stuff here so use the jinja render.
+        return self.jinja2_fallback.render_string(template, context)
+
+class StripDocTestFilter(Filter):
+    def filter(self, lexer, stream):
+        for ttype, value in stream:
+            if ttype is Token.Comment and re.match(r'#\s*doctest:', value):
+                continue
+            yield ttype, value
+
+
+def autodoc_skip_member(app, what, name, obj, skip, options):
+    if what == 'class' and skip and name == '__init__':
+        return False
+    else:
+        return skip
+
+def setup(app):
+#    app.connect('autodoc-skip-member', autodoc_skip_member)
+    # Mako is already in Pygments, adding the local
+    # lexer here so that the latest syntax is available
+    app.add_lexer('mako', MakoLexer())
+    app.add_config_value('site_base', "", True)
+ 
+ 
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/doc/build/builder/util.py b/lib/Mako-0.7.3/doc/build/builder/util.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/builder/util.py
@@ -0,0 +1,12 @@
+import re
+
+def striptags(text):
+    return re.compile(r'<[^>]*>').sub('', text)
+
+def go(m):
+    # .html with no anchor if present, otherwise "#" for top of page
+    return m.group(1) or '#'
+ 
+def strip_toplevel_anchors(text):
+    return re.compile(r'(\.html)?#[-\w]+-toplevel').sub(go, text)
+ 
diff --git a/lib/Mako-0.7.3/doc/build/caching.rst b/lib/Mako-0.7.3/doc/build/caching.rst
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/caching.rst
@@ -0,0 +1,393 @@
+.. _caching_toplevel:
+
+=======
+Caching
+=======
+
+Any template or component can be cached using the ``cache``
+argument to the ``<%page>``, ``<%def>`` or ``<%block>`` directives:
+
+.. sourcecode:: mako
+
+    <%page cached="True"/>
+
+    template text
+
+The above template, after being executed the first time, will
+store its content within a cache that by default is scoped
+within memory. Subsequent calls to the template's :meth:`~.Template.render`
+method will return content directly from the cache. When the
+:class:`.Template` object itself falls out of scope, its corresponding
+cache is garbage collected along with the template.
+
+By default, caching requires that the `Beaker <http://beaker.readthedocs.org/>`_ package be installed on the
+system, however the mechanism of caching can be customized to use
+any third party or user defined system -- see :ref:`cache_plugins`.
+
+In addition to being available on the ``<%page>`` tag, the caching flag and all
+its options can be used with the ``<%def>`` tag as well:
+
+.. sourcecode:: mako
+
+    <%def name="mycomp" cached="True" cache_timeout="60">
+        other text
+    </%def>
+
+... and equivalently with the ``<%block>`` tag, anonymous or named:
+
+.. sourcecode:: mako
+
+    <%block cached="True" cache_timeout="60">
+        other text
+    </%block>
+
+Cache Arguments
+===============
+
+Mako has two cache arguments available on tags that are
+available in all cases.   The rest of the arguments
+available are specific to a backend.
+
+The two generic tags arguments are:
+
+* ``cached="True"`` - enable caching for this ``<%page>``,
+  ``<%def>``, or ``<%block>``.
+* ``cache_key`` - the "key" used to uniquely identify this content
+  in the cache.   Usually, this key is chosen automatically
+  based on the name of the rendering callable (i.e. ``body``
+  when used in ``<%page>``, the name of the def when using ``<%def>``,
+  the explicit or internally-generated name when using ``<%block>``).
+  Using the ``cache_key`` parameter, the key can be overridden
+  using a fixed or programmatically generated value.
+
+  For example, here's a page
+  that caches any page which inherits from it, based on the
+  filename of the calling template:
+
+  .. sourcecode:: mako
+
+     <%page cached="True" cache_key="${self.filename}"/>
+
+     ${next.body()}
+
+     ## rest of template
+
+On a :class:`.Template` or :class:`.TemplateLookup`, the
+caching can be configured using these arguments:
+
+* ``cache_enabled`` - Setting this
+  to ``False`` will disable all caching functionality
+  when the template renders.  Defaults to ``True``.
+  e.g.:
+
+  .. sourcecode:: python
+
+      lookup = TemplateLookup(
+                      directories='/path/to/templates',
+                      cache_enabled = False
+                      )
+
+* ``cache_impl`` - The string name of the cache backend
+  to use.   This defaults to ``'beaker'``, which has historically
+  been the only cache backend supported by Mako.
+
+  .. versionadded:: 0.6.0
+
+  For example, here's how to use the upcoming
+  `dogpile.cache <http://dogpilecache.readthedocs.org>`_
+  backend:
+
+  .. sourcecode:: python
+
+      lookup = TemplateLookup(
+                      directories='/path/to/templates',
+                      cache_impl = 'dogpile.cache',
+                      cache_args = {'regions':my_dogpile_regions}
+                      )
+
+* ``cache_args`` - A dictionary of cache parameters that
+  will be consumed by the cache backend.   See
+  :ref:`beaker_backend` for examples.
+
+  .. versionadded:: 0.6.0
+
+Backend-Specific Cache Arguments
+--------------------------------
+
+The ``<%page>``, ``<%def>``, and ``<%block>`` tags
+accept any named argument that starts with the prefix ``"cache_"``.
+Those arguments are then packaged up and passed along to the
+underlying caching implementation, minus the ``"cache_"`` prefix.
+
+The actual arguments understood are determined by the backend.
+
+* :ref:`beaker_backend` - Includes arguments understood by
+  Beaker.
+* :ref:`dogpile.cache_backend` - Includes arguments understood by
+  dogpile.cache.
+
+.. _beaker_backend:
+
+Using the Beaker Cache Backend
+------------------------------
+
+When using Beaker, new implementations will want to make usage
+of **cache regions** so that cache configurations can be maintained
+externally to templates.  These configurations live under
+named "regions" that can be referred to within templates themselves.
+
+.. versionadded:: 0.6.0
+   Support for Beaker cache regions.
+
+For example, suppose we would like two regions.  One is a "short term"
+region that will store content in a memory-based dictionary,
+expiring after 60 seconds.   The other is a Memcached region,
+where values should expire in five minutes.   To configure
+our :class:`.TemplateLookup`, first we get a handle to a
+:class:`beaker.cache.CacheManager`:
+
+.. sourcecode:: python
+
+    from beaker.cache import CacheManager
+
+    manager = CacheManager(cache_regions={
+        'short_term':{
+            'type': 'memory',
+            'expire': 60
+        },
+        'long_term':{
+            'type': 'ext:memcached',
+            'url': '127.0.0.1:11211',
+            'expire': 300
+        }
+    })
+
+    lookup = TemplateLookup(
+                    directories=['/path/to/templates'],
+                    module_directory='/path/to/modules',
+                    cache_impl='beaker',
+                    cache_args={
+                        'manager':manager
+                    }
+            )
+
+Our templates can then opt to cache data in one of either region,
+using the ``cache_region`` argument.   Such as using ``short_term``
+at the ``<%page>`` level:
+
+.. sourcecode:: mako
+
+    <%page cached="True" cache_region="short_term">
+
+    ## ...
+
+Or, ``long_term`` at the ``<%block>`` level:
+
+.. sourcecode:: mako
+
+    <%block name="header" cached="True" cache_region="long_term">
+        other text
+    </%block>
+
+The Beaker backend also works without regions.   There are a
+variety of arguments that can be passed to the ``cache_args``
+dictionary, which are also allowable in templates via the
+``<%page>``, ``<%block>``,
+and ``<%def>`` tags specific to those sections.   The values
+given override those specified at the  :class:`.TemplateLookup`
+or :class:`.Template` level.
+
+With the possible exception
+of ``cache_timeout``, these arguments are probably better off
+staying at the template configuration level.  Each argument
+specified as ``cache_XYZ`` in a template tag is specified
+without the ``cache_`` prefix in the ``cache_args`` dictionary:
+
+* ``cache_timeout`` - number of seconds in which to invalidate the
+  cached data.  After this timeout, the content is re-generated
+  on the next call.  Available as ``timeout`` in the ``cache_args``
+  dictionary.
+* ``cache_type`` - type of caching. ``'memory'``, ``'file'``, ``'dbm'``, or
+  ``'ext:memcached'`` (note that  the string ``memcached`` is
+  also accepted by the dogpile.cache Mako plugin, though not by Beaker itself).
+  Available as ``type`` in the ``cache_args`` dictionary.
+* ``cache_url`` - (only used for ``memcached`` but required) a single
+  IP address or a semi-colon separated list of IP address of
+  memcache servers to use.  Available as ``url`` in the ``cache_args``
+  dictionary.
+* ``cache_dir`` - in the case of the ``'file'`` and ``'dbm'`` cache types,
+  this is the filesystem directory with which to store data
+  files. If this option is not present, the value of
+  ``module_directory`` is used (i.e. the directory where compiled
+  template modules are stored). If neither option is available
+  an exception is thrown.  Available as ``dir`` in the
+  ``cache_args`` dictionary.
+
+.. _dogpile.cache_backend:
+
+Using the dogpile.cache Backend
+-------------------------------
+
+`dogpile.cache`_ is a new replacement for Beaker.   It provides
+a modernized, slimmed down interface and is generally easier to use
+than Beaker.   As of this writing it has not yet been released.  dogpile.cache
+includes its own Mako cache plugin -- see :mod:`dogpile.cache.plugins.mako_cache` in the
+dogpile.cache documentation.
+
+Programmatic Cache Access
+=========================
+
+The :class:`.Template`, as well as any template-derived :class:`.Namespace`, has
+an accessor called ``cache`` which returns the :class:`.Cache` object
+for that template. This object is a facade on top of the underlying
+:class:`.CacheImpl` object, and provides some very rudimental
+capabilities, such as the ability to get and put arbitrary
+values:
+
+.. sourcecode:: mako
+
+    <%
+        local.cache.set("somekey", type="memory", "somevalue")
+    %>
+
+Above, the cache associated with the ``local`` namespace is
+accessed and a key is placed within a memory cache.
+
+More commonly, the ``cache`` object is used to invalidate cached
+sections programmatically:
+
+.. sourcecode:: python
+
+    template = lookup.get_template('/sometemplate.html')
+
+    # invalidate the "body" of the template
+    template.cache.invalidate_body()
+
+    # invalidate an individual def
+    template.cache.invalidate_def('somedef')
+
+    # invalidate an arbitrary key
+    template.cache.invalidate('somekey')
+
+You can access any special method or attribute of the :class:`.CacheImpl`
+itself using the :attr:`impl <.Cache.impl>` attribute:
+
+.. sourcecode:: python
+
+    template.cache.impl.do_something_special()
+
+Note that using implementation-specific methods will mean you can't
+swap in a different kind of :class:`.CacheImpl` implementation at a
+later time.
+
+.. _cache_plugins:
+
+Cache Plugins
+=============
+
+The mechanism used by caching can be plugged in
+using a :class:`.CacheImpl` subclass.    This class implements
+the rudimental methods Mako needs to implement the caching
+API.   Mako includes the :class:`.BeakerCacheImpl` class to
+provide the default implementation.  A :class:`.CacheImpl` class
+is acquired by Mako using a ``pkg_resources`` entrypoint, using
+the name given as the ``cache_impl`` argument to :class:`.Template`
+or :class:`.TemplateLookup`.    This entry point can be
+installed via the standard `setuptools`/``setup()`` procedure, underneath
+the `EntryPoint` group named ``"mako.cache"``.  It can also be
+installed at runtime via a convenience installer :func:`.register_plugin`
+which accomplishes essentially the same task.
+
+An example plugin that implements a local dictionary cache:
+
+.. sourcecode:: python
+
+    from mako.cache import Cacheimpl, register_plugin
+
+    class SimpleCacheImpl(CacheImpl):
+        def __init__(self, cache):
+            super(SimpleCacheImpl, self).__init__(cache)
+            self._cache = {}
+
+        def get_or_create(self, key, creation_function, **kw):
+            if key in self._cache:
+                return self._cache[key]
+            else:
+                self._cache[key] = value = creation_function()
+                return value
+
+        def set(self, key, value, **kwargs):
+            self._cache[key] = value
+
+        def get(self, key, **kwargs):
+            return self._cache.get(key)
+
+        def invalidate(self, key, **kwargs):
+            self._cache.pop(key, None)
+
+    # optional - register the class locally
+    register_plugin("simple", __name__, "SimpleCacheImpl")
+
+Enabling the above plugin in a template would look like:
+
+.. sourcecode:: python
+
+    t = Template("mytemplate",
+                 file="mytemplate.html",
+                 cache_impl='simple')
+
+Guidelines for Writing Cache Plugins
+------------------------------------
+
+* The :class:`.CacheImpl` is created on a per-:class:`.Template` basis.  The
+  class should ensure that only data for the parent :class:`.Template` is
+  persisted or returned by the cache methods.    The actual :class:`.Template`
+  is available via the ``self.cache.template`` attribute.   The ``self.cache.id``
+  attribute, which is essentially the unique modulename of the template, is
+  a good value to use in order to represent a unique namespace of keys specific
+  to the template.
+* Templates only use the :meth:`.CacheImpl.get_or_create()` method
+  in an implicit fashion.  The :meth:`.CacheImpl.set`,
+  :meth:`.CacheImpl.get`, and :meth:`.CacheImpl.invalidate` methods are
+  only used in response to direct programmatic access to the corresponding
+  methods on the :class:`.Cache` object.
+* :class:`.CacheImpl` will be accessed in a multithreaded fashion if the
+  :class:`.Template` itself is used multithreaded.  Care should be taken
+  to ensure caching implementations are threadsafe.
+* A library like `Dogpile <http://pypi.python.org/pypi/dogpile.core>`_, which
+  is a minimal locking system derived from Beaker, can be used to help
+  implement the :meth:`.CacheImpl.get_or_create` method in a threadsafe
+  way that can maximize effectiveness across multiple threads as well
+  as processes. :meth:`.CacheImpl.get_or_create` is the
+  key method used by templates.
+* All arguments passed to ``**kw`` come directly from the parameters
+  inside the ``<%def>``, ``<%block>``, or ``<%page>`` tags directly,
+  minus the ``"cache_"`` prefix, as strings, with the exception of
+  the argument ``cache_timeout``, which is passed to the plugin
+  as the name ``timeout`` with the value converted to an integer.
+  Arguments present in ``cache_args`` on :class:`.Template` or
+  :class:`.TemplateLookup` are passed directly, but are superseded
+  by those present in the most specific template tag.
+* The directory where :class:`.Template` places module files can
+  be acquired using the accessor ``self.cache.template.module_directory``.
+  This directory can be a good place to throw cache-related work
+  files, underneath a prefix like ``_my_cache_work`` so that name
+  conflicts with generated modules don't occur.
+
+API Reference
+=============
+
+.. autoclass:: mako.cache.Cache
+    :members:
+    :show-inheritance:
+
+.. autoclass:: mako.cache.CacheImpl
+    :members:
+    :show-inheritance:
+
+.. autofunction:: mako.cache.register_plugin
+
+.. autoclass:: mako.ext.beaker_cache.BeakerCacheImpl
+    :members:
+    :show-inheritance:
+
diff --git a/lib/Mako-0.7.3/doc/build/conf.py b/lib/Mako-0.7.3/doc/build/conf.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/conf.py
@@ -0,0 +1,287 @@
+# -*- coding: utf-8 -*-
+#
+# Mako documentation build configuration file
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+sys.path.insert(0, os.path.abspath('../..'))
+sys.path.insert(0, os.path.abspath('.'))
+
+import mako
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+#extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode',
+#                'sphinx.ext.doctest', 'builder.builders']
+
+extensions = ['sphinx.ext.autodoc','sphinx.ext.intersphinx',
+                'sphinx.ext.doctest', 'builder.builders']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['templates']
+
+nitpicky = True
+
+site_base = "http://www.makotemplates.org"
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+template_bridge = "builder.builders.MakoBridge"
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'Mako'
+copyright = u'the Mako authors and contributors'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = mako.__version__
+# The full version, including alpha/beta/rc tags.
+release = mako.__version__
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['build']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The style sheet to use for HTML and HTML Help pages. A file of that name
+# must exist either in Sphinx' static/ path, or in one of the custom paths
+# given in html_static_path.
+html_style = 'default.css'
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+html_title = "%s %s Documentation" % (project, release)
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+html_last_updated_fmt = '%m/%d/%Y %H:%M:%S'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+html_domain_indices = False
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, the reST sources are included in the HTML build as _sources/<name>.
+#html_copy_source = True
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'Makodoc'
+
+#autoclass_content = 'both'
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+  ('index', 'mako_%s.tex' % release.replace('.', '_'), ur'Mako Documentation',
+   ur'Mike Bayer', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Additional stuff for the LaTeX preamble.
+# sets TOC depth to 2.
+latex_preamble = '\setcounter{tocdepth}{3}'
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+#latex_elements = {
+#    'papersize': 'letterpaper',
+#    'pointsize': '10pt',
+#}
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('index', 'mako', u'Mako Documentation',
+     [u'Mako authors'], 1)
+]
+
+
+# -- Options for Epub output ---------------------------------------------------
+
+# Bibliographic Dublin Core info.
+epub_title = u'Mako'
+epub_author = u'Mako authors'
+epub_publisher = u'Mako authors'
+epub_copyright = u'Mako authors'
+
+# The language of the text. It defaults to the language option
+# or en if the language is not set.
+#epub_language = ''
+
+# The scheme of the identifier. Typical schemes are ISBN or URL.
+#epub_scheme = ''
+
+# The unique identifier of the text. This can be a ISBN number
+# or the project homepage.
+#epub_identifier = ''
+
+# A unique identification for the text.
+#epub_uid = ''
+
+# HTML files that should be inserted before the pages created by sphinx.
+# The format is a list of tuples containing the path and title.
+#epub_pre_files = []
+
+# HTML files shat should be inserted after the pages created by sphinx.
+# The format is a list of tuples containing the path and title.
+#epub_post_files = []
+
+# A list of files that should not be packed into the epub file.
+#epub_exclude_files = []
+
+# The depth of the table of contents in toc.ncx.
+#epub_tocdepth = 3
+
+# Allow duplicate toc entries.
+#epub_tocdup = True
+
+intersphinx_mapping = {
+    'dogpilecache':('http://dogpilecache.readthedocs.org/en/latest', None),
+    'beaker':('http://beaker.readthedocs.org/en/latest',None),
+}
diff --git a/lib/Mako-0.7.3/doc/build/defs.rst b/lib/Mako-0.7.3/doc/build/defs.rst
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/defs.rst
@@ -0,0 +1,622 @@
+.. _defs_toplevel:
+
+===============
+Defs and Blocks
+===============
+
+``<%def>`` and ``<%block>`` are two tags that both demarcate any block of text
+and/or code.   They both exist within generated Python as a callable function,
+i.e., a Python ``def``.   They differ in their scope and calling semantics.
+Whereas ``<%def>`` provides a construct that is very much like a named Python
+``def``, the ``<%block>`` is more layout oriented.
+
+Using Defs
+==========
+
+The ``<%def>`` tag requires a ``name`` attribute, where the ``name`` references
+a Python function signature:
+
+.. sourcecode:: mako
+
+    <%def name="hello()">
+        hello world
+    </%def>
+
+To invoke the ``<%def>``, it is normally called as an expression:
+
+.. sourcecode:: mako
+
+    the def:  ${hello()}
+
+If the ``<%def>`` is not nested inside of another ``<%def>``,
+it's known as a **top level def** and can be accessed anywhere in
+the template, including above where it was defined.
+
+All defs, top level or not, have access to the current
+contextual namespace in exactly the same way their containing
+template does. Suppose the template below is executed with the
+variables ``username`` and ``accountdata`` inside the context:
+
+.. sourcecode:: mako
+
+    Hello there ${username}, how are ya.  Lets see what your account says:
+
+    ${account()}
+
+    <%def name="account()">
+        Account for ${username}:<br/>
+
+        % for row in accountdata:
+            Value: ${row}<br/>
+        % endfor
+    </%def>
+
+The ``username`` and ``accountdata`` variables are present
+within the main template body as well as the body of the
+``account()`` def.
+
+Since defs are just Python functions, you can define and pass
+arguments to them as well:
+
+.. sourcecode:: mako
+
+    ${account(accountname='john')}
+
+    <%def name="account(accountname, type='regular')">
+        account name: ${accountname}, type: ${type}
+    </%def>
+
+When you declare an argument signature for your def, they are
+required to follow normal Python conventions (i.e., all
+arguments are required except keyword arguments with a default
+value). This is in contrast to using context-level variables,
+which evaluate to ``UNDEFINED`` if you reference a name that
+does not exist.
+
+Calling Defs from Other Files
+-----------------------------
+
+Top level ``<%def>``\ s are **exported** by your template's
+module, and can be called from the outside; including from other
+templates, as well as normal Python code. Calling a ``<%def>``
+from another template is something like using an ``<%include>``
+-- except you are calling a specific function within the
+template, not the whole template.
+
+The remote ``<%def>`` call is also a little bit like calling
+functions from other modules in Python. There is an "import"
+step to pull the names from another template into your own
+template; then the function or functions are available.
+
+To import another template, use the ``<%namespace>`` tag:
+
+.. sourcecode:: mako
+
+    <%namespace name="mystuff" file="mystuff.html"/>
+
+The above tag adds a local variable ``mystuff`` to the current
+scope.
+
+Then, just call the defs off of ``mystuff``:
+
+.. sourcecode:: mako
+
+    ${mystuff.somedef(x=5,y=7)}
+
+The ``<%namespace>`` tag also supports some of the other
+semantics of Python's ``import`` statement, including pulling
+names into the local variable space, or using ``*`` to represent
+all names, using the ``import`` attribute:
+
+.. sourcecode:: mako
+
+    <%namespace file="mystuff.html" import="foo, bar"/>
+
+This is just a quick intro to the concept of a **namespace**,
+which is a central Mako concept that has its own chapter in
+these docs. For more detail and examples, see
+:ref:`namespaces_toplevel`.
+
+Calling Defs Programmatically
+-----------------------------
+
+You can call defs programmatically from any :class:`.Template` object
+using the :meth:`~.Template.get_def()` method, which returns a :class:`.DefTemplate`
+object. This is a :class:`.Template` subclass which the parent
+:class:`.Template` creates, and is usable like any other template:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+
+    template = Template("""
+        <%def name="hi(name)">
+            hi ${name}!
+        </%def>
+
+        <%def name="bye(name)">
+            bye ${name}!
+        </%def>
+    """)
+
+    print template.get_def("hi").render(name="ed")
+    print template.get_def("bye").render(name="ed")
+
+Defs within Defs
+----------------
+
+The def model follows regular Python rules for closures.
+Declaring ``<%def>`` inside another ``<%def>`` declares it
+within the parent's **enclosing scope**:
+
+.. sourcecode:: mako
+
+    <%def name="mydef()">
+        <%def name="subdef()">
+            a sub def
+        </%def>
+
+        i'm the def, and the subcomponent is ${subdef()}
+    </%def>
+
+Just like Python, names that exist outside the inner ``<%def>``
+exist inside it as well:
+
+.. sourcecode:: mako
+
+    <%
+        x = 12
+    %>
+    <%def name="outer()">
+        <%
+            y = 15
+        %>
+        <%def name="inner()">
+            inner, x is ${x}, y is ${y}
+        </%def>
+
+        outer, x is ${x}, y is ${y}
+    </%def>
+
+Assigning to a name inside of a def declares that name as local
+to the scope of that def (again, like Python itself). This means
+the following code will raise an error:
+
+.. sourcecode:: mako
+
+    <%
+        x = 10
+    %>
+    <%def name="somedef()">
+        ## error !
+        somedef, x is ${x}
+        <%
+            x = 27
+        %>
+    </%def>
+
+...because the assignment to ``x`` declares ``x`` as local to the
+scope of ``somedef``, rendering the "outer" version unreachable
+in the expression that tries to render it.
+
+.. _defs_with_content:
+
+Calling a Def with Embedded Content and/or Other Defs
+-----------------------------------------------------
+
+A flip-side to def within def is a def call with content. This
+is where you call a def, and at the same time declare a block of
+content (or multiple blocks) that can be used by the def being
+called. The main point of such a call is to create custom,
+nestable tags, just like any other template language's
+custom-tag creation system -- where the external tag controls the
+execution of the nested tags and can communicate state to them.
+Only with Mako, you don't have to use any external Python
+modules, you can define arbitrarily nestable tags right in your
+templates.
+
+To achieve this, the target def is invoked using the form
+``<%namepacename:defname>`` instead of the normal ``${}``
+syntax. This syntax, introduced in Mako 0.2.3, is functionally
+equivalent to another tag known as ``%call``, which takes the form
+``<%call expr='namespacename.defname(args)'>``. While ``%call``
+is available in all versions of Mako, the newer style is
+probably more familiar looking. The ``namespace`` portion of the
+call is the name of the **namespace** in which the def is
+defined -- in the most simple cases, this can be ``local`` or
+``self`` to reference the current template's namespace (the
+difference between ``local`` and ``self`` is one of inheritance
+-- see :ref:`namespaces_builtin` for details).
+
+When the target def is invoked, a variable ``caller`` is placed
+in its context which contains another namespace containing the
+body and other defs defined by the caller. The body itself is
+referenced by the method ``body()``. Below, we build a ``%def``
+that operates upon ``caller.body()`` to invoke the body of the
+custom tag:
+
+.. sourcecode:: mako
+
+    <%def name="buildtable()">
+        <table>
+            <tr><td>
+                ${caller.body()}
+            </td></tr>
+        </table>
+    </%def>
+
+    <%self:buildtable>
+        I am the table body.
+    </%self:buildtable>
+
+This produces the output (whitespace formatted):
+
+.. sourcecode:: html
+
+    <table>
+        <tr><td>
+            I am the table body.
+        </td></tr>
+    </table>
+
+Using the older ``%call`` syntax looks like:
+
+.. sourcecode:: mako
+
+    <%def name="buildtable()">
+        <table>
+            <tr><td>
+                ${caller.body()}
+            </td></tr>
+        </table>
+    </%def>
+
+    <%call expr="buildtable()">
+        I am the table body.
+    </%call>
+
+The ``body()`` can be executed multiple times or not at all.
+This means you can use def-call-with-content to build iterators,
+conditionals, etc:
+
+.. sourcecode:: mako
+
+    <%def name="lister(count)">
+        % for x in range(count):
+            ${caller.body()}
+        % endfor
+    </%def>
+
+    <%self:lister count="${3}">
+        hi
+    </%self:lister>
+
+Produces:
+
+.. sourcecode:: html
+
+    hi
+    hi
+    hi
+
+Notice above we pass ``3`` as a Python expression, so that it
+remains as an integer.
+
+A custom "conditional" tag:
+
+.. sourcecode:: mako
+
+    <%def name="conditional(expression)">
+        % if expression:
+            ${caller.body()}
+        % endif
+    </%def>
+
+    <%self:conditional expression="${4==4}">
+        i'm the result
+    </%self:conditional>
+
+Produces:
+
+.. sourcecode:: html
+
+    i'm the result
+
+But that's not all. The ``body()`` function also can handle
+arguments, which will augment the local namespace of the body
+callable. The caller must define the arguments which it expects
+to receive from its target def using the ``args`` attribute,
+which is a comma-separated list of argument names. Below, our
+``<%def>`` calls the ``body()`` of its caller, passing in an
+element of data from its argument:
+
+.. sourcecode:: mako
+
+    <%def name="layoutdata(somedata)">
+        <table>
+        % for item in somedata:
+            <tr>
+            % for col in item:
+                <td>${caller.body(col=col)}</td>
+            % endfor
+            </tr>
+        % endfor
+        </table>
+    </%def>
+
+    <%self:layoutdata somedata="${[[1,2,3],[4,5,6],[7,8,9]]}" args="col">\
+    Body data: ${col}\
+    </%self:layoutdata>
+
+Produces:
+
+.. sourcecode:: html
+
+    <table>
+        <tr>
+            <td>Body data: 1</td>
+            <td>Body data: 2</td>
+            <td>Body data: 3</td>
+        </tr>
+        <tr>
+            <td>Body data: 4</td>
+            <td>Body data: 5</td>
+            <td>Body data: 6</td>
+        </tr>
+        <tr>
+            <td>Body data: 7</td>
+            <td>Body data: 8</td>
+            <td>Body data: 9</td>
+        </tr>
+    </table>
+
+You don't have to stick to calling just the ``body()`` function.
+The caller can define any number of callables, allowing the
+``<%call>`` tag to produce whole layouts:
+
+.. sourcecode:: mako
+
+    <%def name="layout()">
+        ## a layout def
+        <div class="mainlayout">
+            <div class="header">
+                ${caller.header()}
+            </div>
+
+            <div class="sidebar">
+                ${caller.sidebar()}
+            </div>
+
+            <div class="content">
+                ${caller.body()}
+            </div>
+        </div>
+    </%def>
+
+    ## calls the layout def
+    <%self:layout>
+        <%def name="header()">
+            I am the header
+        </%def>
+        <%def name="sidebar()">
+            <ul>
+                <li>sidebar 1</li>
+                <li>sidebar 2</li>
+            </ul>
+        </%def>
+
+            this is the body
+    </%self:layout>
+
+The above layout would produce:
+
+.. sourcecode:: html
+
+    <div class="mainlayout">
+        <div class="header">
+        I am the header
+        </div>
+
+        <div class="sidebar">
+        <ul>
+            <li>sidebar 1</li>
+            <li>sidebar 2</li>
+        </ul>
+        </div>
+
+        <div class="content">
+        this is the body
+        </div>
+    </div>
+
+The number of things you can do with ``<%call>`` and/or the
+``<%namespacename:defname>`` calling syntax is enormous. You can
+create form widget libraries, such as an enclosing ``<FORM>``
+tag and nested HTML input elements, or portable wrapping schemes
+using ``<div>`` or other elements. You can create tags that
+interpret rows of data, such as from a database, providing the
+individual columns of each row to a ``body()`` callable which
+lays out the row any way it wants. Basically anything you'd do
+with a "custom tag" or tag library in some other system, Mako
+provides via ``<%def>`` tags and plain Python callables which are
+invoked via ``<%namespacename:defname>`` or ``<%call>``.
+
+.. _blocks:
+
+Using Blocks
+============
+
+The ``<%block>`` tag introduces some new twists on the
+``<%def>`` tag which make it more closely tailored towards layout.
+
+.. versionadded:: 0.4.1
+
+An example of a block:
+
+.. sourcecode:: mako
+
+    <html>
+        <body>
+            <%block>
+                this is a block.
+            </%block>
+        </body>
+    </html>
+
+In the above example, we define a simple block.  The block renders its content in the place
+that it's defined.  Since the block is called for us, it doesn't need a name and the above
+is referred to as an **anonymous block**.  So the output of the above template will be:
+
+.. sourcecode:: html
+
+    <html>
+        <body>
+                this is a block.
+        </body>
+    </html>
+
+So in fact the above block has absolutely no effect.  Its usefulness comes when we start
+using modifiers.  Such as, we can apply a filter to our block:
+
+.. sourcecode:: mako
+
+    <html>
+        <body>
+            <%block filter="h">
+                <html>this is some escaped html.</html>
+            </%block>
+        </body>
+    </html>
+
+or perhaps a caching directive:
+
+.. sourcecode:: mako
+
+    <html>
+        <body>
+            <%block cached="True" cache_timeout="60">
+                This content will be cached for 60 seconds.
+            </%block>
+        </body>
+    </html>
+
+Blocks also work in iterations, conditionals, just like defs:
+
+.. sourcecode:: mako
+
+    % if some_condition:
+        <%block>condition is met</%block>
+    % endif
+
+While the block renders at the point it is defined in the template,
+the underlying function is present in the generated Python code only
+once, so there's no issue with placing a block inside of a loop or
+similar. Anonymous blocks are defined as closures in the local
+rendering body, so have access to local variable scope:
+
+.. sourcecode:: mako
+
+    % for i in range(1, 4):
+        <%block>i is ${i}</%block>
+    % endfor
+
+Using Named Blocks
+------------------
+
+Possibly the more important area where blocks are useful is when we
+do actually give them names. Named blocks are tailored to behave
+somewhat closely to Jinja2's block tag, in that they define an area
+of a layout which can be overridden by an inheriting template. In
+sharp contrast to the ``<%def>`` tag, the name given to a block is
+global for the entire template regardless of how deeply it's nested:
+
+.. sourcecode:: mako
+
+    <html>
+    <%block name="header">
+        <head>
+            <title>
+                <%block name="title">Title</%block>
+            </title>
+        </head>
+    </%block>
+    <body>
+        ${next.body()}
+    </body>
+    </html>
+
+The above example has two named blocks "``header``" and "``title``", both of which can be referred to
+by an inheriting template. A detailed walkthrough of this usage can be found at :ref:`inheritance_toplevel`.
+
+Note above that named blocks don't have any argument declaration the way defs do. They still implement themselves
+as Python functions, however, so they can be invoked additional times beyond their initial definition:
+
+.. sourcecode:: mako
+
+    <div name="page">
+        <%block name="pagecontrol">
+            <a href="">previous page</a> |
+            <a href="">next page</a>
+        </%block>
+
+        <table>
+            ## some content
+        </table>
+
+        ${pagecontrol()}
+    </div>
+
+The content referenced by ``pagecontrol`` above will be rendered both above and below the ``<table>`` tags.
+
+To keep things sane, named blocks have restrictions that defs do not:
+
+* The ``<%block>`` declaration cannot have any argument signature.
+* The name of a ``<%block>`` can only be defined once in a template -- an error is raised if two blocks of the same
+  name occur anywhere in a single template, regardless of nesting.  A similar error is raised if a top level def
+  shares the same name as that of a block.
+* A named ``<%block>`` cannot be defined within a ``<%def>``, or inside the body of a "call", i.e.
+  ``<%call>`` or ``<%namespacename:defname>`` tag.  Anonymous blocks can, however.
+
+Using Page Arguments in Named Blocks
+------------------------------------
+
+A named block is very much like a top level def. It has a similar
+restriction to these types of defs in that arguments passed to the
+template via the ``<%page>`` tag aren't automatically available.
+Using arguments with the ``<%page>`` tag is described in the section
+:ref:`namespaces_body`, and refers to scenarios such as when the
+``body()`` method of a template is called from an inherited template passing
+arguments, or the template is invoked from an ``<%include>`` tag
+with arguments. To allow a named block to share the same arguments
+passed to the page, the ``args`` attribute can be used:
+
+.. sourcecode:: mako
+
+    <%page args="post"/>
+
+    <a name="${post.title}" />
+
+    <span class="post_prose">
+        <%block name="post_prose" args="post">
+            ${post.content}
+        </%block>
+    </span>
+
+Where above, if the template is called via a directive like
+``<%include file="post.mako" args="post=post" />``, the ``post``
+variable is available both in the main body as well as the
+``post_prose`` block.
+
+Similarly, the ``**pageargs`` variable is present, in named blocks only,
+for those arguments not explicit in the ``<%page>`` tag:
+
+.. sourcecode:: mako
+
+    <%block name="post_prose">
+        ${pageargs['post'].content}
+    </%block>
+
+The ``args`` attribute is only allowed with named blocks. With
+anonymous blocks, the Python function is always rendered in the same
+scope as the call itself, so anything available directly outside the
+anonymous block is available inside as well.
diff --git a/lib/Mako-0.7.3/doc/build/filtering.rst b/lib/Mako-0.7.3/doc/build/filtering.rst
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/filtering.rst
@@ -0,0 +1,344 @@
+.. _filtering_toplevel:
+
+=======================
+Filtering and Buffering
+=======================
+
+Expression Filtering
+====================
+
+As described in the chapter :ref:`syntax_toplevel`, the "``|``" operator can be
+applied to a "``${}``" expression to apply escape filters to the
+output:
+
+.. sourcecode:: mako
+
+    ${"this is some text" | u}
+
+The above expression applies URL escaping to the expression, and
+produces ``this+is+some+text``.
+
+The built-in escape flags are:
+
+* ``u`` : URL escaping, provided by
+  ``urllib.quote_plus(string.encode('utf-8'))``
+* ``h`` : HTML escaping, provided by
+  ``markupsafe.escape(string)``
+
+  .. versionadded:: 0.3.4
+     Prior versions use ``cgi.escape(string, True)``.
+
+* ``x`` : XML escaping
+* ``trim`` : whitespace trimming, provided by ``string.strip()``
+* ``entity`` : produces HTML entity references for applicable
+  strings, derived from ``htmlentitydefs``
+* ``unicode`` (``str`` on Python 3): produces a Python unicode
+  string (this function is applied by default)
+* ``decode.<some encoding>``: decode input into a Python
+  unicode with the specified encoding
+* ``n`` : disable all default filtering; only filters specified
+  in the local expression tag will be applied.
+
+To apply more than one filter, separate them by a comma:
+
+.. sourcecode:: mako
+
+    ${" <tag>some value</tag> " | h,trim}
+
+The above produces ``<tag>some value</tag>``, with
+no leading or trailing whitespace. The HTML escaping function is
+applied first, the "trim" function second.
+
+Naturally, you can make your own filters too. A filter is just a
+Python function that accepts a single string argument, and
+returns the filtered result. The expressions after the ``|``
+operator draw upon the local namespace of the template in which
+they appear, meaning you can define escaping functions locally:
+
+.. sourcecode:: mako
+
+    <%!
+        def myescape(text):
+            return "<TAG>" + text + "</TAG>"
+    %>
+
+    Here's some tagged text: ${"text" | myescape}
+
+Or from any Python module:
+
+.. sourcecode:: mako
+
+    <%!
+        import myfilters
+    %>
+
+    Here's some tagged text: ${"text" | myfilters.tagfilter}
+
+A page can apply a default set of filters to all expression tags
+using the ``expression_filter`` argument to the ``%page`` tag:
+
+.. sourcecode:: mako
+
+    <%page expression_filter="h"/>
+
+    Escaped text:  ${"<html>some html</html>"}
+
+Result:
+
+.. sourcecode:: html
+
+    Escaped text: <html>some html</html>
+
+.. _filtering_default_filters:
+
+The ``default_filters`` Argument
+--------------------------------
+
+In addition to the ``expression_filter`` argument, the
+``default_filters`` argument to both :class:`.Template` and
+:class:`.TemplateLookup` can specify filtering for all expression tags
+at the programmatic level. This array-based argument, when given
+its default argument of ``None``, will be internally set to
+``["unicode"]`` (or ``["str"]`` on Python 3), except when
+``disable_unicode=True`` is set in which case it defaults to
+``["str"]``:
+
+.. sourcecode:: python
+
+    t = TemplateLookup(directories=['/tmp'], default_filters=['unicode'])
+
+To replace the usual ``unicode``/``str`` function with a
+specific encoding, the ``decode`` filter can be substituted:
+
+.. sourcecode:: python
+
+    t = TemplateLookup(directories=['/tmp'], default_filters=['decode.utf8'])
+
+To disable ``default_filters`` entirely, set it to an empty
+list:
+
+.. sourcecode:: python
+
+    t = TemplateLookup(directories=['/tmp'], default_filters=[])
+
+Any string name can be added to ``default_filters`` where it
+will be added to all expressions as a filter. The filters are
+applied from left to right, meaning the leftmost filter is
+applied first.
+
+.. sourcecode:: python
+
+    t = Template(templatetext, default_filters=['unicode', 'myfilter'])
+
+To ease the usage of ``default_filters`` with custom filters,
+you can also add imports (or other code) to all templates using
+the ``imports`` argument:
+
+.. sourcecode:: python
+
+    t = TemplateLookup(directories=['/tmp'],
+                       default_filters=['unicode', 'myfilter'],
+                       imports=['from mypackage import myfilter'])
+
+The above will generate templates something like this:
+
+.. sourcecode:: python
+
+    # ....
+    from mypackage import myfilter
+
+    def render_body(context):
+        context.write(myfilter(unicode("some text")))
+
+Turning off Filtering with the ``n`` Filter
+-------------------------------------------
+
+In all cases the special ``n`` filter, used locally within an
+expression, will **disable** all filters declared in the
+``<%page>`` tag as well as in ``default_filters``. Such as:
+
+.. sourcecode:: mako
+
+    ${'myexpression' | n}
+
+will render ``myexpression`` with no filtering of any kind, and:
+
+.. sourcecode:: mako
+
+    ${'myexpression' | n,trim}
+
+will render ``myexpression`` using the ``trim`` filter only.
+
+Filtering Defs and Blocks
+=========================
+
+The ``%def`` and ``%block`` tags have an argument called ``filter`` which will apply the
+given list of filter functions to the output of the ``%def``:
+
+.. sourcecode:: mako
+
+    <%def name="foo()" filter="h, trim">
+        <b>this is bold</b>
+    </%def>
+
+When the ``filter`` attribute is applied to a def as above, the def
+is automatically **buffered** as well. This is described next.
+
+Buffering
+=========
+
+One of Mako's central design goals is speed. To this end, all of
+the textual content within a template and its various callables
+is by default piped directly to the single buffer that is stored
+within the :class:`.Context` object. While this normally is easy to
+miss, it has certain side effects. The main one is that when you
+call a def using the normal expression syntax, i.e.
+``${somedef()}``, it may appear that the return value of the
+function is the content it produced, which is then delivered to
+your template just like any other expression substitution,
+except that normally, this is not the case; the return value of
+``${somedef()}`` is simply the empty string ``''``. By the time
+you receive this empty string, the output of ``somedef()`` has
+been sent to the underlying buffer.
+
+You may not want this effect, if for example you are doing
+something like this:
+
+.. sourcecode:: mako
+
+    ${" results " + somedef() + " more results "}
+
+If the ``somedef()`` function produced the content "``somedef's
+results``", the above template would produce this output:
+
+.. sourcecode:: html
+
+    somedef's results results more results
+
+This is because ``somedef()`` fully executes before the
+expression returns the results of its concatenation; the
+concatenation in turn receives just the empty string as its
+middle expression.
+
+Mako provides two ways to work around this. One is by applying
+buffering to the ``%def`` itself:
+
+.. sourcecode:: mako
+
+    <%def name="somedef()" buffered="True">
+        somedef's results
+    </%def>
+
+The above definition will generate code similar to this:
+
+.. sourcecode:: python
+
+    def somedef():
+        context.push_buffer()
+        try:
+            context.write("somedef's results")
+        finally:
+            buf = context.pop_buffer()
+        return buf.getvalue()
+
+So that the content of ``somedef()`` is sent to a second buffer,
+which is then popped off the stack and its value returned. The
+speed hit inherent in buffering the output of a def is also
+apparent.
+
+Note that the ``filter`` argument on ``%def`` also causes the def to
+be buffered. This is so that the final content of the ``%def`` can
+be delivered to the escaping function in one batch, which
+reduces method calls and also produces more deterministic
+behavior for the filtering function itself, which can possibly
+be useful for a filtering function that wishes to apply a
+transformation to the text as a whole.
+
+The other way to buffer the output of a def or any Mako callable
+is by using the built-in ``capture`` function. This function
+performs an operation similar to the above buffering operation
+except it is specified by the caller.
+
+.. sourcecode:: mako
+
+    ${" results " + capture(somedef) + " more results "}
+
+Note that the first argument to the ``capture`` function is
+**the function itself**, not the result of calling it. This is
+because the ``capture`` function takes over the job of actually
+calling the target function, after setting up a buffered
+environment. To send arguments to the function, just send them
+to ``capture`` instead:
+
+.. sourcecode:: mako
+
+    ${capture(somedef, 17, 'hi', use_paging=True)}
+
+The above call is equivalent to the unbuffered call:
+
+.. sourcecode:: mako
+
+    ${somedef(17, 'hi', use_paging=True)}
+
+Decorating
+==========
+
+.. versionadded:: 0.2.5
+
+Somewhat like a filter for a ``%def`` but more flexible, the ``decorator``
+argument to ``%def`` allows the creation of a function that will
+work in a similar manner to a Python decorator. The function can
+control whether or not the function executes. The original
+intent of this function is to allow the creation of custom cache
+logic, but there may be other uses as well.
+
+``decorator`` is intended to be used with a regular Python
+function, such as one defined in a library module. Here we'll
+illustrate the python function defined in the template for
+simplicities' sake:
+
+.. sourcecode:: mako
+
+    <%!
+        def bar(fn):
+            def decorate(context, *args, **kw):
+                context.write("BAR")
+                fn(*args, **kw)
+                context.write("BAR")
+                return ''
+            return decorate
+    %>
+
+    <%def name="foo()" decorator="bar">
+        this is foo
+    </%def>
+
+    ${foo()}
+
+The above template will return, with more whitespace than this,
+``"BAR this is foo BAR"``. The function is the render callable
+itself (or possibly a wrapper around it), and by default will
+write to the context. To capture its output, use the :func:`.capture`
+callable in the ``mako.runtime`` module (available in templates
+as just ``runtime``):
+
+.. sourcecode:: mako
+
+    <%!
+        def bar(fn):
+            def decorate(context, *args, **kw):
+                return "BAR" + runtime.capture(context, fn, *args, **kw) + "BAR"
+            return decorate
+    %>
+
+    <%def name="foo()" decorator="bar">
+        this is foo
+    </%def>
+
+    ${foo()}
+
+The decorator can be used with top-level defs as well as nested
+defs, and blocks too. Note that when calling a top-level def from the
+:class:`.Template` API, i.e. ``template.get_def('somedef').render()``,
+the decorator has to write the output to the ``context``, i.e.
+as in the first example. The return value gets discarded.
diff --git a/lib/Mako-0.7.3/doc/build/index.rst b/lib/Mako-0.7.3/doc/build/index.rst
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/index.rst
@@ -0,0 +1,22 @@
+Table of Contents
+=================
+
+.. toctree::
+    :maxdepth: 2
+
+    usage
+    syntax
+    defs
+    runtime
+    namespaces
+    inheritance
+    filtering
+    unicode
+    caching
+
+Indices and Tables
+------------------
+
+* :ref:`genindex`
+* :ref:`search`
+
diff --git a/lib/Mako-0.7.3/doc/build/inheritance.rst b/lib/Mako-0.7.3/doc/build/inheritance.rst
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/inheritance.rst
@@ -0,0 +1,534 @@
+.. _inheritance_toplevel:
+
+===========
+Inheritance
+===========
+
+.. note::  Most of the inheritance examples here take advantage of a feature that's
+    new in Mako as of version 0.4.1 called the "block".  This tag is very similar to
+    the "def" tag but is more streamlined for usage with inheritance.  Note that
+    all of the examples here which use blocks can also use defs instead.  Contrasting
+    usages will be illustrated.
+
+Using template inheritance, two or more templates can organize
+themselves into an **inheritance chain**, where content and
+functions from all involved templates can be intermixed. The
+general paradigm of template inheritance is this: if a template
+``A`` inherits from template ``B``, then template ``A`` agrees
+to send the executional control to template ``B`` at runtime
+(``A`` is called the **inheriting** template). Template ``B``,
+the **inherited** template, then makes decisions as to what
+resources from ``A`` shall be executed.
+
+In practice, it looks like this. Here's a hypothetical inheriting
+template, ``index.html``:
+
+.. sourcecode:: mako
+
+    ## index.html
+    <%inherit file="base.html"/>
+
+    <%block name="header">
+        this is some header content
+    </%block>
+
+    this is the body content.
+
+And ``base.html``, the inherited template:
+
+.. sourcecode:: mako
+
+    ## base.html
+    <html>
+        <body>
+            <div class="header">
+                <%block name="header"/>
+            </div>
+
+            ${self.body()}
+
+            <div class="footer">
+                <%block name="footer">
+                    this is the footer
+                </%block>
+            </div>
+        </body>
+    </html>
+
+Here is a breakdown of the execution:
+
+#. When ``index.html`` is rendered, control immediately passes to
+   ``base.html``.
+#. ``base.html`` then renders the top part of an HTML document,
+   then invokes the ``<%block name="header">`` block.  It invokes the
+   underlying ``header()`` function off of a built-in namespace
+   called ``self`` (this namespace was first introduced in the
+   :doc:`Namespaces chapter <namespaces>` in :ref:`namespace_self`). Since
+   ``index.html`` is the topmost template and also defines a block
+   called ``header``, it's this ``header`` block that ultimately gets
+   executed -- instead of the one that's present in ``base.html``.
+#. Control comes back to ``base.html``. Some more HTML is
+   rendered.
+#. ``base.html`` executes ``self.body()``. The ``body()``
+   function on all template-based namespaces refers to the main
+   body of the template, therefore the main body of
+   ``index.html`` is rendered.
+#. When ``<%block name="header">`` is encountered in ``index.html`` 
+   during the ``self.body()`` call, a conditional is checked -- does the
+   current inherited template, i.e. ``base.html``, also define this block? If yes,
+   the ``<%block>`` is **not** executed here -- the inheritance
+   mechanism knows that the parent template is responsible for rendering
+   this block (and in fact it already has).  In other words a block
+   only renders in its *basemost scope*.
+#. Control comes back to ``base.html``. More HTML is rendered,
+   then the ``<%block name="footer">`` expression is invoked.
+#. The ``footer`` block is only defined in ``base.html``, so being
+   the topmost definition of ``footer``, it's the one that
+   executes. If ``index.html`` also specified ``footer``, then
+   its version would **override** that of the base.
+#. ``base.html`` finishes up rendering its HTML and the template
+   is complete, producing:
+
+   .. sourcecode:: html
+
+        <html>
+            <body>
+                <div class="header">
+                    this is some header content
+                </div>
+
+                this is the body content.
+
+                <div class="footer">
+                    this is the footer
+                </div>
+            </body>
+        </html>
+
+...and that is template inheritance in a nutshell. The main idea
+is that the methods that you call upon ``self`` always
+correspond to the topmost definition of that method. Very much
+the way ``self`` works in a Python class, even though Mako is
+not actually using Python class inheritance to implement this
+functionality. (Mako doesn't take the "inheritance" metaphor too
+seriously; while useful to setup some commonly recognized
+semantics, a textual template is not very much like an
+object-oriented class construct in practice).
+
+Nesting Blocks
+==============
+
+The named blocks defined in an inherited template can also be nested within
+other blocks.  The name given to each block is globally accessible via any inheriting
+template.  We can add a new block ``title`` to our ``header`` block:
+
+.. sourcecode:: mako
+
+    ## base.html
+    <html>
+        <body>
+            <div class="header">
+                <%block name="header">
+                    <h2>
+                        <%block name="title"/>
+                    </h2>
+                </%block>
+            </div>
+
+            ${self.body()}
+
+            <div class="footer">
+                <%block name="footer">
+                    this is the footer
+                </%block>
+            </div>
+        </body>
+    </html>
+
+The inheriting template can name either or both of ``header`` and ``title``, separately
+or nested themselves:
+
+.. sourcecode:: mako
+
+    ## index.html
+    <%inherit file="base.html"/>
+
+    <%block name="header">
+        this is some header content
+        ${parent.header()}
+    </%block>
+
+    <%block name="title">
+        this is the title
+    </%block>
+
+    this is the body content.
+
+Note when we overrode ``header``, we added an extra call ``${parent.header()}`` in order to invoke
+the parent's ``header`` block in addition to our own.  That's described in more detail below,
+in :ref:`parent_namespace`.
+
+Rendering a Named Block Multiple Times
+======================================
+
+Recall from the section :ref:`blocks` that a named block is just like a ``<%def>``,
+with some different usage rules.  We can call one of our named sections distinctly, for example
+a section that is used more than once, such as the title of a page:
+
+.. sourcecode:: mako
+
+    <html>
+        <head>
+            <title>${self.title()}</title>
+        </head>
+        <body>
+        <%block name="header">
+            <h2><%block name="title"/></h2>
+        </%block>
+        ${self.body()}
+        </body>
+    </html>
+
+Where above an inheriting template can define ``<%block name="title">`` just once, and it will be
+used in the base template both in the ``<title>`` section as well as the ``<h2>``.
+
+But what about Defs?
+====================
+
+The previous example used the ``<%block>`` tag to produce areas of content
+to be overridden.  Before Mako 0.4.1, there wasn't any such tag -- instead
+there was only the ``<%def>`` tag.   As it turns out, named blocks and defs are
+largely interchangeable.  The def simply doesn't call itself automatically,
+and has more open-ended naming and scoping rules that are more flexible and similar
+to Python itself, but less suited towards layout.  The first example from
+this chapter using defs would look like:
+
+.. sourcecode:: mako
+
+    ## index.html
+    <%inherit file="base.html"/>
+
+    <%def name="header()">
+        this is some header content
+    </%def>
+
+    this is the body content.
+
+And ``base.html``, the inherited template:
+
+.. sourcecode:: mako
+
+    ## base.html
+    <html>
+        <body>
+            <div class="header">
+                ${self.header()}
+            </div>
+
+            ${self.body()}
+
+            <div class="footer">
+                ${self.footer()}
+            </div>
+        </body>
+    </html>
+
+    <%def name="header()"/>
+    <%def name="footer()">
+        this is the footer
+    </%def>
+
+Above, we illustrate that defs differ from blocks in that their definition
+and invocation are defined in two separate places, instead of at once. You can *almost* do exactly what a
+block does if you put the two together:
+
+.. sourcecode:: mako
+
+    <div class="header">
+        <%def name="header()"></%def>${self.header()}
+    </div>
+
+The ``<%block>`` is obviously more streamlined than the ``<%def>`` for this kind
+of usage.  In addition,
+the above "inline" approach with ``<%def>`` does not work with nesting:
+
+.. sourcecode:: mako
+
+    <head>
+        <%def name="header()">
+            <title>
+            ## this won't work !
+            <%def name="title()">default title</%def>${self.title()}
+            </title>
+        </%def>${self.header()}
+    </head>
+
+Where above, the ``title()`` def, because it's a def within a def, is not part of the
+template's exported namespace and will not be part of ``self``.  If the inherited template
+did define its own ``title`` def at the top level, it would be called, but the "default title"
+above is not present at all on ``self`` no matter what.  For this to work as expected
+you'd instead need to say:
+
+.. sourcecode:: mako
+
+    <head>
+        <%def name="header()">
+            <title>
+            ${self.title()}
+            </title>
+        </%def>${self.header()}
+
+        <%def name="title()"/>
+    </head>
+
+That is, ``title`` is defined outside of any other defs so that it is in the ``self`` namespace.
+It works, but the definition needs to be potentially far away from the point of render.
+
+A named block is always placed in the ``self`` namespace, regardless of nesting,
+so this restriction is lifted:
+
+.. sourcecode:: mako
+
+    ## base.html
+    <head>
+        <%block name="header">
+            <title>
+            <%block name="title"/>
+            </title>
+        </%block>
+    </head>
+
+The above template defines ``title`` inside of ``header``, and an inheriting template can define
+one or both in **any** configuration, nested inside each other or not, in order for them to be used:
+
+.. sourcecode:: mako
+
+    ## index.html
+    <%inherit file="base.html"/>
+    <%block name="title">
+        the title
+    </%block>
+    <%block name="header">
+        the header
+    </%block>
+
+So while the ``<%block>`` tag lifts the restriction of nested blocks not being available externally,
+in order to achieve this it *adds* the restriction that all block names in a single template need
+to be globally unique within the template, and additionally that a ``<%block>`` can't be defined
+inside of a ``<%def>``. It's a more restricted tag suited towards a more specific use case than ``<%def>``.
+
+Using the ``next`` Namespace to Produce Content Wrapping
+========================================================
+
+Sometimes you have an inheritance chain that spans more than two
+templates. Or maybe you don't, but you'd like to build your
+system such that extra inherited templates can be inserted in
+the middle of a chain where they would be smoothly integrated.
+If each template wants to define its layout just within its main
+body, you can't just call ``self.body()`` to get at the
+inheriting template's body, since that is only the topmost body.
+To get at the body of the *next* template, you call upon the
+namespace ``next``, which is the namespace of the template
+**immediately following** the current template.
+
+Lets change the line in ``base.html`` which calls upon
+``self.body()`` to instead call upon ``next.body()``:
+
+.. sourcecode:: mako
+
+    ## base.html
+    <html>
+        <body>
+            <div class="header">
+                <%block name="header"/>
+            </div>
+
+            ${next.body()}
+
+            <div class="footer">
+                <%block name="footer">
+                    this is the footer
+                </%block>
+            </div>
+        </body>
+    </html>
+
+
+Lets also add an intermediate template called ``layout.html``,
+which inherits from ``base.html``:
+
+.. sourcecode:: mako
+
+    ## layout.html
+    <%inherit file="base.html"/>
+    <ul>
+        <%block name="toolbar">
+            <li>selection 1</li>
+            <li>selection 2</li>
+            <li>selection 3</li>
+        </%block>
+    </ul>
+    <div class="mainlayout">
+        ${next.body()}
+    </div>
+
+And finally change ``index.html`` to inherit from
+``layout.html`` instead:
+
+.. sourcecode:: mako
+
+    ## index.html
+    <%inherit file="layout.html"/>
+
+    ## .. rest of template
+
+In this setup, each call to ``next.body()`` will render the body
+of the next template in the inheritance chain (which can be
+written as ``base.html -> layout.html -> index.html``). Control
+is still first passed to the bottommost template ``base.html``,
+and ``self`` still references the topmost definition of any
+particular def.
+
+The output we get would be:
+
+.. sourcecode:: html
+
+    <html>
+        <body>
+            <div class="header">
+                this is some header content
+            </div>
+
+            <ul>
+                <li>selection 1</li>
+                <li>selection 2</li>
+                <li>selection 3</li>
+            </ul>
+
+            <div class="mainlayout">
+            this is the body content.
+            </div>
+
+            <div class="footer">
+                this is the footer
+            </div>
+        </body>
+    </html>
+
+So above, we have the ``<html>``, ``<body>`` and
+``header``/``footer`` layout of ``base.html``, we have the
+``<ul>`` and ``mainlayout`` section of ``layout.html``, and the
+main body of ``index.html`` as well as its overridden ``header``
+def. The ``layout.html`` template is inserted into the middle of
+the chain without ``base.html`` having to change anything.
+Without the ``next`` namespace, only the main body of
+``index.html`` could be used; there would be no way to call
+``layout.html``'s body content.
+
+.. _parent_namespace:
+
+Using the ``parent`` Namespace to Augment Defs
+==============================================
+
+Lets now look at the other inheritance-specific namespace, the
+opposite of ``next`` called ``parent``. ``parent`` is the
+namespace of the template **immediately preceding** the current
+template. What's useful about this namespace is that
+defs or blocks can call upon their overridden versions.
+This is not as hard as it sounds and
+is very much like using the ``super`` keyword in Python. Lets
+modify ``index.html`` to augment the list of selections provided
+by the ``toolbar`` function in ``layout.html``:
+
+.. sourcecode:: mako
+
+    ## index.html
+    <%inherit file="layout.html"/>
+
+    <%block name="header">
+        this is some header content
+    </%block>
+
+    <%block name="toolbar">
+        ## call the parent's toolbar first
+        ${parent.toolbar()}
+        <li>selection 4</li>
+        <li>selection 5</li>
+    </%block>
+
+    this is the body content.
+
+Above, we implemented a ``toolbar()`` function, which is meant
+to override the definition of ``toolbar`` within the inherited
+template ``layout.html``. However, since we want the content
+from that of ``layout.html`` as well, we call it via the
+``parent`` namespace whenever we want it's content, in this case
+before we add our own selections. So the output for the whole
+thing is now:
+
+.. sourcecode:: html
+
+    <html>
+        <body>
+            <div class="header">
+                this is some header content
+            </div>
+
+            <ul>
+                <li>selection 1</li>
+                <li>selection 2</li>
+                <li>selection 3</li>
+                <li>selection 4</li>
+                <li>selection 5</li>
+            </ul>
+
+            <div class="mainlayout">
+            this is the body content.
+            </div>
+
+            <div class="footer">
+                this is the footer
+            </div>
+        </body>
+    </html>
+
+and you're now a template inheritance ninja!
+
+Inheritable Attributes
+======================
+
+The :attr:`attr <.Namespace.attr>` accessor of the :class:`.Namespace` object
+allows access to module level variables declared in a template. By accessing
+``self.attr``, you can access regular attributes from the
+inheritance chain as declared in ``<%! %>`` sections. Such as:
+
+.. sourcecode:: mako
+
+    <%!
+        class_ = "grey"
+    %>
+
+    <div class="${self.attr.class_}">
+        ${self.body()}
+    </div>
+
+If an inheriting template overrides ``class_`` to be
+``"white"``, as in:
+
+.. sourcecode:: mako
+
+    <%!
+        class_ = "white"
+    %>
+    <%inherit file="parent.html"/>
+
+    This is the body
+
+you'll get output like:
+
+.. sourcecode:: html
+
+    <div class="white">
+        This is the body
+    </div>
+
diff --git a/lib/Mako-0.7.3/doc/build/namespaces.rst b/lib/Mako-0.7.3/doc/build/namespaces.rst
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/namespaces.rst
@@ -0,0 +1,349 @@
+.. _namespaces_toplevel:
+
+==========
+Namespaces
+==========
+
+Namespaces are used to organize groups of defs into
+categories, and also to "import" defs from other files.
+
+If the file ``components.html`` defines these two defs:
+
+.. sourcecode:: mako
+
+    ## components.html
+    <%def name="comp1()">
+        this is comp1
+    </%def>
+
+    <%def name="comp2(x)">
+        this is comp2, x is ${x}
+    </%def>
+
+you can make another file, for example ``index.html``, that
+pulls those two defs into a namespace called ``comp``:
+
+.. sourcecode:: mako
+
+    ## index.html
+    <%namespace name="comp" file="components.html"/>
+
+    Here's comp1:  ${comp.comp1()}
+    Here's comp2:  ${comp.comp2(x=5)}
+
+The ``comp`` variable above is an instance of
+:class:`.Namespace`, a **proxy object** which delivers
+method calls to the underlying template callable using the
+current context.
+
+``<%namespace>`` also provides an ``import`` attribute which can
+be used to pull the names into the local namespace, removing the
+need to call it via the "``.``" operator. When ``import`` is used, the
+``name`` attribute is optional.
+
+.. sourcecode:: mako
+
+    <%namespace file="components.html" import="comp1, comp2"/>
+
+    Heres comp1:  ${comp1()}
+    Heres comp2:  ${comp2(x=5)}
+
+``import`` also supports the "``*``" operator:
+
+.. sourcecode:: mako
+
+    <%namespace file="components.html" import="*"/>
+
+    Heres comp1:  ${comp1()}
+    Heres comp2:  ${comp2(x=5)}
+
+The names imported by the ``import`` attribute take precedence
+over any names that exist within the current context.
+
+.. note:: In current versions of Mako, usage of ``import='*'`` is
+   known to decrease performance of the template. This will be
+   fixed in a future release.
+
+The ``file`` argument allows expressions -- if looking for
+context variables, the ``context`` must be named explicitly:
+
+.. sourcecode:: mako
+
+    <%namespace name="dyn" file="${context['namespace_name']}"/>
+
+Ways to Call Namespaces
+=======================
+
+There are essentially four ways to call a function from a
+namespace.
+
+The "expression" format, as described previously. Namespaces are
+just Python objects with functions on them, and can be used in
+expressions like any other function:
+
+.. sourcecode:: mako
+
+    ${mynamespace.somefunction('some arg1', 'some arg2', arg3='some arg3', arg4='some arg4')}
+
+Synonymous with the "expression" format is the "custom tag"
+format, when a "closed" tag is used. This format, introduced in
+Mako 0.2.3, allows the usage of a "custom" Mako tag, with the
+function arguments passed in using named attributes:
+
+.. sourcecode:: mako
+
+    <%mynamespace:somefunction arg1="some arg1" arg2="some arg2" arg3="some arg3" arg4="some arg4"/>
+
+When using tags, the values of the arguments are taken as
+literal strings by default. To embed Python expressions as
+arguments, use the embedded expression format:
+
+.. sourcecode:: mako
+
+    <%mynamespace:somefunction arg1="${someobject.format()}" arg2="${somedef(5, 12)}"/>
+
+The "custom tag" format is intended mainly for namespace
+functions which recognize body content, which in Mako is known
+as a "def with embedded content":
+
+.. sourcecode:: mako
+
+    <%mynamespace:somefunction arg1="some argument" args="x, y">
+        Some record: ${x}, ${y}
+    </%mynamespace:somefunction>
+
+The "classic" way to call defs with embedded content is the ``<%call>`` tag:
+
+.. sourcecode:: mako
+
+    <%call expr="mynamespace.somefunction(arg1='some argument')" args="x, y">
+        Some record: ${x}, ${y}
+    </%call>
+
+For information on how to construct defs that embed content from
+the caller, see :ref:`defs_with_content`.
+
+.. _namespaces_python_modules:
+
+Namespaces from Regular Python Modules
+======================================
+
+Namespaces can also import regular Python functions from
+modules. These callables need to take at least one argument,
+``context``, an instance of :class:`.Context`. A module file 
+``some/module.py`` might contain the callable:
+
+.. sourcecode:: python
+
+    def my_tag(context):
+        context.write("hello world")
+        return ''
+
+A template can use this module via:
+
+.. sourcecode:: mako
+
+    <%namespace name="hw" module="some.module"/>
+
+    ${hw.my_tag()}
+
+Note that the ``context`` argument is not needed in the call;
+the :class:`.Namespace` tag creates a locally-scoped callable which
+takes care of it. The ``return ''`` is so that the def does not
+dump a ``None`` into the output stream -- the return value of any
+def is rendered after the def completes, in addition to whatever
+was passed to :meth:`.Context.write` within its body.
+
+If your def is to be called in an "embedded content" context,
+that is as described in :ref:`defs_with_content`, you should use
+the :func:`.supports_caller` decorator, which will ensure that Mako
+will ensure the correct "caller" variable is available when your
+def is called, supporting embedded content:
+
+.. sourcecode:: python
+
+    from mako.runtime import supports_caller
+
+    @supports_caller
+    def my_tag(context):
+        context.write("<div>")
+        context['caller'].body()
+        context.write("</div>")
+        return ''
+
+Capturing of output is available as well, using the
+outside-of-templates version of the :func:`.capture` function,
+which accepts the "context" as its first argument:
+
+.. sourcecode:: python
+
+    from mako.runtime import supports_caller, capture
+
+    @supports_caller
+    def my_tag(context):
+        return "<div>%s</div>" % \
+                capture(context, context['caller'].body, x="foo", y="bar")
+
+Declaring Defs in Namespaces
+============================
+
+The ``<%namespace>`` tag supports the definition of ``<%def>``\ s
+directly inside the tag. These defs become part of the namespace
+like any other function, and will override the definitions
+pulled in from a remote template or module:
+
+.. sourcecode:: mako
+
+    ## define a namespace
+    <%namespace name="stuff">
+        <%def name="comp1()">
+            comp1
+        </%def>
+    </%namespace>
+
+    ## then call it
+    ${stuff.comp1()}
+
+.. _namespaces_body:
+
+The ``body()`` Method
+=====================
+
+Every namespace that is generated from a template contains a
+method called ``body()``. This method corresponds to the main
+body of the template, and plays its most important roles when
+using inheritance relationships as well as
+def-calls-with-content.
+
+Since the ``body()`` method is available from a namespace just
+like all the other defs defined in a template, what happens if
+you send arguments to it? By default, the ``body()`` method
+accepts no positional arguments, and for usefulness in
+inheritance scenarios will by default dump all keyword arguments
+into a dictionary called ``pageargs``. But if you actually want
+to get at the keyword arguments, Mako recommends you define your
+own argument signature explicitly. You do this via using the
+``<%page>`` tag:
+
+.. sourcecode:: mako
+
+    <%page args="x, y, someval=8, scope='foo', **kwargs"/>
+
+A template which defines the above signature requires that the
+variables ``x`` and ``y`` are defined, defines default values
+for ``someval`` and ``scope``, and sets up ``**kwargs`` to
+receive all other keyword arguments. If ``**kwargs`` or similar
+is not present, the argument ``**pageargs`` gets tacked on by
+Mako. When the template is called as a top-level template (i.e.
+via :meth:`~.Template.render`) or via the ``<%include>`` tag, the
+values for these arguments will be pulled from the ``Context``.
+In all other cases, i.e. via calling the ``body()`` method, the
+arguments are taken as ordinary arguments from the method call.
+So above, the body might be called as:
+
+.. sourcecode:: mako
+
+    ${self.body(5, y=10, someval=15, delta=7)}
+
+The :class:`.Context` object also supplies a :attr:`~.Context.kwargs` accessor, for
+cases when you'd like to pass along whatever is in the context to
+a ``body()`` callable:
+
+.. sourcecode:: mako
+
+    ${next.body(**context.kwargs)}
+
+The usefulness of calls like the above become more apparent when
+one works with inheriting templates. For more information on
+this, as well as the meanings of the names ``self`` and
+``next``, see :ref:`inheritance_toplevel`.
+
+.. _namespaces_builtin:
+
+Built-in Namespaces
+===================
+
+The namespace is so great that Mako gives your template one (or
+two) for free. The names of these namespaces are ``local`` and
+``self``. Other built-in namespaces include ``parent`` and
+``next``, which are optional and are described in
+:ref:`inheritance_toplevel`.
+
+.. _namespace_local:
+
+``local``
+---------
+
+The ``local`` namespace is basically the namespace for the
+currently executing template. This means that all of the top
+level defs defined in your template, as well as your template's
+``body()`` function, are also available off of the ``local``
+namespace.
+
+The ``local`` namespace is also where properties like ``uri``,
+``filename``, and ``module`` and the ``get_namespace`` method
+can be particularly useful.
+
+.. _namespace_self:
+
+``self``
+--------
+
+The ``self`` namespace, in the case of a template that does not
+use inheritance, is synonymous with ``local``. If inheritance is
+used, then ``self`` references the topmost template in the
+inheritance chain, where it is most useful for providing the
+ultimate form of various "method" calls which may have been
+overridden at various points in an inheritance chain. See
+:ref:`inheritance_toplevel`.
+
+Inheritable Namespaces
+======================
+
+The ``<%namespace>`` tag includes an optional attribute
+``inheritable="True"``, which will cause the namespace to be
+attached to the ``self`` namespace. Since ``self`` is globally
+available throughout an inheritance chain (described in the next
+section), all the templates in an inheritance chain can get at
+the namespace imported in a super-template via ``self``.
+
+.. sourcecode:: mako
+
+    ## base.html
+    <%namespace name="foo" file="foo.html" inheritable="True"/>
+
+    ${next.body()}
+
+    ## somefile.html
+    <%inherit file="base.html"/>
+
+    ${self.foo.bar()}
+
+This allows a super-template to load a whole bunch of namespaces
+that its inheriting templates can get to, without them having to
+explicitly load those namespaces themselves.
+
+The ``import="*"`` part of the ``<%namespace>`` tag doesn't yet
+interact with the ``inheritable`` flag, so currently you have to
+use the explicit namespace name off of ``self``, followed by the
+desired function name. But more on this in a future release.
+
+API Reference
+=============
+
+.. autoclass:: mako.runtime.Namespace
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.runtime.TemplateNamespace
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.runtime.ModuleNamespace
+    :show-inheritance:
+    :members:
+ 
+.. autofunction:: mako.runtime.supports_caller
+
+.. autofunction:: mako.runtime.capture
+
diff --git a/lib/Mako-0.7.3/doc/build/runtime.rst b/lib/Mako-0.7.3/doc/build/runtime.rst
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/runtime.rst
@@ -0,0 +1,448 @@
+.. _runtime_toplevel:
+
+============================
+The Mako Runtime Environment
+============================
+
+This section describes a little bit about the objects and
+built-in functions that are available in templates.
+
+.. _context:
+
+Context
+=======
+
+The :class:`.Context` is the central object that is created when
+a template is first executed, and is responsible for handling
+all communication with the outside world.  Within the template
+environment, it is available via the :ref:`reserved name <reserved_names>`
+``context``.  The :class:`.Context` includes two
+major components, one of which is the output buffer, which is a
+file-like object such as Python's ``StringIO`` or similar, and
+the other a dictionary of variables that can be freely
+referenced within a template; this dictionary is a combination
+of the arguments sent to the :meth:`~.Template.render` function and
+some built-in variables provided by Mako's runtime environment.
+
+The Buffer
+----------
+
+The buffer is stored within the :class:`.Context`, and writing
+to it is achieved by calling the :meth:`~.Context.write` method
+-- in a template this looks like ``context.write('some string')``.
+You usually don't need to care about this, as all text within a template, as
+well as all expressions provided by ``${}``, automatically send
+everything to this method. The cases you might want to be aware
+of its existence are if you are dealing with various
+filtering/buffering scenarios, which are described in
+:ref:`filtering_toplevel`, or if you want to programmatically
+send content to the output stream, such as within a ``<% %>``
+block.
+
+.. sourcecode:: mako
+
+    <%
+        context.write("some programmatic text")
+    %>
+
+The actual buffer may or may not be the original buffer sent to
+the :class:`.Context` object, as various filtering/caching
+scenarios may "push" a new buffer onto the context's underlying
+buffer stack. For this reason, just stick with
+``context.write()`` and content will always go to the topmost
+buffer.
+
+.. _context_vars:
+
+Context Variables
+-----------------
+
+When your template is compiled into a Python module, the body
+content is enclosed within a Python function called
+``render_body``. Other top-level defs defined in the template are
+defined within their own function bodies which are named after
+the def's name with the prefix ``render_`` (i.e. ``render_mydef``).
+One of the first things that happens within these functions is
+that all variable names that are referenced within the function
+which are not defined in some other way (i.e. such as via
+assignment, module level imports, etc.) are pulled from the
+:class:`.Context` object's dictionary of variables. This is how you're
+able to freely reference variable names in a template which
+automatically correspond to what was passed into the current
+:class:`.Context`.
+
+* **What happens if I reference a variable name that is not in
+  the current context?** - The value you get back is a special
+  value called ``UNDEFINED``, or if the ``strict_undefined=True`` flag
+  is used a ``NameError`` is raised. ``UNDEFINED`` is just a simple global
+  variable with the class :class:`mako.runtime.Undefined`. The
+  ``UNDEFINED`` object throws an error when you call ``str()`` on
+  it, which is what happens if you try to use it in an
+  expression.
+* **UNDEFINED makes it hard for me to find what name is missing** - An alternative
+  is to specify the option ``strict_undefined=True``
+  to the :class:`.Template` or :class:`.TemplateLookup`.  This will cause
+  any non-present variables to raise an immediate ``NameError``
+  which includes the name of the variable in its message
+  when :meth:`~.Template.render` is called -- ``UNDEFINED`` is not used.
+
+  .. versionadded:: 0.3.6
+
+* **Why not just return None?** Using ``UNDEFINED``, or
+  raising a ``NameError`` is more
+  explicit and allows differentiation between a value of ``None``
+  that was explicitly passed to the :class:`.Context` and a value that
+  wasn't present at all.
+* **Why raise an exception when you call str() on it ? Why not
+  just return a blank string?** - Mako tries to stick to the
+  Python philosophy of "explicit is better than implicit". In
+  this case, it's decided that the template author should be made
+  to specifically handle a missing value rather than
+  experiencing what may be a silent failure. Since ``UNDEFINED``
+  is a singleton object just like Python's ``True`` or ``False``,
+  you can use the ``is`` operator to check for it:
+
+  .. sourcecode:: mako
+
+        % if someval is UNDEFINED:
+            someval is: no value
+        % else:
+            someval is: ${someval}
+        % endif
+
+Another facet of the :class:`.Context` is that its dictionary of
+variables is **immutable**. Whatever is set when
+:meth:`~.Template.render` is called is what stays. Of course, since
+its Python, you can hack around this and change values in the
+context's internal dictionary, but this will probably will not
+work as well as you'd think. The reason for this is that Mako in
+many cases creates copies of the :class:`.Context` object, which
+get sent to various elements of the template and inheriting
+templates used in an execution. So changing the value in your
+local :class:`.Context` will not necessarily make that value
+available in other parts of the template's execution. Examples
+of where Mako creates copies of the :class:`.Context` include
+within top-level def calls from the main body of the template
+(the context is used to propagate locally assigned variables
+into the scope of defs; since in the template's body they appear
+as inlined functions, Mako tries to make them act that way), and
+within an inheritance chain (each template in an inheritance
+chain has a different notion of ``parent`` and ``next``, which
+are all stored in unique :class:`.Context` instances).
+
+* **So what if I want to set values that are global to everyone
+  within a template request?** - All you have to do is provide a
+  dictionary to your :class:`.Context` when the template first
+  runs, and everyone can just get/set variables from that. Lets
+  say its called ``attributes``.
+
+  Running the template looks like:
+
+  .. sourcecode:: python
+
+      output = template.render(attributes={})
+
+  Within a template, just reference the dictionary:
+
+  .. sourcecode:: mako
+
+      <%
+          attributes['foo'] = 'bar'
+      %>
+      'foo' attribute is: ${attributes['foo']}
+
+* **Why can't "attributes" be a built-in feature of the
+  Context?** - This is an area where Mako is trying to make as
+  few decisions about your application as it possibly can.
+  Perhaps you don't want your templates to use this technique of
+  assigning and sharing data, or perhaps you have a different
+  notion of the names and kinds of data structures that should
+  be passed around. Once again Mako would rather ask the user to
+  be explicit.
+
+Context Methods and Accessors
+-----------------------------
+
+Significant members of :class:`.Context` include:
+
+* ``context[key]`` / ``context.get(key, default=None)`` -
+  dictionary-like accessors for the context. Normally, any
+  variable you use in your template is automatically pulled from
+  the context if it isn't defined somewhere already. Use the
+  dictionary accessor and/or ``get`` method when you want a
+  variable that *is* already defined somewhere else, such as in
+  the local arguments sent to a ``%def`` call. If a key is not
+  present, like a dictionary it raises ``KeyError``.
+* ``keys()`` - all the names defined within this context.
+* ``kwargs`` - this returns a **copy** of the context's
+  dictionary of variables. This is useful when you want to
+  propagate the variables in the current context to a function
+  as keyword arguments, i.e.:
+
+  .. sourcecode:: mako
+
+        ${next.body(**context.kwargs)}
+
+* ``write(text)`` - write some text to the current output
+  stream.
+* ``lookup`` - returns the :class:`.TemplateLookup` instance that is
+  used for all file-lookups within the current execution (even
+  though individual :class:`.Template` instances can conceivably have
+  different instances of a :class:`.TemplateLookup`, only the
+  :class:`.TemplateLookup` of the originally-called :class:`.Template` gets
+  used in a particular execution).
+
+.. _loop_context:
+
+The Loop Context
+================
+
+Within ``% for`` blocks, the :ref:`reserved name<reserved_names>` ``loop``
+is available.  ``loop`` tracks the progress of
+the ``for`` loop and makes it easy to use the iteration state to control
+template behavior:
+
+.. sourcecode:: mako
+
+    <ul>
+    % for a in ("one", "two", "three"):
+        <li>Item ${loop.index}: ${a}</li>
+    % endfor
+    </ul>
+
+.. versionadded:: 0.7
+
+Iterations
+----------
+
+Regardless of the type of iterable you're looping over, ``loop`` always tracks
+the 0-indexed iteration count (available at ``loop.index``), its parity
+(through the ``loop.even`` and ``loop.odd`` bools), and ``loop.first``, a bool
+indicating whether the loop is on its first iteration.  If your iterable
+provides a ``__len__`` method, ``loop`` also provides access to
+a count of iterations remaining at ``loop.reverse_index`` and ``loop.last``,
+a bool indicating whether the loop is on its last iteration; accessing these
+without ``__len__`` will raise a ``TypeError``.
+
+Cycling
+-------
+
+Cycling is available regardless of whether the iterable you're using provides
+a ``__len__`` method.  Prior to Mako 0.7, you might have generated a simple
+zebra striped list using ``enumerate``:
+
+.. sourcecode:: mako
+
+    <ul>
+    % for i, item in enumerate(('spam', 'ham', 'eggs')):
+      <li class="${'odd' if i % 2 else 'even'}">${item}</li>
+    % endfor
+    </ul>
+
+With ``loop.cycle``, you get the same results with cleaner code and less prep work:
+
+.. sourcecode:: mako
+
+    <ul>
+    % for item in ('spam', 'ham', 'eggs'):
+      <li class="${loop.cycle('even', 'odd')}">${item}</li>
+    % endfor
+    </ul>
+
+Both approaches produce output like the following:
+
+.. sourcecode:: html
+
+    <ul>
+      <li class="even">spam</li>
+      <li class="odd">ham</li>
+      <li class="even">eggs</li>
+    </ul>
+
+Parent Loops
+------------
+
+Loop contexts can also be transparently nested, and the Mako runtime will do
+the right thing and manage the scope for you.  You can access the parent loop
+context through ``loop.parent``.
+
+This allows you to reach all the way back up through the loop stack by
+chaining ``parent`` attribute accesses, i.e. ``loop.parent.parent....`` as
+long as the stack depth isn't exceeded.  For example, you can use the parent
+loop to make a checkered table:
+
+.. sourcecode:: mako
+
+    <table>
+    % for consonant in 'pbj':
+      <tr>
+      % for vowel in 'iou':
+        <td class="${'black' if (loop.parent.even == loop.even) else 'red'}">
+          ${consonant + vowel}t
+        </td>
+      % endfor
+      </tr>
+    % endfor
+    </table>
+
+.. sourcecode:: html
+
+    <table>
+      <tr>
+        <td class="black">
+          pit
+        </td>
+        <td class="red">
+          pot
+        </td>
+        <td class="black">
+          put
+        </td>
+      </tr>
+      <tr>
+        <td class="red">
+          bit
+        </td>
+        <td class="black">
+          bot
+        </td>
+        <td class="red">
+          but
+        </td>
+      </tr>
+      <tr>
+        <td class="black">
+          jit
+        </td>
+        <td class="red">
+          jot
+        </td>
+        <td class="black">
+          jut
+        </td>
+      </tr>
+    </table>
+
+.. _migrating_loop:
+
+Migrating Legacy Templates that Use the Word "loop"
+---------------------------------------------------
+
+.. versionchanged:: 0.7
+   The ``loop`` name is now :ref:`reserved <reserved_names>` in Mako,
+   which means a template that refers to a variable named ``loop``
+   won't function correctly when used in Mako 0.7.
+
+To ease the transition for such systems, the feature can be disabled across the board for
+all templates, then re-enabled on a per-template basis for those templates which wish
+to make use of the new system.
+
+First, the ``enable_loop=False`` flag is passed to either the :class:`.TemplateLookup`
+or :class:`.Template` object in use:
+
+.. sourcecode:: python
+
+    lookup = TemplateLookup(directories=['/docs'], enable_loop=False)
+
+or:
+
+.. sourcecode:: python
+
+    template = Template("some template", enable_loop=False)
+
+An individual template can make usage of the feature when ``enable_loop`` is set to
+``False`` by switching it back on within the ``<%page>`` tag:
+
+.. sourcecode:: mako
+
+    <%page enable_loop="True"/>
+
+    % for i in collection:
+        ${i} ${loop.index}
+    % endfor
+
+Using the above scheme, it's safe to pass the name ``loop`` to the :meth:`.Template.render`
+method as well as to freely make usage of a variable named ``loop`` within a template, provided
+the ``<%page>`` tag doesn't override it.  New templates that want to use the ``loop`` context
+can then set up ``<%page enable_loop="True"/>`` to use the new feature without affecting
+old templates.
+
+All the Built-in Names
+======================
+
+A one-stop shop for all the names Mako defines. Most of these
+names are instances of :class:`.Namespace`, which are described
+in the next section, :ref:`namespaces_toplevel`. Also, most of
+these names other than ``context``, ``UNDEFINED``, and ``loop`` are
+also present *within* the :class:`.Context` itself.   The names
+``context``, ``loop`` and ``UNDEFINED`` themselves can't be passed
+to the context and can't be substituted -- see the section :ref:`reserved_names`.
+
+* ``context`` - this is the :class:`.Context` object, introduced
+  at :ref:`context`.
+* ``local`` - the namespace of the current template, described
+  in :ref:`namespaces_builtin`.
+* ``self`` - the namespace of the topmost template in an
+  inheritance chain (if any, otherwise the same as ``local``),
+  mostly described in :ref:`inheritance_toplevel`.
+* ``parent`` - the namespace of the parent template in an
+  inheritance chain (otherwise undefined); see
+  :ref:`inheritance_toplevel`.
+* ``next`` - the namespace of the next template in an
+  inheritance chain (otherwise undefined); see
+  :ref:`inheritance_toplevel`.
+* ``caller`` - a "mini" namespace created when using the
+  ``<%call>`` tag to define a "def call with content"; described
+  in :ref:`defs_with_content`.
+* ``loop`` - this provides access to :class:`.LoopContext` objects when
+  they are requested within ``% for`` loops, introduced at :ref:`loop_context`.
+* ``capture`` - a function that calls a given def and captures
+  its resulting content into a string, which is returned. Usage
+  is described in :ref:`filtering_toplevel`.
+* ``UNDEFINED`` - a global singleton that is applied to all
+  otherwise uninitialized template variables that were not
+  located within the :class:`.Context` when rendering began,
+  unless the :class:`.Template` flag ``strict_undefined``
+  is set to ``True``. ``UNDEFINED`` is
+  an instance of :class:`.Undefined`, and raises an
+  exception when its ``__str__()`` method is called.
+* ``pageargs`` - this is a dictionary which is present in a
+  template which does not define any ``**kwargs`` section in its
+  ``<%page>`` tag. All keyword arguments sent to the ``body()``
+  function of a template (when used via namespaces) go here by
+  default unless otherwise defined as a page argument. If this
+  makes no sense, it shouldn't; read the section
+  :ref:`namespaces_body`.
+
+.. _reserved_names:
+
+Reserved Names
+--------------
+
+Mako has a few names that are considered to be "reserved" and can't be used
+as variable names.
+
+.. versionchanged:: 0.7
+   Mako raises an error if these words are found passed to the template
+   as context arguments, whereas in previous versions they'd be silently
+   ignored or lead to other error messages.
+
+* ``context`` - see :ref:`context`.
+* ``UNDEFINED`` - see :ref:`context_vars`.
+* ``loop`` - see :ref:`loop_context`.  Note this can be disabled for legacy templates
+  via the ``enable_loop=False`` argument; see :ref:`migrating_loop`.
+
+API Reference
+=============
+
+.. autoclass:: mako.runtime.Context
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.runtime.LoopContext
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.runtime.Undefined
+    :show-inheritance:
+
diff --git a/lib/Mako-0.7.3/doc/build/static/docs.css b/lib/Mako-0.7.3/doc/build/static/docs.css
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/static/docs.css
@@ -0,0 +1,438 @@
+/* global */
+
+body {
+  background-color: #FDFBFC;
+  margin:38px;
+  color:#333333;
+}
+
+a {
+    font-weight:normal; 
+    text-decoration:none;
+}
+
+form {
+    display:inline;
+}
+
+/* hyperlinks */
+
+a:link, a:visited, a:active {
+    color:#0000FF;
+}
+a:hover {
+    color:#700000;
+    text-decoration:underline;
+}
+
+/* paragraph links after sections.
+   These aren't visible until hovering
+   over the <h> tag, then have a 
+   "reverse video" effect over the actual
+   link
+ */
+
+a.headerlink {
+    font-size: 0.8em;
+    padding: 0 4px 0 4px;
+    text-decoration: none;
+    visibility: hidden;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink {
+    visibility: visible;
+}
+
+a.headerlink:hover {
+    background-color: #990000;
+    color: white;
+}
+
+
+/* Container setup */
+
+#docs-container {
+  max-width:1000px;
+}
+
+
+/* header/footer elements */
+
+#docs-header h1 {
+    font-size:20px;
+    color: #222222;
+    margin: 0;
+    padding: 0;
+}
+
+#docs-header {
+  font-family:Tahoma, Geneva,sans-serif;
+
+  font-size:.9em;
+
+}
+
+#docs-top-navigation,
+#docs-bottom-navigation {
+  font-family: Tahoma, Geneva, sans-serif;
+  background-color: #EEE;
+  border: solid 1px #CCC;
+  padding:10px;
+  font-size:.9em;
+}
+
+#docs-top-navigation {
+  margin:10px 0px 10px 0px;
+  line-height:1.2em;
+}
+
+.docs-navigation-links {
+  font-family:Tahoma, Geneva,sans-serif;
+}
+
+#docs-bottom-navigation {
+    float:right;
+    margin: 1em 0 1em 5px;
+}
+
+#docs-copyright {
+    font-size:.85em;
+    padding:5px 0px;
+}
+
+#docs-header h1,
+#docs-top-navigation h1,
+#docs-top-navigation h2 {
+  font-family:Tahoma,Geneva,sans-serif;
+  font-weight:normal;
+}
+
+#docs-top-navigation h2 {
+    margin:16px 4px 7px 5px;
+    font-size:2em;
+}
+
+#docs-search {
+    float:right;
+}
+
+#docs-top-page-control {
+  float:right;
+  width:350px;
+}
+
+#docs-top-page-control ul {
+  padding:0;
+  margin:0;
+}
+
+#docs-top-page-control li {
+    list-style-type:none;
+    padding:1px 8px;
+}
+
+
+#docs-container .version-num {
+    font-weight: bold;
+}
+
+
+/* content container, sidebar */
+
+#docs-body-container {
+  background-color:#EFEFEF;
+  border: solid 1px #CCC;
+
+}
+
+#docs-body,
+#docs-sidebar
+ {
+  /*font-family: helvetica, arial, sans-serif;
+  font-size:.9em;*/
+
+  font-family: Tahoma, Geneva, sans-serif;
+  /*font-size:.85em;*/
+  line-height:1.5em;
+
+}
+
+#docs-sidebar > ul {
+  font-size:.9em;
+}
+
+#docs-sidebar {
+  float:left;
+  width:212px;
+  padding: 10px 0 0 15px;
+  /*font-size:.85em;*/
+}
+
+#docs-sidebar h3, #docs-sidebar h4 {
+    background-color: #DDDDDD;
+    color: #222222;
+    font-family: Tahoma, Geneva,sans-serif;
+    font-size: 1.1em;
+    font-weight: normal;
+    margin: 10px 0 0 -15px;
+    padding: 5px 10px 5px 10px;
+    text-shadow: 1px 1px 0 white;
+    width:210px;
+}
+
+#docs-sidebar h3 a, #docs-sidebar h4 a {
+  color: #222222;
+}
+#docs-sidebar ul {
+  margin: 10px 10px 10px 0px;
+  padding: 0;
+  list-style: none outside none;
+}
+
+
+#docs-sidebar ul ul {
+    margin-bottom: 0;
+    margin-top: 0;
+    list-style: square outside none;
+    margin-left: 20px;
+}
+
+#docs-body {
+  background-color:#FFFFFF;
+  padding:1px 10px 10px 10px;
+}
+
+#docs-body.withsidebar {
+  margin: 0 0 0 230px;
+  border-left:3px solid #DFDFDF;
+}
+
+#docs-body h1,
+#docs-body h2,
+#docs-body h3,
+#docs-body h4 {
+  font-family:Tahoma, Geneva, sans-serif;
+}
+
+#docs-body h1 {
+  /* hide the <h1> for each content section. */
+  display:none;
+  font-size:1.8em;
+}
+
+#docs-body h2 {
+  font-size:1.6em;
+}
+
+#docs-body h3 {
+  font-size:1.4em;
+}
+
+/* SQL popup, code styles */
+
+.highlight {
+  background:none;
+}
+
+#docs-container pre {
+  font-size:1.2em;
+}
+
+#docs-container .pre {
+  font-size:1.1em;
+}
+
+#docs-container pre {
+  background-color: #f0f0f0;  
+  border: solid 1px #ccc;
+  box-shadow: 2px 2px 3px #DFDFDF;
+  padding:10px;
+  margin: 5px 0px 5px 0px;
+  overflow:auto;
+  line-height:1.3em;
+}
+
+.popup_sql, .show_sql
+{
+    background-color: #FBFBEE;
+    padding:5px 10px;
+    margin:10px -5px;
+    border:1px dashed;
+}
+
+/* the [SQL] links used to display SQL */
+#docs-container .sql_link
+{
+  font-weight:normal;
+  font-family: arial, sans-serif;
+  font-size:.9em;
+  text-transform: uppercase;
+  color:#990000;
+  border:1px solid;
+  padding:1px 2px 1px 2px;
+  margin:0px 10px 0px 15px;
+  float:right;
+  line-height:1.2em;
+}
+
+#docs-container a.sql_link, 
+#docs-container .sql_link
+{
+    text-decoration: none;
+    padding:1px 2px;
+}
+
+#docs-container a.sql_link:hover {
+    text-decoration: none;
+    color:#fff;
+    border:1px solid #900;
+    background-color: #900;
+}
+
+/* docutils-specific elements */
+
+th.field-name {
+    text-align:right;
+}
+
+div.note, div.warning, p.deprecated, div.topic  {
+    background-color:#EEFFEF;
+}
+
+
+div.admonition, div.topic, p.deprecated, p.versionadded, p.versionchanged {
+    border:1px solid #CCCCCC;
+    padding:5px 10px;
+    font-size:.9em;
+    box-shadow: 2px 2px 3px #DFDFDF;
+}
+
+div.warning .admonition-title {
+    color:#FF0000;
+}
+
+div.admonition .admonition-title, div.topic .topic-title {
+    font-weight:bold;
+}
+
+.viewcode-back, .viewcode-link {
+    float:right;
+}
+
+dl.function > dt,
+dl.attribute > dt,
+dl.classmethod > dt,
+dl.method > dt,
+dl.class > dt,
+dl.exception > dt
+{
+    background-color:#F0F0F0;
+    margin:25px -10px 10px 10px;
+    padding: 0px 10px;
+}
+
+p.versionadded span.versionmodified,
+p.versionchanged span.versionmodified,
+p.deprecated span.versionmodified {
+    background-color: #F0F0F0;
+    font-style: italic;
+}
+
+dt:target, span.highlight {
+    background-color:#FBE54E;
+}
+
+a.headerlink {
+    font-size: 0.8em;
+    padding: 0 4px 0 4px;
+    text-decoration: none;
+    visibility: hidden;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink {
+    visibility: visible;
+}
+
+a.headerlink:hover {
+    background-color: #00f;
+    color: white;
+}
+
+.clearboth {
+    clear:both;
+}
+
+tt.descname {
+    background-color:transparent;
+    font-size:1.2em;
+    font-weight:bold;
+}
+
+tt.descclassname {
+    background-color:transparent;
+}
+
+tt {
+    background-color:#ECF0F3;
+    padding:0 1px;
+}
+
+/* syntax highlighting overrides */
+.k, .kn {color:#0908CE;}
+.o {color:#BF0005;}
+.go {color:#804049;}
+
+
+/* special "index page" sections 
+   with specific formatting
+*/
+
+div#sqlalchemy-documentation {
+  font-size:.95em;
+}
+div#sqlalchemy-documentation em {
+  font-style:normal;
+}
+div#sqlalchemy-documentation .rubric{
+  font-size:14px;
+  background-color:#EEFFEF;
+  padding:5px;
+  border:1px solid #BFBFBF;
+}
+div#sqlalchemy-documentation a, div#sqlalchemy-documentation li {
+  padding:5px 0px;
+}
+
+div#getting-started {
+  border-bottom:1px solid;
+}
+
+div#sqlalchemy-documentation div#sqlalchemy-orm {
+  float:left;
+  width:48%;
+}
+
+div#sqlalchemy-documentation div#sqlalchemy-core {
+  float:left;
+  width:48%;
+  margin:0;
+  padding-left:10px;
+  border-left:1px solid;
+}
+
+div#dialect-documentation {
+  border-top:1px solid;
+  /*clear:left;*/
+}
diff --git a/lib/Mako-0.7.3/doc/build/static/makoLogo.png b/lib/Mako-0.7.3/doc/build/static/makoLogo.png
new file mode 100644
index 0000000000000000000000000000000000000000..c43c087eb48ebfc2223b76cf3df2fa7868c2a72b
GIT binary patch
[stripped]
diff --git a/lib/Mako-0.7.3/doc/build/static/site.css b/lib/Mako-0.7.3/doc/build/static/site.css
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/static/site.css
@@ -0,0 +1,86 @@
+body {
+    font-family: Tahoma, Geneva, sans-serif;
+    line-height:1.4em;
+    margin:15px;
+    background-color:#FFFFFF;
+}
+img {border:none;}
+a { text-decoration: none;}
+a:visited  { color: #2929ff;}
+a:hover { color: #0000ff;}
+
+#wrap {
+    margin:0 auto;
+    max-width:1024px;
+    min-width:480px;
+    position:relative;
+
+}
+h1 {
+    font-size:1.6em;
+    font-weight:bold;
+}
+
+h2 {
+    font-size:1.1em;
+    font-weight:bold;
+    margin:10px 0px 10px 0px;
+}
+
+.clearfix{
+    clear:both;
+}
+
+.red {
+	font-weight:bold;
+	color:#FF0000;
+}
+.rightbar {
+    float:right;
+}
+.slogan {
+    margin-top:10px;
+}
+#gittip_nav {
+    float:right;
+    margin:10px 0px 0px 0px;
+}
+
+.toolbar {
+    margin-top:20px;
+}
+.copyright {
+    font-size:.8em;
+    text-align:center;
+    color:909090;
+}
+.pylogo {
+	text-align:right;
+	float:right;
+}
+.code {
+    font-family:monospace;
+}
+
+li {
+    margin:1px 0px 1px 0px;
+}
+
+.speedchart td {
+    font-size:small;
+}
+
+pre.codesample {
+    margin: 1.5em;
+    padding: .5em;
+    font-size: .95em;
+    line-height:1em;
+    background-color: #eee;
+    border: 1px solid #ccc;
+    width:450px;
+    overflow:auto;
+}
+
+#speedchart {
+    margin:5px 10px 5px 10px;
+}
diff --git a/lib/Mako-0.7.3/doc/build/syntax.rst b/lib/Mako-0.7.3/doc/build/syntax.rst
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/syntax.rst
@@ -0,0 +1,469 @@
+.. _syntax_toplevel:
+
+======
+Syntax
+======
+
+A Mako template is parsed from a text stream containing any kind
+of content, XML, HTML, email text, etc. The template can further
+contain Mako-specific directives which represent variable and/or
+expression substitutions, control structures (i.e. conditionals
+and loops), server-side comments, full blocks of Python code, as
+well as various tags that offer additional functionality. All of
+these constructs compile into real Python code. This means that
+you can leverage the full power of Python in almost every aspect
+of a Mako template.
+
+Expression Substitution
+=======================
+
+The simplest expression is just a variable substitution. The
+syntax for this is the ``${}`` construct, which is inspired by
+Perl, Genshi, JSP EL, and others:
+
+.. sourcecode:: mako
+
+    this is x: ${x}
+
+Above, the string representation of ``x`` is applied to the
+template's output stream. If you're wondering where ``x`` comes
+from, it's usually from the :class:`.Context` supplied to the
+template's rendering function. If ``x`` was not supplied to the
+template and was not otherwise assigned locally, it evaluates to
+a special value ``UNDEFINED``. More on that later.
+
+The contents within the ``${}`` tag are evaluated by Python
+directly, so full expressions are OK:
+
+.. sourcecode:: mako
+
+    pythagorean theorem:  ${pow(x,2) + pow(y,2)}
+
+The results of the expression are evaluated into a string result
+in all cases before being rendered to the output stream, such as
+the above example where the expression produces a numeric
+result.
+
+Expression Escaping
+===================
+
+Mako includes a number of built-in escaping mechanisms,
+including HTML, URI and XML escaping, as well as a "trim"
+function. These escapes can be added to an expression
+substitution using the ``|`` operator:
+
+.. sourcecode:: mako
+
+    ${"this is some text" | u}
+
+The above expression applies URL escaping to the expression, and
+produces ``this+is+some+text``. The ``u`` name indicates URL
+escaping, whereas ``h`` represents HTML escaping, ``x``
+represents XML escaping, and ``trim`` applies a trim function.
+
+Read more about built-in filtering functions, including how to
+make your own filter functions, in :ref:`filtering_toplevel`.
+
+Control Structures
+==================
+
+A control structure refers to all those things that control the
+flow of a program -- conditionals (i.e. ``if``/``else``), loops (like
+``while`` and ``for``), as well as things like ``try``/``except``. In Mako,
+control structures are written using the ``%`` marker followed
+by a regular Python control expression, and are "closed" by
+using another ``%`` marker with the tag "``end<name>``", where
+"``<name>``" is the keyword of the expression:
+
+.. sourcecode:: mako
+
+    % if x==5:
+        this is some output
+    % endif
+
+The ``%`` can appear anywhere on the line as long as no text
+precedes it; indentation is not significant. The full range of
+Python "colon" expressions are allowed here, including
+``if``/``elif``/``else``, ``while``, ``for``, and even ``def``, although
+Mako has a built-in tag for defs which is more full-featured.
+
+.. sourcecode:: mako
+
+    % for a in ['one', 'two', 'three', 'four', 'five']:
+        % if a[0] == 't':
+        its two or three
+        % elif a[0] == 'f':
+        four/five
+        % else:
+        one
+        % endif
+    % endfor
+
+The ``%`` sign can also be "escaped", if you actually want to
+emit a percent sign as the first non whitespace character on a
+line, by escaping it as in ``%%``:
+
+.. sourcecode:: mako
+
+    %% some text
+
+        %% some more text
+
+The Loop Context
+----------------
+
+The **loop context** provides additional information about a loop
+while inside of a ``% for`` structure:
+
+.. sourcecode:: mako
+
+    <ul>
+    % for a in ("one", "two", "three"):
+        <li>Item ${loop.index}: ${a}</li>
+    % endfor
+    </ul>
+
+See :ref:`loop_context` for more information on this feature.
+
+.. versionadded:: 0.7
+
+Comments
+========
+
+Comments come in two varieties. The single line comment uses
+``##`` as the first non-space characters on a line:
+
+.. sourcecode:: mako
+
+    ## this is a comment.
+    ...text ...
+
+A multiline version exists using ``<%doc> ...text... </%doc>``:
+
+.. sourcecode:: mako
+
+    <%doc>
+        these are comments
+        more comments
+    </%doc>
+
+Newline Filters
+===============
+
+The backslash ("``\``") character, placed at the end of any
+line, will consume the newline character before continuing to
+the next line:
+
+.. sourcecode:: mako
+
+    here is a line that goes onto \
+    another line.
+
+The above text evaluates to:
+
+.. sourcecode:: text
+
+    here is a line that goes onto another line.
+
+Python Blocks
+=============
+
+Any arbitrary block of python can be dropped in using the ``<%
+%>`` tags:
+
+.. sourcecode:: mako
+
+    this is a template
+    <%
+        x = db.get_resource('foo')
+        y = [z.element for z in x if x.frobnizzle==5]
+    %>
+    % for elem in y:
+        element: ${elem}
+    % endfor
+
+Within ``<% %>``, you're writing a regular block of Python code.
+While the code can appear with an arbitrary level of preceding
+whitespace, it has to be consistently formatted with itself.
+Mako's compiler will adjust the block of Python to be consistent
+with the surrounding generated Python code.
+
+Module-level Blocks
+===================
+
+A variant on ``<% %>`` is the module-level code block, denoted
+by ``<%! %>``. Code within these tags is executed at the module
+level of the template, and not within the rendering function of
+the template. Therefore, this code does not have access to the
+template's context and is only executed when the template is
+loaded into memory (which can be only once per application, or
+more, depending on the runtime environment). Use the ``<%! %>``
+tags to declare your template's imports, as well as any
+pure-Python functions you might want to declare:
+
+.. sourcecode:: mako
+
+    <%!
+        import mylib
+        import re
+
+        def filter(text):
+            return re.sub(r'^@', '', text)
+    %>
+
+Any number of ``<%! %>`` blocks can be declared anywhere in a
+template; they will be rendered in the resulting module 
+in a single contiguous block above all render callables,
+in the order in which they appear in the source template.
+
+Tags
+====
+
+The rest of what Mako offers takes place in the form of tags.
+All tags use the same syntax, which is similar to an XML tag
+except that the first character of the tag name is a ``%``
+character. The tag is closed either by a contained slash
+character, or an explicit closing tag:
+
+.. sourcecode:: mako
+
+    <%include file="foo.txt"/>
+
+    <%def name="foo" buffered="True">
+        this is a def
+    </%def>
+
+All tags have a set of attributes which are defined for each
+tag. Some of these attributes are required. Also, many
+attributes support **evaluation**, meaning you can embed an
+expression (using ``${}``) inside the attribute text:
+
+.. sourcecode:: mako
+
+    <%include file="/foo/bar/${myfile}.txt"/>
+
+Whether or not an attribute accepts runtime evaluation depends
+on the type of tag and how that tag is compiled into the
+template. The best way to find out if you can stick an
+expression in is to try it! The lexer will tell you if it's not
+valid.
+
+Heres a quick summary of all the tags:
+
+``<%page>``
+-----------
+
+This tag defines general characteristics of the template,
+including caching arguments, and optional lists of arguments
+which the template expects when invoked.
+
+.. sourcecode:: mako
+
+    <%page args="x, y, z='default'"/>
+
+Or a page tag that defines caching characteristics:
+
+.. sourcecode:: mako
+
+    <%page cached="True" cache_type="memory"/>
+
+Currently, only one ``<%page>`` tag gets used per template, the
+rest get ignored. While this will be improved in a future
+release, for now make sure you have only one ``<%page>`` tag
+defined in your template, else you may not get the results you
+want. The details of what ``<%page>`` is used for are described
+further in :ref:`namespaces_body` as well as :ref:`caching_toplevel`.
+
+``<%include>``
+--------------
+
+A tag that is familiar from other template languages, ``%include``
+is a regular joe that just accepts a file argument and calls in
+the rendered result of that file:
+
+.. sourcecode:: mako
+
+    <%include file="header.html"/>
+
+        hello world
+
+    <%include file="footer.html"/>
+
+Include also accepts arguments which are available as ``<%page>`` arguments in the receiving template:
+
+.. sourcecode:: mako
+
+    <%include file="toolbar.html" args="current_section='members', username='ed'"/>
+
+``<%def>``
+----------
+
+The ``%def`` tag defines a Python function which contains a set
+of content, that can be called at some other point in the
+template. The basic idea is simple:
+
+.. sourcecode:: mako
+
+    <%def name="myfunc(x)">
+        this is myfunc, x is ${x}
+    </%def>
+
+    ${myfunc(7)}
+
+The ``%def`` tag is a lot more powerful than a plain Python ``def``, as
+the Mako compiler provides many extra services with ``%def`` that
+you wouldn't normally have, such as the ability to export defs
+as template "methods", automatic propagation of the current
+:class:`.Context`, buffering/filtering/caching flags, and def calls
+with content, which enable packages of defs to be sent as
+arguments to other def calls (not as hard as it sounds). Get the
+full deal on what ``%def`` can do in :ref:`defs_toplevel`.
+
+``<%block>``
+------------
+
+``%block`` is a tag that is close to a ``%def``,
+except executes itself immediately in its base-most scope,
+and can also be anonymous (i.e. with no name):
+
+.. sourcecode:: mako
+
+    <%block filter="h">
+        some <html> stuff.
+    </%block>
+
+Inspired by Jinja2 blocks, named blocks offer a syntactically pleasing way
+to do inheritance:
+
+.. sourcecode:: mako
+
+    <html>
+        <body>
+        <%block name="header">
+            <h2><%block name="title"/></h2>
+        </%block>
+        ${self.body()}
+        </body>
+    </html>
+
+Blocks are introduced in :ref:`blocks` and further described in :ref:`inheritance_toplevel`.
+
+.. versionadded:: 0.4.1
+
+``<%namespace>``
+----------------
+
+``%namespace`` is Mako's equivalent of Python's ``import``
+statement. It allows access to all the rendering functions and
+metadata of other template files, plain Python modules, as well
+as locally defined "packages" of functions.
+
+.. sourcecode:: mako
+
+    <%namespace file="functions.html" import="*"/>
+
+The underlying object generated by ``%namespace``, an instance of
+:class:`.mako.runtime.Namespace`, is a central construct used in
+templates to reference template-specific information such as the
+current URI, inheritance structures, and other things that are
+not as hard as they sound right here. Namespaces are described
+in :ref:`namespaces_toplevel`.
+
+``<%inherit>``
+--------------
+
+Inherit allows templates to arrange themselves in **inheritance
+chains**. This is a concept familiar in many other template
+languages.
+
+.. sourcecode:: mako
+
+    <%inherit file="base.html"/>
+
+When using the ``%inherit`` tag, control is passed to the topmost
+inherited template first, which then decides how to handle
+calling areas of content from its inheriting templates. Mako
+offers a lot of flexibility in this area, including dynamic
+inheritance, content wrapping, and polymorphic method calls.
+Check it out in :ref:`inheritance_toplevel`.
+
+``<%``\ nsname\ ``:``\ defname\ ``>``
+-------------------------------------
+
+Any user-defined "tag" can be created against
+a namespace by using a tag with a name of the form
+``<%<namespacename>:<defname>>``. The closed and open formats of such a
+tag are equivalent to an inline expression and the ``<%call>``
+tag, respectively.
+
+.. sourcecode:: mako
+
+    <%mynamespace:somedef param="some value">
+        this is the body
+    </%mynamespace:somedef>
+
+To create custom tags which accept a body, see
+:ref:`defs_with_content`.
+
+.. versionadded:: 0.2.3
+
+``<%call>``
+-----------
+
+The call tag is the "classic" form of a user-defined tag, and is
+roughly equivalent to the ``<%namespacename:defname>`` syntax
+described above. This tag is also described in :ref:`defs_with_content`.
+
+``<%doc>``
+----------
+
+The ``%doc`` tag handles multiline comments:
+
+.. sourcecode:: mako
+
+    <%doc>
+        these are comments
+        more comments
+    </%doc>
+
+Also the ``##`` symbol as the first non-space characters on a line can be used for single line comments.
+
+``<%text>``
+-----------
+
+This tag suspends the Mako lexer's normal parsing of Mako
+template directives, and returns its entire body contents as
+plain text. It is used pretty much to write documentation about
+Mako:
+
+.. sourcecode:: mako
+
+    <%text filter="h">
+        heres some fake mako ${syntax}
+        <%def name="x()">${x}</%def>
+    </%text>
+
+Returning Early from a Template
+===============================
+
+Sometimes you want to stop processing a template or ``<%def>``
+method in the middle and just use the text you've accumulated so
+far. You can use a ``return`` statement inside a Python
+block to do that.
+
+.. sourcecode:: mako
+
+    % if not len(records):
+        No records found.
+        <% return %>
+    % endif
+
+Or perhaps:
+
+.. sourcecode:: mako
+
+    <%
+        if not len(records):
+            return
+    %>
+
diff --git a/lib/Mako-0.7.3/doc/build/templates/base.mako b/lib/Mako-0.7.3/doc/build/templates/base.mako
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/templates/base.mako
@@ -0,0 +1,60 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<head>
+<title><%block name="head_title">Mako Templates for Python</%block></title>
+<%block name="headers">
+</%block>
+<link rel="stylesheet" href="${pathto('_static/site.css', 1)}"></link>
+
+
+</head>
+<body>
+    <div id="wrap">
+    <div class="rightbar">
+
+    % if toolbar:
+    <div id="gittip_nav">
+    <iframe style="border: 0; margin: 0; padding: 0;"
+    src="https://www.gittip.com/zzzeek/widget.html"
+    width="48pt" height="20pt"></iframe>
+    </div>
+    % endif
+
+    <div class="slogan">
+    Hyperfast and lightweight templating for the Python platform.
+    </div>
+
+    % if toolbar:
+    <div class="toolbar">
+    <a href="${site_base}/">Home</a>
+      |  
+    <a href="${site_base}/trac">Trac</a>
+      |  
+    <a href="${site_base}/community.html">Community</a>
+      |  
+    <a href="${pathto('index')}">Documentation</a>
+      |  
+    <a href="${site_base}/download.html">Download</a>
+    </div>
+    % endif
+
+    </div>
+
+    <a href="${site_base}/"><img src="${pathto('_static/makoLogo.png', 1)}" /></a>
+
+    <hr/>
+
+    ${next.body()}
+<div class="clearfix">
+<%block name="footer">
+<hr/>
+
+<div class="copyright">Website content copyright © by Michael Bayer.
+    All rights reserved.  Mako and its documentation are licensed
+    under the MIT license.  mike(&)zzzcomputing.com</div>
+</%block>
+</div>
+</div>
+</body>
+</html>
diff --git a/lib/Mako-0.7.3/doc/build/templates/genindex.mako b/lib/Mako-0.7.3/doc/build/templates/genindex.mako
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/templates/genindex.mako
@@ -0,0 +1,77 @@
+<%inherit file="${context['layout']}"/>
+
+<%block name="show_title" filter="util.striptags">
+    ${_('Index')}
+</%block>
+
+   <h1 id="index">${_('Index')}</h1>
+
+   % for i, (key, dummy) in enumerate(genindexentries):
+    ${i != 0 and '| ' or ''}<a href="#${key}"><strong>${key}</strong></a>
+   % endfor
+
+   <hr />
+
+   % for i, (key, entries) in enumerate(genindexentries):
+<h2 id="${key}">${key}</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    <%
+        breakat = genindexcounts[i] // 2
+        numcols = 1
+        numitems = 0
+    %>
+% for entryname, (links, subitems) in entries:
+
+<dt>
+    % if links:
+        <a href="${links[0][1]}">${entryname|h}</a>
+        % for unknown, link in links[1:]:
+            , <a href="${link}">[${i}]</a>
+        % endfor
+    % else:
+        ${entryname|h}
+    % endif
+</dt>
+
+    % if subitems:
+    <dd><dl>
+      % for subentryname, subentrylinks in subitems:
+      <dt><a href="${subentrylinks[0][1]}">${subentryname|h}</a>
+              % for j, (unknown, link) in enumerate(subentrylinks[1:]):
+                  <a href="${link}">[${j}]</a>
+              % endfor
+      </dt>
+      % endfor
+    </dl></dd>
+    % endif
+
+  <%
+    numitems = numitems + 1 + len(subitems)
+  %>
+  % if numcols <2 and numitems > breakat:
+     <%
+        numcols = numcols + 1
+     %>
+        </dl></td><td width="33%" valign="top"><dl>
+  % endif
+
+% endfor
+<dt></dt></dl>
+</td></tr></table>
+% endfor
+
+<%def name="sidebarrel()">
+% if split_index:
+   <h4>${_('Index')}</h4>
+   <p>
+   % for i, (key, dummy) in enumerate(genindexentries):
+       ${i > 0 and '| ' or ''}
+       <a href="${pathto('genindex-' + key)}"><strong>${key}</strong></a>
+   % endfor
+   </p>
+
+   <p><a href="${pathto('genindex-all')}"><strong>${_('Full index on one page')}</strong></a></p>
+% endif
+   ${parent.sidebarrel()}
+</%def>
diff --git a/lib/Mako-0.7.3/doc/build/templates/layout.mako b/lib/Mako-0.7.3/doc/build/templates/layout.mako
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/templates/layout.mako
@@ -0,0 +1,199 @@
+## coding: utf-8
+<%!
+    local_script_files = []
+%>
+<%doc>
+    Structural elements are all prefixed with "docs-"
+    to prevent conflicts when the structure is integrated into the 
+    main site.
+    
+    docs-container ->
+        docs-header ->
+            docs-search
+            docs-version-header
+        docs-top-navigation
+            docs-top-page-control
+            docs-navigation-banner
+        docs-body-container ->
+            docs-sidebar
+            docs-body
+        docs-bottom-navigation
+            docs-copyright
+</%doc>
+
+<%inherit file="base.mako"/>
+
+<%
+withsidebar = bool(toc) and current_page_name != 'index'
+%>
+
+<%block name="head_title">
+    % if current_page_name != 'index':
+    ${capture(self.show_title) | util.striptags} — 
+    % endif
+    ${docstitle|h}
+</%block>
+
+
+<div id="docs-container">
+
+<%block name="headers">
+    <link rel="stylesheet" href="${pathto('_static/pygments.css', 1)}" type="text/css" />
+    <link rel="stylesheet" href="${pathto('_static/docs.css', 1)}" type="text/css" />
+
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+          URL_ROOT:    '${pathto("", 1)}',
+          VERSION:     '${release|h}',
+          COLLAPSE_MODINDEX: false,
+          FILE_SUFFIX: '${file_suffix}'
+      };
+    </script>
+    % for scriptfile in script_files + self.attr.local_script_files:
+        <script type="text/javascript" src="${pathto(scriptfile, 1)}"></script>
+    % endfor
+    % if hasdoc('about'):
+        <link rel="author" title="${_('About these documents')}" href="${pathto('about')}" />
+    % endif
+    <link rel="index" title="${_('Index')}" href="${pathto('genindex')}" />
+    <link rel="search" title="${_('Search')}" href="${pathto('search')}" />
+    % if hasdoc('copyright'):
+        <link rel="copyright" title="${_('Copyright')}" href="${pathto('copyright')}" />
+    % endif
+    <link rel="top" title="${docstitle|h}" href="${pathto('index')}" />
+    % if parents:
+        <link rel="up" title="${parents[-1]['title']|util.striptags}" href="${parents[-1]['link']|h}" />
+    % endif
+    % if nexttopic:
+        <link rel="next" title="${nexttopic['title']|util.striptags}" href="${nexttopic['link']|h}" />
+    % endif
+    % if prevtopic:
+        <link rel="prev" title="${prevtopic['title']|util.striptags}" href="${prevtopic['link']|h}" />
+    % endif
+</%block>
+
+<div id="docs-header">
+    <h1>${docstitle|h}</h1>
+
+    <div id="docs-search">
+    Search:
+    <form class="search" action="${pathto('search')}" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="${_('Search')}" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </div>
+
+    <div id="docs-version-header">
+        Release: <span class="version-num">${release}</span>
+
+    </div>
+
+</div>
+
+<div id="docs-top-navigation">
+    <div id="docs-top-page-control" class="docs-navigation-links">
+        <ul>
+        % if prevtopic:
+            <li>Prev:
+            <a href="${prevtopic['link']|h}" title="${_('previous chapter')}">${prevtopic['title']}</a>
+            </li>
+        % endif
+        % if nexttopic:
+            <li>Next:
+            <a href="${nexttopic['link']|h}" title="${_('next chapter')}">${nexttopic['title']}</a>
+            </li>
+        % endif
+
+        <li>
+            <a href="${pathto('index')}">Table of Contents</a> |
+            <a href="${pathto('genindex')}">Index</a>
+            % if sourcename:
+            | <a href="${pathto('_sources/' + sourcename, True)|h}">${_('view source')}
+            % endif
+        </li>
+        </ul>
+    </div>
+
+    <div id="docs-navigation-banner">
+        <a href="${pathto('index')}">${docstitle|h}</a>
+        % if parents:
+            % for parent in parents:
+                » <a href="${parent['link']|h}" title="${parent['title']}">${parent['title']}</a>
+            % endfor
+        % endif
+        % if current_page_name != 'index':
+        » ${self.show_title()} 
+        % endif
+
+        <h2>
+            <%block name="show_title">
+                ${title}
+            </%block>
+        </h2>
+    </div>
+
+</div>
+
+<div id="docs-body-container">
+
+% if withsidebar:
+    <div id="docs-sidebar">
+    <h3><a href="${pathto('index')}">Table of Contents</a></h3>
+    ${toc}
+
+    % if prevtopic:
+    <h4>Previous Topic</h4>
+    <p>
+    <a href="${prevtopic['link']|h}" title="${_('previous chapter')}">${prevtopic['title']}</a>
+    </p>
+    % endif
+    % if nexttopic:
+    <h4>Next Topic</h4>
+    <p>
+    <a href="${nexttopic['link']|h}" title="${_('next chapter')}">${nexttopic['title']}</a>
+    </p>
+    % endif
+
+    <h4>Quick Search</h4>
+    <p>
+    <form class="search" action="${pathto('search')}" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="${_('Search')}" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </p>
+
+    </div>
+% endif
+
+    <div id="docs-body" class="${'withsidebar' if withsidebar else ''}" >
+        ${next.body()}
+    </div>
+
+</div>
+
+<div id="docs-bottom-navigation" class="docs-navigation-links">
+    % if prevtopic:
+        Previous:
+        <a href="${prevtopic['link']|h}" title="${_('previous chapter')}">${prevtopic['title']}</a>
+    % endif
+    % if nexttopic:
+        Next:
+        <a href="${nexttopic['link']|h}" title="${_('next chapter')}">${nexttopic['title']}</a>
+    % endif
+
+    <div id="docs-copyright">
+    % if hasdoc('copyright'):
+        © <a href="${pathto('copyright')}">Copyright</a> ${copyright|h}.
+    % else:
+        © Copyright ${copyright|h}.
+    % endif
+    % if show_sphinx:
+        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> ${sphinx_version|h} 
+        with Mako templates.
+    % endif
+    </div>
+</div>
+
+</div>
diff --git a/lib/Mako-0.7.3/doc/build/templates/page.mako b/lib/Mako-0.7.3/doc/build/templates/page.mako
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/templates/page.mako
@@ -0,0 +1,2 @@
+<%inherit file="${context['layout']}"/>
+${body| util.strip_toplevel_anchors}
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/doc/build/templates/rtd_layout.mako b/lib/Mako-0.7.3/doc/build/templates/rtd_layout.mako
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/templates/rtd_layout.mako
@@ -0,0 +1,174 @@
+<!-- readthedocs add-in template, ported from their jinja source -->
+
+<%inherit file="/layout.mako"/>
+
+<%
+    newscript = []
+    # strip out script files that RTD wants to provide
+    for script in script_files:
+        for token in ("jquery.js", "underscore.js", "doctools.js"):
+            if token in script:
+                break
+        else:
+            newscript.append(script)
+    script_files[:] = newscript
+%>
+
+<%block name="headers">
+    ${parent.headers()}
+<!-- RTD <head> -->
+<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
+<script type="text/javascript" src="${MEDIA_URL}javascript/underscore.js"></script>
+<script type="text/javascript" src="${MEDIA_URL}javascript/doctools.js"></script>
+<script type="text/javascript" src="${MEDIA_URL}javascript/searchtools.js"></script>
+##{% if using_theme %}
+##  <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
+##{% endif %}
+  <script type="text/javascript">
+    var doc_version = "${current_version}";
+    var doc_slug = "${slug}";
+  </script>
+  <script type="text/javascript" src="${MEDIA_URL}javascript/rtd.js"></script>
+<!-- end RTD <head> -->
+</%block>
+
+${next.body()}
+
+<%block name="footer">
+    ${parent.footer()}
+ <!-- End original user content -->
+## Keep this here, so that the RTD logo doesn't stomp on the bottom of the theme.
+<br>
+<br>
+<br>
+
+<style type="text/css">
+  .badge {
+    position: fixed;
+    display: block;
+    bottom: 5px;
+    height: 40px;
+    text-indent: -9999em;
+    border-radius: 3px;
+    -moz-border-radius: 3px;
+    -webkit-border-radius: 3px;
+    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
+    -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
+    -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
+  }
+  #version_menu {
+    position: fixed;
+    display: none;
+    bottom: 11px;
+    right: 166px;
+    list-style-type: none;
+    margin: 0;
+  }
+  .footer_popout:hover #version_menu {
+    display: block;
+  }
+  #version_menu li {
+    display: block;
+    float: right;
+  }
+  #version_menu li a {
+    display: block;
+    padding: 6px 10px 4px 10px;
+    margin: 7px 7px 0 0;
+    font-weight: bold;
+    font-size: 14px;
+    height: 20px;
+    line-height: 17px;
+    text-decoration: none;
+    color: #fff;
+    background: #8ca1af url(../images/gradient-light.png) bottom left repeat-x;
+    border-radius: 3px;
+    -moz-border-radius: 3px;
+    -webkit-border-radius: 3px;
+    box-shadow: 0 1px 1px #465158;
+    -moz-box-shadow: 0 1px 1px #465158;
+    -webkit-box-shadow: 0 1px 1px #465158;
+    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
+  }
+  #version_menu li a:hover {
+    text-decoration: none;
+    background-color: #697983;
+    box-shadow: 0 1px 0px #465158;
+    -moz-box-shadow: 0 1px 0px #465158;
+    -webkit-box-shadow: 0 1px 0px #465158;
+  }
+  .badge.rtd {
+    background: #257597 url(http://media.readthedocs.org/images/badge-rtd.png) top left no-repeat;
+    border: 1px solid #282E32;
+    width: 160px;
+    right: 5px;
+  }
+  .badge.revsys { background: #465158 url(http://media.readthedocs.org/images/badge-revsys.png) top left no-repeat;
+    border: 1px solid #1C5871;
+    width: 290px;
+    right: 173px;
+  }
+  .badge.revsys-inline-sponsored {
+    position: inherit;
+    margin-left: auto;
+    margin-right: 175px;
+    margin-bottom: 5px;
+    background: #465158 url(http://media.readthedocs.org/images/badge-revsys.png) top left no-repeat;
+    border: 1px solid #1C5871;
+    width: 290px;
+    right: 173px;
+  }
+  .badge.revsys-inline {
+    position: inherit;
+    margin-left: auto;
+    margin-right: 175px;
+    margin-bottom: 5px;
+    background: #465158 url(http://media.readthedocs.org/images/badge-revsys-sm.png) top left no-repeat;
+    border: 1px solid #1C5871;
+    width: 205px;
+    right: 173px;
+  }
+
+</style>
+<div class="rtd_doc_footer">
+  <div class="footer_popout">
+    <a href="http://readthedocs.org/projects/${slug}/?fromdocs=${slug}" class="badge rtd">Brought to you by Read the Docs</a>
+    <ul id="version_menu">
+      ## note that rtd.js blows this away, probably checks if the links
+      ## are good or something like that (in which case why are they in the 'versions' 
+      ## collection...)
+      % for _slug, url in versions:
+        <li><a href="http://readthedocs.org${url}">${_slug}</a></li>
+      % endfor
+    </ul>
+  </div>
+</div>
+<!-- RTD Analytics Code -->
+<script type="text/javascript">
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-17997319-1']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+</script>
+
+% if analytics_code:
+<!-- User Analytics Code -->
+<script type="text/javascript">
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', '${analytics_code}']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+</script>
+% endif
+
+</%block>
diff --git a/lib/Mako-0.7.3/doc/build/templates/search.mako b/lib/Mako-0.7.3/doc/build/templates/search.mako
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/templates/search.mako
@@ -0,0 +1,25 @@
+<%inherit file="${context['layout']}"/>
+
+<%!
+    local_script_files = ['_static/searchtools.js']
+%>
+
+<%block name="show_title" filter="util.striptags">
+    ${_('Search')}
+</%block>
+
+<div id="searchform">
+<h3>Enter Search Terms:</h3>
+<form class="search" action="${pathto('search')}" method="get">
+  <input type="text" name="q" size="18" /> <input type="submit" value="${_('Search')}" />
+  <input type="hidden" name="check_keywords" value="yes" />
+  <input type="hidden" name="area" value="default" />
+</form>
+</div>
+
+<div id="search-results"></div>
+
+<%block name="footer">
+    ${parent.footer()}
+    <script type="text/javascript" src="searchindex.js"></script>
+</%block>
diff --git a/lib/Mako-0.7.3/doc/build/unicode.rst b/lib/Mako-0.7.3/doc/build/unicode.rst
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/unicode.rst
@@ -0,0 +1,345 @@
+.. _unicode_toplevel:
+
+===================
+The Unicode Chapter
+===================
+
+The Python language supports two ways of representing what we
+know as "strings", i.e. series of characters. In Python 2, the
+two types are ``string`` and ``unicode``, and in Python 3 they are
+``bytes`` and ``string``. A key aspect of the Python 2 ``string`` and
+Python 3 ``bytes`` types are that they contain no information
+regarding what **encoding** the data is stored in. For this
+reason they were commonly referred to as **byte strings** on
+Python 2, and Python 3 makes this name more explicit. The
+origins of this come from Python's background of being developed
+before the Unicode standard was even available, back when
+strings were C-style strings and were just that, a series of
+bytes. Strings that had only values below 128 just happened to
+be **ASCII** strings and were printable on the console, whereas
+strings with values above 128 would produce all kinds of
+graphical characters and bells.
+
+Contrast the "byte-string" type with the "unicode/string" type.
+Objects of this latter type are created whenever you say something like
+``u"hello world"`` (or in Python 3, just ``"hello world"``). In this
+case, Python represents each character in the string internally
+using multiple bytes per character (something similar to
+UTF-16). What's important is that when using the
+``unicode``/``string`` type to store strings, Python knows the
+data's encoding; it's in its own internal format. Whereas when
+using the ``string``/``bytes`` type, it does not.
+
+When Python 2 attempts to treat a byte-string as a string, which
+means it's attempting to compare/parse its characters, to coerce
+it into another encoding, or to decode it to a unicode object,
+it has to guess what the encoding is. In this case, it will
+pretty much always guess the encoding as ``ascii``... and if the
+byte-string contains bytes above value 128, you'll get an error.
+Python 3 eliminates much of this confusion by just raising an
+error unconditionally if a byte-string is used in a
+character-aware context.
+
+There is one operation that Python *can* do with a non-ASCII
+byte-string, and it's a great source of confusion: it can dump the
+byte-string straight out to a stream or a file, with nary a care
+what the encoding is. To Python, this is pretty much like
+dumping any other kind of binary data (like an image) to a
+stream somewhere. In Python 2, it is common to see programs that
+embed all kinds of international characters and encodings into
+plain byte-strings (i.e. using ``"hello world"`` style literals)
+can fly right through their run, sending reams of strings out to
+wherever they are going, and the programmer, seeing the same
+output as was expressed in the input, is now under the illusion
+that his or her program is Unicode-compliant. In fact, their
+program has no unicode awareness whatsoever, and similarly has
+no ability to interact with libraries that *are* unicode aware.
+Python 3 makes this much less likely by defaulting to unicode as
+the storage format for strings.
+
+The "pass through encoded data" scheme is what template
+languages like Cheetah and earlier versions of Myghty do by
+default. Mako as of version 0.2 also supports this mode of
+operation when using Python 2, using the ``disable_unicode=True``
+flag. However, when using Mako in its default mode of
+unicode-aware, it requires explicitness when dealing with
+non-ASCII encodings. Additionally, if you ever need to handle
+unicode strings and other kinds of encoding conversions more
+intelligently, the usage of raw byte-strings quickly becomes a
+nightmare, since you are sending the Python interpreter
+collections of bytes for which it can make no intelligent
+decisions with regards to encoding. In Python 3 Mako only allows
+usage of native, unicode strings.
+
+In normal Mako operation, all parsed template constructs and
+output streams are handled internally as Python ``unicode``
+objects. It's only at the point of :meth:`~.Template.render` that this unicode
+stream may be rendered into whatever the desired output encoding
+is. The implication here is that the template developer must
+:ensure that :ref:`the encoding of all non-ASCII templates is explicit
+<set_template_file_encoding>` (still required in Python 3),
+that :ref:`all non-ASCII-encoded expressions are in one way or another
+converted to unicode <handling_non_ascii_expressions>`
+(not much of a burden in Python 3), and that :ref:`the output stream of the
+template is handled as a unicode stream being encoded to some
+encoding <defining_output_encoding>` (still required in Python 3).
+
+.. _set_template_file_encoding:
+
+Specifying the Encoding of a Template File
+==========================================
+
+This is the most basic encoding-related setting, and it is
+equivalent to Python's "magic encoding comment", as described in
+`pep-0263 <http://www.python.org/dev/peps/pep-0263/>`_. Any
+template that contains non-ASCII characters requires that this
+comment be present so that Mako can decode to unicode (and also
+make usage of Python's AST parsing services). Mako's lexer will
+use this encoding in order to convert the template source into a
+``unicode`` object before continuing its parsing:
+
+.. sourcecode:: mako
+
+    ## -*- coding: utf-8 -*-
+
+    Alors vous imaginez ma surprise, au lever du jour, quand 
+    une drôle de petite voix m’a réveillé. Elle disait:
+     « S’il vous plaît… dessine-moi un mouton! »
+
+For the picky, the regular expression used is derived from that
+of the above mentioned pep:
+
+.. sourcecode:: python
+
+    #.*coding[:=]\s*([-\w.]+).*\n
+
+The lexer will convert to unicode in all cases, so that if any
+characters exist in the template that are outside of the
+specified encoding (or the default of ``ascii``), the error will
+be immediate.
+
+As an alternative, the template encoding can be specified
+programmatically to either :class:`.Template` or :class:`.TemplateLookup` via
+the ``input_encoding`` parameter:
+
+.. sourcecode:: python
+
+    t = TemplateLookup(directories=['./'], input_encoding='utf-8')
+
+The above will assume all located templates specify ``utf-8``
+encoding, unless the template itself contains its own magic
+encoding comment, which takes precedence.
+
+.. _handling_non_ascii_expressions:
+
+Handling Expressions
+====================
+
+The next area that encoding comes into play is in expression
+constructs. By default, Mako's treatment of an expression like
+this:
+
+.. sourcecode:: mako
+
+    ${"hello world"}
+
+looks something like this:
+
+.. sourcecode:: python
+
+    context.write(unicode("hello world"))
+
+In Python 3, it's just:
+
+.. sourcecode:: python
+
+    context.write(str("hello world"))
+
+That is, **the output of all expressions is run through the
+``unicode`` built-in**. This is the default setting, and can be
+modified to expect various encodings. The ``unicode`` step serves
+both the purpose of rendering non-string expressions into
+strings (such as integers or objects which contain ``__str()__``
+methods), and to ensure that the final output stream is
+constructed as a unicode object. The main implication of this is
+that **any raw byte-strings that contain an encoding other than
+ASCII must first be decoded to a Python unicode object**. It
+means you can't say this in Python 2:
+
+.. sourcecode:: mako
+
+    ${"voix m’a réveillé."}  ## error in Python 2!
+
+You must instead say this:
+
+.. sourcecode:: mako
+
+    ${u"voix m’a réveillé."}  ## OK !
+
+Similarly, if you are reading data from a file that is streaming
+bytes, or returning data from some object that is returning a
+Python byte-string containing a non-ASCII encoding, you have to
+explicitly decode to unicode first, such as:
+
+.. sourcecode:: mako
+
+    ${call_my_object().decode('utf-8')}
+
+Note that filehandles acquired by ``open()`` in Python 3 default
+to returning "text", that is the decoding is done for you. See
+Python 3's documentation for the ``open()`` built-in for details on
+this.
+
+If you want a certain encoding applied to *all* expressions,
+override the ``unicode`` builtin with the ``decode`` built-in at the
+:class:`.Template` or :class:`.TemplateLookup` level:
+
+.. sourcecode:: python
+
+    t = Template(templatetext, default_filters=['decode.utf8'])
+
+Note that the built-in ``decode`` object is slower than the
+``unicode`` function, since unlike ``unicode`` it's not a Python
+built-in, and it also checks the type of the incoming data to
+determine if string conversion is needed first.
+
+The ``default_filters`` argument can be used to entirely customize
+the filtering process of expressions. This argument is described
+in :ref:`filtering_default_filters`.
+
+.. _defining_output_encoding:
+
+Defining Output Encoding
+========================
+
+Now that we have a template which produces a pure unicode output
+stream, all the hard work is done. We can take the output and do
+anything with it.
+
+As stated in the :doc:`"Usage" chapter <usage>`, both :class:`.Template` and
+:class:`.TemplateLookup` accept ``output_encoding`` and ``encoding_errors``
+parameters which can be used to encode the output in any Python
+supported codec:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+    from mako.lookup import TemplateLookup
+
+    mylookup = TemplateLookup(directories=['/docs'], output_encoding='utf-8', encoding_errors='replace')
+
+    mytemplate = mylookup.get_template("foo.txt")
+    print mytemplate.render()
+
+:meth:`~.Template.render` will return a ``bytes`` object in Python 3 if an output
+encoding is specified. By default it performs no encoding and
+returns a native string.
+
+:meth:`~.Template.render_unicode` will return the template output as a Python
+``unicode`` object (or ``string`` in Python 3):
+
+.. sourcecode:: python
+
+    print mytemplate.render_unicode()
+
+The above method disgards the output encoding keyword argument;
+you can encode yourself by saying:
+
+.. sourcecode:: python
+
+    print mytemplate.render_unicode().encode('utf-8', 'replace')
+
+Buffer Selection
+----------------
+
+Mako does play some games with the style of buffering used
+internally, to maximize performance. Since the buffer is by far
+the most heavily used object in a render operation, it's
+important!
+
+When calling :meth:`~.Template.render` on a template that does not specify any
+output encoding (i.e. it's ``ascii``), Python's ``cStringIO`` module,
+which cannot handle encoding of non-ASCII ``unicode`` objects
+(even though it can send raw byte-strings through), is used for
+buffering. Otherwise, a custom Mako class called
+``FastEncodingBuffer`` is used, which essentially is a super
+dumbed-down version of ``StringIO`` that gathers all strings into
+a list and uses ``u''.join(elements)`` to produce the final output
+-- it's markedly faster than ``StringIO``.
+
+.. _unicode_disabled:
+
+Saying to Heck with It: Disabling the Usage of Unicode Entirely
+===============================================================
+
+Some segments of Mako's userbase choose to make no usage of
+Unicode whatsoever, and instead would prefer the "pass through"
+approach; all string expressions in their templates return
+encoded byte-strings, and they would like these strings to pass
+right through. The only advantage to this approach is that
+templates need not use ``u""`` for literal strings; there's an
+arguable speed improvement as well since raw byte-strings
+generally perform slightly faster than unicode objects in
+Python. For these users, assuming they're sticking with Python
+2, they can hit the ``disable_unicode=True`` flag as so:
+
+.. sourcecode:: python
+
+    # -*- encoding:utf-8 -*-
+    from mako.template import Template
+
+    t = Template("drôle de petite voix m’a réveillé.", disable_unicode=True, input_encoding='utf-8')
+    print t.code
+
+The ``disable_unicode`` mode is strictly a Python 2 thing. It is
+not supported at all in Python 3.
+
+The generated module source code will contain elements like
+these:
+
+.. sourcecode:: python
+
+    # -*- encoding:utf-8 -*-
+    #  ...more generated code ...
+
+    def render_body(context,**pageargs):
+        context.caller_stack.push_frame()
+        try:
+            __M_locals = dict(pageargs=pageargs)
+            # SOURCE LINE 1
+            context.write('dr\xc3\xb4le de petite voix m\xe2\x80\x99a r\xc3\xa9veill\xc3\xa9.')
+            return ''
+        finally:
+            context.caller_stack.pop_frame()
+
+Where above that the string literal used within :meth:`.Context.write`
+is a regular byte-string.
+
+When ``disable_unicode=True`` is turned on, the ``default_filters``
+argument which normally defaults to ``["unicode"]`` now defaults
+to ``["str"]`` instead. Setting ``default_filters`` to the empty list
+``[]`` can remove the overhead of the ``str`` call. Also, in this
+mode you **cannot** safely call :meth:`~.Template.render_unicode` -- you'll get
+unicode/decode errors.
+
+The ``h`` filter (HTML escape) uses a less performant pure Python
+escape function in non-unicode mode. This because
+MarkupSafe only supports Python unicode objects for non-ASCII
+strings.
+
+.. versionchanged:: 0.3.4
+   In prior versions, it used ``cgi.escape()``, which has been replaced
+   with a function that also escapes single quotes.
+
+Rules for using ``disable_unicode=True``
+----------------------------------------
+
+* Don't use this mode unless you really, really want to and you
+  absolutely understand what you're doing.
+* Don't use this option just because you don't want to learn to
+  use Unicode properly; we aren't supporting user issues in this
+  mode of operation. We will however offer generous help for the
+  vast majority of users who stick to the Unicode program.
+* Python 3 is unicode by default, and the flag is not available
+  when running on Python 3.
+
diff --git a/lib/Mako-0.7.3/doc/build/usage.rst b/lib/Mako-0.7.3/doc/build/usage.rst
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/build/usage.rst
@@ -0,0 +1,520 @@
+.. _usage_toplevel:
+
+=====
+Usage
+=====
+
+Basic Usage
+===========
+
+This section describes the Python API for Mako templates. If you
+are using Mako within a web framework such as Pylons, the work
+of integrating Mako's API is already done for you, in which case
+you can skip to the next section, :ref:`syntax_toplevel`.
+
+The most basic way to create a template and render it is through
+the :class:`.Template` class:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+
+    mytemplate = Template("hello world!")
+    print mytemplate.render()
+
+Above, the text argument to :class:`.Template` is **compiled** into a
+Python module representation. This module contains a function
+called ``render_body()``, which produces the output of the
+template. When ``mytemplate.render()`` is called, Mako sets up a
+runtime environment for the template and calls the
+``render_body()`` function, capturing the output into a buffer and
+returning its string contents.
+
+
+The code inside the ``render_body()`` function has access to a
+namespace of variables. You can specify these variables by
+sending them as additional keyword arguments to the :meth:`~.Template.render`
+method:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+
+    mytemplate = Template("hello, ${name}!")
+    print mytemplate.render(name="jack")
+
+The :meth:`~.Template.render` method calls upon Mako to create a
+:class:`.Context` object, which stores all the variable names accessible
+to the template and also stores a buffer used to capture output.
+You can create this :class:`.Context` yourself and have the template
+render with it, using the :meth:`~.Template.render_context` method:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+    from mako.runtime import Context
+    from StringIO import StringIO
+
+    mytemplate = Template("hello, ${name}!")
+    buf = StringIO()
+    ctx = Context(buf, name="jack")
+    mytemplate.render_context(ctx)
+    print buf.getvalue()
+
+Using File-Based Templates
+==========================
+
+A :class:`.Template` can also load its template source code from a file,
+using the ``filename`` keyword argument:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+
+    mytemplate = Template(filename='/docs/mytmpl.txt')
+    print mytemplate.render()
+
+For improved performance, a :class:`.Template` which is loaded from a
+file can also cache the source code to its generated module on
+the filesystem as a regular Python module file (i.e. a ``.py``
+file). To do this, just add the ``module_directory`` argument to
+the template:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+
+    mytemplate = Template(filename='/docs/mytmpl.txt', module_directory='/tmp/mako_modules')
+    print mytemplate.render()
+
+When the above code is rendered, a file
+``/tmp/mako_modules/docs/mytmpl.txt.py`` is created containing the
+source code for the module. The next time a :class:`.Template` with the
+same arguments is created, this module file will be
+automatically re-used.
+
+.. _usage_templatelookup:
+
+Using ``TemplateLookup``
+========================
+
+All of the examples thus far have dealt with the usage of a
+single :class:`.Template` object. If the code within those templates
+tries to locate another template resource, it will need some way
+to find them, using simple URI strings. For this need, the
+resolution of other templates from within a template is
+accomplished by the :class:`.TemplateLookup` class. This class is
+constructed given a list of directories in which to search for
+templates, as well as keyword arguments that will be passed to
+the :class:`.Template` objects it creates:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+    from mako.lookup import TemplateLookup
+
+    mylookup = TemplateLookup(directories=['/docs'])
+    mytemplate = Template("""<%include file="header.txt"/> hello world!""", lookup=mylookup)
+
+Above, we created a textual template which includes the file
+``"header.txt"``. In order for it to have somewhere to look for
+``"header.txt"``, we passed a :class:`.TemplateLookup` object to it, which
+will search in the directory ``/docs`` for the file ``"header.txt"``.
+
+Usually, an application will store most or all of its templates
+as text files on the filesystem. So far, all of our examples
+have been a little bit contrived in order to illustrate the
+basic concepts. But a real application would get most or all of
+its templates directly from the :class:`.TemplateLookup`, using the
+aptly named :meth:`~.TemplateLookup.get_template` method, which accepts the URI of the
+desired template:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+    from mako.lookup import TemplateLookup
+
+    mylookup = TemplateLookup(directories=['/docs'], module_directory='/tmp/mako_modules')
+
+    def serve_template(templatename, **kwargs):
+        mytemplate = mylookup.get_template(templatename)
+        print mytemplate.render(**kwargs)
+
+In the example above, we create a :class:`.TemplateLookup` which will
+look for templates in the ``/docs`` directory, and will store
+generated module files in the ``/tmp/mako_modules`` directory. The
+lookup locates templates by appending the given URI to each of
+its search directories; so if you gave it a URI of
+``/etc/beans/info.txt``, it would search for the file
+``/docs/etc/beans/info.txt``, else raise a :class:`.TopLevelNotFound`
+exception, which is a custom Mako exception.
+
+When the lookup locates templates, it will also assign a ``uri``
+property to the :class:`.Template` which is the URI passed to the
+:meth:`~.TemplateLookup.get_template()` call. :class:`.Template` uses this URI to calculate the
+name of its module file. So in the above example, a
+``templatename`` argument of ``/etc/beans/info.txt`` will create a
+module file ``/tmp/mako_modules/etc/beans/info.txt.py``.
+
+Setting the Collection Size
+---------------------------
+
+The :class:`.TemplateLookup` also serves the important need of caching a
+fixed set of templates in memory at a given time, so that
+successive URI lookups do not result in full template
+compilations and/or module reloads on each request. By default,
+the :class:`.TemplateLookup` size is unbounded. You can specify a fixed
+size using the ``collection_size`` argument:
+
+.. sourcecode:: python
+
+    mylookup = TemplateLookup(directories=['/docs'],
+                    module_directory='/tmp/mako_modules', collection_size=500)
+
+The above lookup will continue to load templates into memory
+until it reaches a count of around 500. At that point, it will
+clean out a certain percentage of templates using a least
+recently used scheme.
+
+Setting Filesystem Checks
+-------------------------
+
+Another important flag on :class:`.TemplateLookup` is
+``filesystem_checks``. This defaults to ``True``, and says that each
+time a template is returned by the :meth:`~.TemplateLookup.get_template()` method, the
+revision time of the original template file is checked against
+the last time the template was loaded, and if the file is newer
+will reload its contents and recompile the template. On a
+production system, setting ``filesystem_checks`` to ``False`` can
+afford a small to moderate performance increase (depending on
+the type of filesystem used).
+
+.. _usage_unicode:
+
+Using Unicode and Encoding
+==========================
+
+Both :class:`.Template` and :class:`.TemplateLookup` accept ``output_encoding``
+and ``encoding_errors`` parameters which can be used to encode the
+output in any Python supported codec:
+
+.. sourcecode:: python
+
+    from mako.template import Template
+    from mako.lookup import TemplateLookup
+
+    mylookup = TemplateLookup(directories=['/docs'], output_encoding='utf-8', encoding_errors='replace')
+
+    mytemplate = mylookup.get_template("foo.txt")
+    print mytemplate.render()
+
+When using Python 3, the :meth:`~.Template.render` method will return a ``bytes``
+object, **if** ``output_encoding`` is set. Otherwise it returns a
+``string``.
+
+Additionally, the :meth:`~.Template.render_unicode()` method exists which will
+return the template output as a Python ``unicode`` object, or in
+Python 3 a ``string``:
+
+.. sourcecode:: python
+
+    print mytemplate.render_unicode()
+
+The above method disregards the output encoding keyword
+argument; you can encode yourself by saying:
+
+.. sourcecode:: python
+
+    print mytemplate.render_unicode().encode('utf-8', 'replace')
+
+Note that Mako's ability to return data in any encoding and/or
+``unicode`` implies that the underlying output stream of the
+template is a Python unicode object. This behavior is described
+fully in :ref:`unicode_toplevel`.
+
+.. _handling_exceptions:
+
+Handling Exceptions
+===================
+
+Template exceptions can occur in two distinct places. One is
+when you **lookup, parse and compile** the template, the other
+is when you **run** the template. Within the running of a
+template, exceptions are thrown normally from whatever Python
+code originated the issue. Mako has its own set of exception
+classes which mostly apply to the lookup and lexer/compiler
+stages of template construction. Mako provides some library
+routines that can be used to help provide Mako-specific
+information about any exception's stack trace, as well as
+formatting the exception within textual or HTML format. In all
+cases, the main value of these handlers is that of converting
+Python filenames, line numbers, and code samples into Mako
+template filenames, line numbers, and code samples. All lines
+within a stack trace which correspond to a Mako template module
+will be converted to be against the originating template file.
+
+To format exception traces, the :func:`.text_error_template` and
+:func:`.html_error_template` functions are provided. They make usage of
+``sys.exc_info()`` to get at the most recently thrown exception.
+Usage of these handlers usually looks like:
+
+.. sourcecode:: python
+
+    from mako import exceptions
+
+    try:
+        template = lookup.get_template(uri)
+        print template.render()
+    except:
+        print exceptions.text_error_template().render()
+
+Or for the HTML render function:
+
+.. sourcecode:: python
+
+    from mako import exceptions
+
+    try:
+        template = lookup.get_template(uri)
+        print template.render()
+    except:
+        print exceptions.html_error_template().render()
+
+The :func:`.html_error_template` template accepts two options:
+specifying ``full=False`` causes only a section of an HTML
+document to be rendered. Specifying ``css=False`` will disable the
+default stylesheet from being rendered.
+
+E.g.:
+
+.. sourcecode:: python
+
+    print exceptions.html_error_template().render(full=False)
+
+The HTML render function is also available built-in to
+:class:`.Template` using the ``format_exceptions`` flag. In this case, any
+exceptions raised within the **render** stage of the template
+will result in the output being substituted with the output of
+:func:`.html_error_template`:
+
+.. sourcecode:: python
+
+    template = Template(filename="/foo/bar", format_exceptions=True)
+    print template.render()
+
+Note that the compile stage of the above template occurs when
+you construct the :class:`.Template` itself, and no output stream is
+defined. Therefore exceptions which occur within the
+lookup/parse/compile stage will not be handled and will
+propagate normally. While the pre-render traceback usually will
+not include any Mako-specific lines anyway, it will mean that
+exceptions which occur previous to rendering and those which
+occur within rendering will be handled differently... so the
+``try``/``except`` patterns described previously are probably of more
+general use.
+
+The underlying object used by the error template functions is
+the :class:`.RichTraceback` object. This object can also be used
+directly to provide custom error views. Here's an example usage
+which describes its general API:
+
+.. sourcecode:: python
+
+    from mako.exceptions import RichTraceback
+
+    try:
+        template = lookup.get_template(uri)
+        print template.render()
+    except:
+        traceback = RichTraceback()
+        for (filename, lineno, function, line) in traceback.traceback:
+            print "File %s, line %s, in %s" % (filename, lineno, function)
+            print line, "\n"
+        print "%s: %s" % (str(traceback.error.__class__.__name__), traceback.error)
+
+Common Framework Integrations
+=============================
+
+The Mako distribution includes a little bit of helper code for
+the purpose of using Mako in some popular web framework
+scenarios. This is a brief description of what's included.
+
+WSGI
+----
+
+A sample WSGI application is included in the distribution in the
+file ``examples/wsgi/run_wsgi.py``. This runner is set up to pull
+files from a `templates` as well as an `htdocs` directory and
+includes a rudimental two-file layout. The WSGI runner acts as a
+fully functional standalone web server, using ``wsgiutils`` to run
+itself, and propagates GET and POST arguments from the request
+into the :class:`.Context`, can serve images, CSS files and other kinds
+of files, and also displays errors using Mako's included
+exception-handling utilities.
+
+Pygments
+--------
+
+A `Pygments <http://pygments.pocoo.org>`_-compatible syntax
+highlighting module is included under :mod:`mako.ext.pygmentplugin`.
+This module is used in the generation of Mako documentation and
+also contains various `setuptools` entry points under the heading
+``pygments.lexers``, including ``mako``, ``html+mako``, ``xml+mako``
+(see the ``setup.py`` file for all the entry points).
+
+Babel
+-----
+
+Mako provides support for extracting `gettext` messages from
+templates via a `Babel`_ extractor
+entry point under ``mako.ext.babelplugin``.
+
+`Gettext` messages are extracted from all Python code sections,
+including those of control lines and expressions embedded
+in tags.
+
+`Translator
+comments <http://babel.edgewall.org/wiki/Documentation/messages.html#comments-tags-and-translator-comments-explanation>`_
+may also be extracted from Mako templates when a comment tag is
+specified to `Babel`_ (such as with
+the ``-c`` option).
+
+For example, a project ``"myproj"`` contains the following Mako
+template at ``myproj/myproj/templates/name.html``:
+
+.. sourcecode:: mako
+
+    <div id="name">
+      Name:
+      ## TRANSLATORS: This is a proper name. See the gettext
+      ## manual, section Names.
+      ${_('Francois Pinard')}
+    </div>
+
+To extract gettext messages from this template the project needs
+a Mako section in its `Babel Extraction Method Mapping
+file <http://babel.edgewall.org/wiki/Documentation/messages.html#extraction-method-mapping-and-configuration>`_
+(typically located at ``myproj/babel.cfg``):
+
+.. sourcecode:: cfg
+
+    # Extraction from Python source files
+
+    [python: myproj/**.py]
+
+    # Extraction from Mako templates
+
+    [mako: myproj/templates/**.html]
+    input_encoding = utf-8
+
+The Mako extractor supports an optional ``input_encoding``
+parameter specifying the encoding of the templates (identical to
+:class:`.Template`/:class:`.TemplateLookup`'s ``input_encoding`` parameter).
+
+Invoking `Babel`_'s extractor at the
+command line in the project's root directory:
+
+.. sourcecode:: sh
+
+    myproj$ pybabel extract -F babel.cfg -c "TRANSLATORS:" .
+
+will output a `gettext` catalog to `stdout` including the following:
+
+.. sourcecode:: pot
+
+    #. TRANSLATORS: This is a proper name. See the gettext
+    #. manual, section Names.
+    #: myproj/templates/name.html:5
+    msgid "Francois Pinard"
+    msgstr ""
+
+This is only a basic example:
+`Babel`_ can be invoked from ``setup.py``
+and its command line options specified in the accompanying
+``setup.cfg`` via `Babel Distutils/Setuptools
+Integration <http://babel.edgewall.org/wiki/Documentation/setup.html>`_.
+
+Comments must immediately precede a `gettext` message to be
+extracted. In the following case the ``TRANSLATORS:`` comment would
+not have been extracted:
+
+.. sourcecode:: mako
+
+    <div id="name">
+      ## TRANSLATORS: This is a proper name. See the gettext
+      ## manual, section Names.
+      Name: ${_('Francois Pinard')}
+    </div>
+
+See the `Babel User
+Guide <http://babel.edgewall.org/wiki/Documentation/index.html>`_
+for more information.
+
+.. _babel: http://babel.edgewall.org/
+
+
+API Reference
+=============
+
+.. autoclass:: mako.template.Template
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.template.DefTemplate
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.lookup.TemplateCollection
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.lookup.TemplateLookup
+    :show-inheritance:
+    :members:
+
+.. autoclass:: mako.exceptions.RichTraceback
+    :show-inheritance:
+
+    .. py:attribute:: error
+
+       the exception instance.
+
+    .. py:attribute:: message
+
+       the exception error message as unicode.
+
+    .. py:attribute:: source
+
+       source code of the file where the error occurred.
+       If the error occurred within a compiled template,
+       this is the template source.
+
+    .. py:attribute:: lineno
+
+       line number where the error occurred.  If the error
+       occurred within a compiled template, the line number
+       is adjusted to that of the template source.
+
+    .. py:attribute:: records
+
+       a list of 8-tuples containing the original
+       python traceback elements, plus the
+       filename, line number, source line, and full template source
+       for the traceline mapped back to its originating source
+       template, if any for that traceline (else the fields are ``None``).
+
+    .. py:attribute:: reverse_records
+
+       the list of records in reverse
+       traceback -- a list of 4-tuples, in the same format as a regular
+       python traceback, with template-corresponding
+       traceback records replacing the originals.
+
+    .. py:attribute:: reverse_traceback
+
+       the traceback list in reverse.
+
+.. autofunction:: mako.exceptions.html_error_template
+
+.. autofunction:: mako.exceptions.text_error_template
+
diff --git a/lib/Mako-0.7.3/doc/caching.html b/lib/Mako-0.7.3/doc/caching.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/caching.html
@@ -0,0 +1,779 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<head>
+<title>
+    
+                Caching
+             — 
+    Mako 0.7.3 Documentation
+</title>
+
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
+
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+          URL_ROOT:    '#',
+          VERSION:     '0.7.3',
+          COLLAPSE_MODINDEX: false,
+          FILE_SUFFIX: '.html'
+      };
+    </script>
+        <script type="text/javascript" src="_static/jquery.js"></script>
+        <script type="text/javascript" src="_static/underscore.js"></script>
+        <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="top" title="Mako 0.7.3 Documentation" href="index.html" />
+        <link rel="prev" title="The Unicode Chapter" href="unicode.html" />
+
+<link rel="stylesheet" href="_static/site.css"></link>
+
+
+</head>
+<body>
+    <div id="wrap">
+    <div class="rightbar">
+
+
+    <div class="slogan">
+    Hyperfast and lightweight templating for the Python platform.
+    </div>
+
+
+    </div>
+
+    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
+
+    <hr/>
+
+    
+
+
+
+
+
+
+
+
+
+<div id="docs-container">
+
+
+
+<div id="docs-header">
+    <h1>Mako 0.7.3 Documentation</h1>
+
+    <div id="docs-search">
+    Search:
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </div>
+
+    <div id="docs-version-header">
+        Release: <span class="version-num">0.7.3</span>
+
+    </div>
+
+</div>
+
+<div id="docs-top-navigation">
+    <div id="docs-top-page-control" class="docs-navigation-links">
+        <ul>
+            <li>Prev:
+            <a href="unicode.html" title="previous chapter">The Unicode Chapter</a>
+            </li>
+
+        <li>
+            <a href="index.html">Table of Contents</a> |
+            <a href="genindex.html">Index</a>
+            | <a href="_sources/caching.txt">view source
+        </li>
+        </ul>
+    </div>
+
+    <div id="docs-navigation-banner">
+        <a href="index.html">Mako 0.7.3 Documentation</a>
+        » 
+                Caching
+             
+
+        <h2>
+            
+                Caching
+            
+        </h2>
+    </div>
+
+</div>
+
+<div id="docs-body-container">
+
+    <div id="docs-sidebar">
+    <h3><a href="index.html">Table of Contents</a></h3>
+    <ul>
+<li><a class="reference internal" href="#">Caching</a><ul>
+<li><a class="reference internal" href="#cache-arguments">Cache Arguments</a><ul>
+<li><a class="reference internal" href="#backend-specific-cache-arguments">Backend-Specific Cache Arguments</a></li>
+<li><a class="reference internal" href="#using-the-beaker-cache-backend">Using the Beaker Cache Backend</a></li>
+<li><a class="reference internal" href="#using-the-dogpile-cache-backend">Using the dogpile.cache Backend</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#programmatic-cache-access">Programmatic Cache Access</a></li>
+<li><a class="reference internal" href="#cache-plugins">Cache Plugins</a><ul>
+<li><a class="reference internal" href="#guidelines-for-writing-cache-plugins">Guidelines for Writing Cache Plugins</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#api-reference">API Reference</a></li>
+</ul>
+</li>
+</ul>
+
+
+    <h4>Previous Topic</h4>
+    <p>
+    <a href="unicode.html" title="previous chapter">The Unicode Chapter</a>
+    </p>
+
+    <h4>Quick Search</h4>
+    <p>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </p>
+
+    </div>
+
+    <div id="docs-body" class="withsidebar" >
+        
+<div class="section" id="caching">
+<span id="caching-toplevel"></span><h1>Caching<a class="headerlink" href="#caching" title="Permalink to this headline">¶</a></h1>
+<p>Any template or component can be cached using the <tt class="docutils literal"><span class="pre">cache</span></tt>
+argument to the <tt class="docutils literal"><span class="pre"><%page></span></tt>, <tt class="docutils literal"><span class="pre"><%def></span></tt> or <tt class="docutils literal"><span class="pre"><%block></span></tt> directives:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">cached=</span><span class="s">"True"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="x">template text</span>
+</pre></div>
+</div>
+<p>The above template, after being executed the first time, will
+store its content within a cache that by default is scoped
+within memory. Subsequent calls to the template’s <a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a>
+method will return content directly from the cache. When the
+<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object itself falls out of scope, its corresponding
+cache is garbage collected along with the template.</p>
+<p>By default, caching requires that the <a class="reference external" href="http://beaker.readthedocs.org/">Beaker</a> package be installed on the
+system, however the mechanism of caching can be customized to use
+any third party or user defined system – see <a class="reference internal" href="#cache-plugins"><em>Cache Plugins</em></a>.</p>
+<p>In addition to being available on the <tt class="docutils literal"><span class="pre"><%page></span></tt> tag, the caching flag and all
+its options can be used with the <tt class="docutils literal"><span class="pre"><%def></span></tt> tag as well:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"mycomp"</span> <span class="na">cached=</span><span class="s">"True"</span> <span class="na">cache_timeout=</span><span class="s">"60"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    other text</span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>... and equivalently with the <tt class="docutils literal"><span class="pre"><%block></span></tt> tag, anonymous or named:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">block</span> <span class="na">cached=</span><span class="s">"True"</span> <span class="na">cache_timeout=</span><span class="s">"60"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    other text</span>
+<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<div class="section" id="cache-arguments">
+<h2>Cache Arguments<a class="headerlink" href="#cache-arguments" title="Permalink to this headline">¶</a></h2>
+<p>Mako has two cache arguments available on tags that are
+available in all cases.   The rest of the arguments
+available are specific to a backend.</p>
+<p>The two generic tags arguments are:</p>
+<ul>
+<li><p class="first"><tt class="docutils literal"><span class="pre">cached="True"</span></tt> - enable caching for this <tt class="docutils literal"><span class="pre"><%page></span></tt>,
+<tt class="docutils literal"><span class="pre"><%def></span></tt>, or <tt class="docutils literal"><span class="pre"><%block></span></tt>.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">cache_key</span></tt> - the “key” used to uniquely identify this content
+in the cache.   Usually, this key is chosen automatically
+based on the name of the rendering callable (i.e. <tt class="docutils literal"><span class="pre">body</span></tt>
+when used in <tt class="docutils literal"><span class="pre"><%page></span></tt>, the name of the def when using <tt class="docutils literal"><span class="pre"><%def></span></tt>,
+the explicit or internally-generated name when using <tt class="docutils literal"><span class="pre"><%block></span></tt>).
+Using the <tt class="docutils literal"><span class="pre">cache_key</span></tt> parameter, the key can be overridden
+using a fixed or programmatically generated value.</p>
+<p>For example, here’s a page
+that caches any page which inherits from it, based on the
+filename of the calling template:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">cached=</span><span class="s">"True"</span> <span class="na">cache_key=</span><span class="s">"${self.filename}"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="cp">${</span><span class="nb">next</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span>
+
+<span class="cp">## rest of template</span><span class="x"></span>
+</pre></div>
+</div>
+</li>
+</ul>
+<p>On a <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> or <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>, the
+caching can be configured using these arguments:</p>
+<ul>
+<li><p class="first"><tt class="docutils literal"><span class="pre">cache_enabled</span></tt> - Setting this
+to <tt class="docutils literal"><span class="pre">False</span></tt> will disable all caching functionality
+when the template renders.  Defaults to <tt class="docutils literal"><span class="pre">True</span></tt>.
+e.g.:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">lookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span>
+                <span class="n">directories</span><span class="o">=</span><span class="s">'/path/to/templates'</span><span class="p">,</span>
+                <span class="n">cache_enabled</span> <span class="o">=</span> <span class="bp">False</span>
+                <span class="p">)</span>
+</pre></div>
+</div>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">cache_impl</span></tt> - The string name of the cache backend
+to use.   This defaults to <tt class="docutils literal"><span class="pre">'beaker'</span></tt>, which has historically
+been the only cache backend supported by Mako.</p>
+<p class="versionadded">
+<span class="versionmodified">New in version 0.6.0.</span></p>
+<p>For example, here’s how to use the upcoming
+<a class="reference external" href="http://dogpilecache.readthedocs.org">dogpile.cache</a>
+backend:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">lookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span>
+                <span class="n">directories</span><span class="o">=</span><span class="s">'/path/to/templates'</span><span class="p">,</span>
+                <span class="n">cache_impl</span> <span class="o">=</span> <span class="s">'dogpile.cache'</span><span class="p">,</span>
+                <span class="n">cache_args</span> <span class="o">=</span> <span class="p">{</span><span class="s">'regions'</span><span class="p">:</span><span class="n">my_dogpile_regions</span><span class="p">}</span>
+                <span class="p">)</span>
+</pre></div>
+</div>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">cache_args</span></tt> - A dictionary of cache parameters that
+will be consumed by the cache backend.   See
+<a class="reference internal" href="#beaker-backend"><em>Using the Beaker Cache Backend</em></a> for examples.</p>
+<p class="versionadded">
+<span class="versionmodified">New in version 0.6.0.</span></p>
+</li>
+</ul>
+<div class="section" id="backend-specific-cache-arguments">
+<h3>Backend-Specific Cache Arguments<a class="headerlink" href="#backend-specific-cache-arguments" title="Permalink to this headline">¶</a></h3>
+<p>The <tt class="docutils literal"><span class="pre"><%page></span></tt>, <tt class="docutils literal"><span class="pre"><%def></span></tt>, and <tt class="docutils literal"><span class="pre"><%block></span></tt> tags
+accept any named argument that starts with the prefix <tt class="docutils literal"><span class="pre">"cache_"</span></tt>.
+Those arguments are then packaged up and passed along to the
+underlying caching implementation, minus the <tt class="docutils literal"><span class="pre">"cache_"</span></tt> prefix.</p>
+<p>The actual arguments understood are determined by the backend.</p>
+<ul class="simple">
+<li><a class="reference internal" href="#beaker-backend"><em>Using the Beaker Cache Backend</em></a> - Includes arguments understood by
+Beaker.</li>
+<li><a class="reference internal" href="#dogpile-cache-backend"><em>Using the dogpile.cache Backend</em></a> - Includes arguments understood by
+dogpile.cache.</li>
+</ul>
+</div>
+<div class="section" id="using-the-beaker-cache-backend">
+<span id="beaker-backend"></span><h3>Using the Beaker Cache Backend<a class="headerlink" href="#using-the-beaker-cache-backend" title="Permalink to this headline">¶</a></h3>
+<p>When using Beaker, new implementations will want to make usage
+of <strong>cache regions</strong> so that cache configurations can be maintained
+externally to templates.  These configurations live under
+named “regions” that can be referred to within templates themselves.</p>
+<p class="versionadded">
+<span class="versionmodified">New in version 0.6.0: </span>Support for Beaker cache regions.</p>
+<p>For example, suppose we would like two regions.  One is a “short term”
+region that will store content in a memory-based dictionary,
+expiring after 60 seconds.   The other is a Memcached region,
+where values should expire in five minutes.   To configure
+our <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>, first we get a handle to a
+<a class="reference external" href="http://beaker.readthedocs.org/en/latest/modules/cache.html#beaker.cache.CacheManager" title="(in Beaker v1.6)"><tt class="xref py py-class docutils literal"><span class="pre">beaker.cache.CacheManager</span></tt></a>:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">beaker.cache</span> <span class="kn">import</span> <span class="n">CacheManager</span>
+
+<span class="n">manager</span> <span class="o">=</span> <span class="n">CacheManager</span><span class="p">(</span><span class="n">cache_regions</span><span class="o">=</span><span class="p">{</span>
+    <span class="s">'short_term'</span><span class="p">:{</span>
+        <span class="s">'type'</span><span class="p">:</span> <span class="s">'memory'</span><span class="p">,</span>
+        <span class="s">'expire'</span><span class="p">:</span> <span class="mi">60</span>
+    <span class="p">},</span>
+    <span class="s">'long_term'</span><span class="p">:{</span>
+        <span class="s">'type'</span><span class="p">:</span> <span class="s">'ext:memcached'</span><span class="p">,</span>
+        <span class="s">'url'</span><span class="p">:</span> <span class="s">'127.0.0.1:11211'</span><span class="p">,</span>
+        <span class="s">'expire'</span><span class="p">:</span> <span class="mi">300</span>
+    <span class="p">}</span>
+<span class="p">})</span>
+
+<span class="n">lookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span>
+                <span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/path/to/templates'</span><span class="p">],</span>
+                <span class="n">module_directory</span><span class="o">=</span><span class="s">'/path/to/modules'</span><span class="p">,</span>
+                <span class="n">cache_impl</span><span class="o">=</span><span class="s">'beaker'</span><span class="p">,</span>
+                <span class="n">cache_args</span><span class="o">=</span><span class="p">{</span>
+                    <span class="s">'manager'</span><span class="p">:</span><span class="n">manager</span>
+                <span class="p">}</span>
+        <span class="p">)</span>
+</pre></div>
+</div>
+<p>Our templates can then opt to cache data in one of either region,
+using the <tt class="docutils literal"><span class="pre">cache_region</span></tt> argument.   Such as using <tt class="docutils literal"><span class="pre">short_term</span></tt>
+at the <tt class="docutils literal"><span class="pre"><%page></span></tt> level:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">cached=</span><span class="s">"True"</span> <span class="na">cache_region=</span><span class="s">"short_term"</span><span class="cp">></span>
+
+<span class="cp">## ...</span><span class="x"></span>
+</pre></div>
+</div>
+<p>Or, <tt class="docutils literal"><span class="pre">long_term</span></tt> at the <tt class="docutils literal"><span class="pre"><%block></span></tt> level:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span> <span class="na">cached=</span><span class="s">"True"</span> <span class="na">cache_region=</span><span class="s">"long_term"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    other text</span>
+<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>The Beaker backend also works without regions.   There are a
+variety of arguments that can be passed to the <tt class="docutils literal"><span class="pre">cache_args</span></tt>
+dictionary, which are also allowable in templates via the
+<tt class="docutils literal"><span class="pre"><%page></span></tt>, <tt class="docutils literal"><span class="pre"><%block></span></tt>,
+and <tt class="docutils literal"><span class="pre"><%def></span></tt> tags specific to those sections.   The values
+given override those specified at the  <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>
+or <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> level.</p>
+<p>With the possible exception
+of <tt class="docutils literal"><span class="pre">cache_timeout</span></tt>, these arguments are probably better off
+staying at the template configuration level.  Each argument
+specified as <tt class="docutils literal"><span class="pre">cache_XYZ</span></tt> in a template tag is specified
+without the <tt class="docutils literal"><span class="pre">cache_</span></tt> prefix in the <tt class="docutils literal"><span class="pre">cache_args</span></tt> dictionary:</p>
+<ul class="simple">
+<li><tt class="docutils literal"><span class="pre">cache_timeout</span></tt> - number of seconds in which to invalidate the
+cached data.  After this timeout, the content is re-generated
+on the next call.  Available as <tt class="docutils literal"><span class="pre">timeout</span></tt> in the <tt class="docutils literal"><span class="pre">cache_args</span></tt>
+dictionary.</li>
+<li><tt class="docutils literal"><span class="pre">cache_type</span></tt> - type of caching. <tt class="docutils literal"><span class="pre">'memory'</span></tt>, <tt class="docutils literal"><span class="pre">'file'</span></tt>, <tt class="docutils literal"><span class="pre">'dbm'</span></tt>, or
+<tt class="docutils literal"><span class="pre">'ext:memcached'</span></tt> (note that  the string <tt class="docutils literal"><span class="pre">memcached</span></tt> is
+also accepted by the dogpile.cache Mako plugin, though not by Beaker itself).
+Available as <tt class="docutils literal"><span class="pre">type</span></tt> in the <tt class="docutils literal"><span class="pre">cache_args</span></tt> dictionary.</li>
+<li><tt class="docutils literal"><span class="pre">cache_url</span></tt> - (only used for <tt class="docutils literal"><span class="pre">memcached</span></tt> but required) a single
+IP address or a semi-colon separated list of IP address of
+memcache servers to use.  Available as <tt class="docutils literal"><span class="pre">url</span></tt> in the <tt class="docutils literal"><span class="pre">cache_args</span></tt>
+dictionary.</li>
+<li><tt class="docutils literal"><span class="pre">cache_dir</span></tt> - in the case of the <tt class="docutils literal"><span class="pre">'file'</span></tt> and <tt class="docutils literal"><span class="pre">'dbm'</span></tt> cache types,
+this is the filesystem directory with which to store data
+files. If this option is not present, the value of
+<tt class="docutils literal"><span class="pre">module_directory</span></tt> is used (i.e. the directory where compiled
+template modules are stored). If neither option is available
+an exception is thrown.  Available as <tt class="docutils literal"><span class="pre">dir</span></tt> in the
+<tt class="docutils literal"><span class="pre">cache_args</span></tt> dictionary.</li>
+</ul>
+</div>
+<div class="section" id="using-the-dogpile-cache-backend">
+<span id="dogpile-cache-backend"></span><h3>Using the dogpile.cache Backend<a class="headerlink" href="#using-the-dogpile-cache-backend" title="Permalink to this headline">¶</a></h3>
+<p><a class="reference external" href="http://dogpilecache.readthedocs.org">dogpile.cache</a> is a new replacement for Beaker.   It provides
+a modernized, slimmed down interface and is generally easier to use
+than Beaker.   As of this writing it has not yet been released.  dogpile.cache
+includes its own Mako cache plugin – see <a class="reference external" href="http://dogpilecache.readthedocs.org/en/latest/api.html#dogpile.cache.plugins.mako_cache" title="(in dogpile.cache v0.4.0)"><tt class="xref py py-mod docutils literal"><span class="pre">dogpile.cache.plugins.mako_cache</span></tt></a> in the
+dogpile.cache documentation.</p>
+</div>
+</div>
+<div class="section" id="programmatic-cache-access">
+<h2>Programmatic Cache Access<a class="headerlink" href="#programmatic-cache-access" title="Permalink to this headline">¶</a></h2>
+<p>The <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>, as well as any template-derived <a class="reference internal" href="namespaces.html#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>, has
+an accessor called <tt class="docutils literal"><span class="pre">cache</span></tt> which returns the <a class="reference internal" href="#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> object
+for that template. This object is a facade on top of the underlying
+<a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> object, and provides some very rudimental
+capabilities, such as the ability to get and put arbitrary
+values:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span>
+    <span class="n">local</span><span class="o">.</span><span class="n">cache</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s">"somekey"</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s">"memory"</span><span class="p">,</span> <span class="s">"somevalue"</span><span class="p">)</span>
+<span class="cp">%></span><span class="x"></span>
+</pre></div>
+</div>
+<p>Above, the cache associated with the <tt class="docutils literal"><span class="pre">local</span></tt> namespace is
+accessed and a key is placed within a memory cache.</p>
+<p>More commonly, the <tt class="docutils literal"><span class="pre">cache</span></tt> object is used to invalidate cached
+sections programmatically:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">template</span> <span class="o">=</span> <span class="n">lookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="s">'/sometemplate.html'</span><span class="p">)</span>
+
+<span class="c"># invalidate the "body" of the template</span>
+<span class="n">template</span><span class="o">.</span><span class="n">cache</span><span class="o">.</span><span class="n">invalidate_body</span><span class="p">()</span>
+
+<span class="c"># invalidate an individual def</span>
+<span class="n">template</span><span class="o">.</span><span class="n">cache</span><span class="o">.</span><span class="n">invalidate_def</span><span class="p">(</span><span class="s">'somedef'</span><span class="p">)</span>
+
+<span class="c"># invalidate an arbitrary key</span>
+<span class="n">template</span><span class="o">.</span><span class="n">cache</span><span class="o">.</span><span class="n">invalidate</span><span class="p">(</span><span class="s">'somekey'</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>You can access any special method or attribute of the <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a>
+itself using the <a class="reference internal" href="#mako.cache.Cache.impl" title="mako.cache.Cache.impl"><tt class="xref py py-attr docutils literal"><span class="pre">impl</span></tt></a> attribute:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">template</span><span class="o">.</span><span class="n">cache</span><span class="o">.</span><span class="n">impl</span><span class="o">.</span><span class="n">do_something_special</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Note that using implementation-specific methods will mean you can’t
+swap in a different kind of <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> implementation at a
+later time.</p>
+</div>
+<div class="section" id="cache-plugins">
+<span id="id1"></span><h2>Cache Plugins<a class="headerlink" href="#cache-plugins" title="Permalink to this headline">¶</a></h2>
+<p>The mechanism used by caching can be plugged in
+using a <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> subclass.    This class implements
+the rudimental methods Mako needs to implement the caching
+API.   Mako includes the <a class="reference internal" href="#mako.ext.beaker_cache.BeakerCacheImpl" title="mako.ext.beaker_cache.BeakerCacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">BeakerCacheImpl</span></tt></a> class to
+provide the default implementation.  A <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> class
+is acquired by Mako using a <tt class="docutils literal"><span class="pre">pkg_resources</span></tt> entrypoint, using
+the name given as the <tt class="docutils literal"><span class="pre">cache_impl</span></tt> argument to <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>
+or <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>.    This entry point can be
+installed via the standard <cite>setuptools</cite>/<tt class="docutils literal"><span class="pre">setup()</span></tt> procedure, underneath
+the <cite>EntryPoint</cite> group named <tt class="docutils literal"><span class="pre">"mako.cache"</span></tt>.  It can also be
+installed at runtime via a convenience installer <a class="reference internal" href="#mako.cache.register_plugin" title="mako.cache.register_plugin"><tt class="xref py py-func docutils literal"><span class="pre">register_plugin()</span></tt></a>
+which accomplishes essentially the same task.</p>
+<p>An example plugin that implements a local dictionary cache:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.cache</span> <span class="kn">import</span> <span class="n">Cacheimpl</span><span class="p">,</span> <span class="n">register_plugin</span>
+
+<span class="k">class</span> <span class="nc">SimpleCacheImpl</span><span class="p">(</span><span class="n">CacheImpl</span><span class="p">):</span>
+    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cache</span><span class="p">):</span>
+        <span class="nb">super</span><span class="p">(</span><span class="n">SimpleCacheImpl</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="n">cache</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_cache</span> <span class="o">=</span> <span class="p">{}</span>
+
+    <span class="k">def</span> <span class="nf">get_or_create</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="n">creation_function</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">key</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_cache</span><span class="p">:</span>
+            <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_cache</span><span class="p">[</span><span class="n">key</span><span class="p">]</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_cache</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span> <span class="o">=</span> <span class="n">creation_function</span><span class="p">()</span>
+            <span class="k">return</span> <span class="n">value</span>
+
+    <span class="k">def</span> <span class="nf">set</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_cache</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span>
+
+    <span class="k">def</span> <span class="nf">get</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_cache</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">key</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">invalidate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_cache</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
+
+<span class="c"># optional - register the class locally</span>
+<span class="n">register_plugin</span><span class="p">(</span><span class="s">"simple"</span><span class="p">,</span> <span class="n">__name__</span><span class="p">,</span> <span class="s">"SimpleCacheImpl"</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>Enabling the above plugin in a template would look like:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"mytemplate"</span><span class="p">,</span>
+             <span class="nb">file</span><span class="o">=</span><span class="s">"mytemplate.html"</span><span class="p">,</span>
+             <span class="n">cache_impl</span><span class="o">=</span><span class="s">'simple'</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="section" id="guidelines-for-writing-cache-plugins">
+<h3>Guidelines for Writing Cache Plugins<a class="headerlink" href="#guidelines-for-writing-cache-plugins" title="Permalink to this headline">¶</a></h3>
+<ul class="simple">
+<li>The <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> is created on a per-<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> basis.  The
+class should ensure that only data for the parent <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> is
+persisted or returned by the cache methods.    The actual <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>
+is available via the <tt class="docutils literal"><span class="pre">self.cache.template</span></tt> attribute.   The <tt class="docutils literal"><span class="pre">self.cache.id</span></tt>
+attribute, which is essentially the unique modulename of the template, is
+a good value to use in order to represent a unique namespace of keys specific
+to the template.</li>
+<li>Templates only use the <a class="reference internal" href="#mako.cache.CacheImpl.get_or_create" title="mako.cache.CacheImpl.get_or_create"><tt class="xref py py-meth docutils literal"><span class="pre">CacheImpl.get_or_create()</span></tt></a> method
+in an implicit fashion.  The <a class="reference internal" href="#mako.cache.CacheImpl.set" title="mako.cache.CacheImpl.set"><tt class="xref py py-meth docutils literal"><span class="pre">CacheImpl.set()</span></tt></a>,
+<a class="reference internal" href="#mako.cache.CacheImpl.get" title="mako.cache.CacheImpl.get"><tt class="xref py py-meth docutils literal"><span class="pre">CacheImpl.get()</span></tt></a>, and <a class="reference internal" href="#mako.cache.CacheImpl.invalidate" title="mako.cache.CacheImpl.invalidate"><tt class="xref py py-meth docutils literal"><span class="pre">CacheImpl.invalidate()</span></tt></a> methods are
+only used in response to direct programmatic access to the corresponding
+methods on the <a class="reference internal" href="#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> object.</li>
+<li><a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> will be accessed in a multithreaded fashion if the
+<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> itself is used multithreaded.  Care should be taken
+to ensure caching implementations are threadsafe.</li>
+<li>A library like <a class="reference external" href="http://pypi.python.org/pypi/dogpile.core">Dogpile</a>, which
+is a minimal locking system derived from Beaker, can be used to help
+implement the <a class="reference internal" href="#mako.cache.CacheImpl.get_or_create" title="mako.cache.CacheImpl.get_or_create"><tt class="xref py py-meth docutils literal"><span class="pre">CacheImpl.get_or_create()</span></tt></a> method in a threadsafe
+way that can maximize effectiveness across multiple threads as well
+as processes. <a class="reference internal" href="#mako.cache.CacheImpl.get_or_create" title="mako.cache.CacheImpl.get_or_create"><tt class="xref py py-meth docutils literal"><span class="pre">CacheImpl.get_or_create()</span></tt></a> is the
+key method used by templates.</li>
+<li>All arguments passed to <tt class="docutils literal"><span class="pre">**kw</span></tt> come directly from the parameters
+inside the <tt class="docutils literal"><span class="pre"><%def></span></tt>, <tt class="docutils literal"><span class="pre"><%block></span></tt>, or <tt class="docutils literal"><span class="pre"><%page></span></tt> tags directly,
+minus the <tt class="docutils literal"><span class="pre">"cache_"</span></tt> prefix, as strings, with the exception of
+the argument <tt class="docutils literal"><span class="pre">cache_timeout</span></tt>, which is passed to the plugin
+as the name <tt class="docutils literal"><span class="pre">timeout</span></tt> with the value converted to an integer.
+Arguments present in <tt class="docutils literal"><span class="pre">cache_args</span></tt> on <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> or
+<a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> are passed directly, but are superseded
+by those present in the most specific template tag.</li>
+<li>The directory where <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> places module files can
+be acquired using the accessor <tt class="docutils literal"><span class="pre">self.cache.template.module_directory</span></tt>.
+This directory can be a good place to throw cache-related work
+files, underneath a prefix like <tt class="docutils literal"><span class="pre">_my_cache_work</span></tt> so that name
+conflicts with generated modules don’t occur.</li>
+</ul>
+</div>
+</div>
+<div class="section" id="api-reference">
+<h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="mako.cache.Cache">
+<em class="property">class </em><tt class="descclassname">mako.cache.</tt><tt class="descname">Cache</tt><big>(</big><em>template</em>, <em>*args</em><big>)</big><a class="headerlink" href="#mako.cache.Cache" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
+<p>Represents a data content cache made available to the module
+space of a specific <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object.</p>
+<p class="versionadded">
+<span class="versionmodified">New in version 0.6: </span><a class="reference internal" href="#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> by itself is mostly a
+container for a <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> object, which implements
+a fixed API to provide caching services; specific subclasses exist to
+implement different
+caching strategies.   Mako includes a backend that works with
+the Beaker caching system.   Beaker itself then supports
+a number of backends (i.e. file, memory, memcached, etc.)</p>
+<p>The construction of a <a class="reference internal" href="#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> is part of the mechanics
+of a <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>, and programmatic access to this
+cache is typically via the <tt class="xref py py-attr docutils literal"><span class="pre">Template.cache</span></tt> attribute.</p>
+<dl class="method">
+<dt id="mako.cache.Cache.get">
+<tt class="descname">get</tt><big>(</big><em>key</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.Cache.get" title="Permalink to this definition">¶</a></dt>
+<dd><p>Retrieve a value from the cache.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>key</strong> – the value’s key.</li>
+<li><strong>**kw</strong> – cache configuration arguments.  The
+backend is configured using these arguments upon first request.
+Subsequent requests that use the same series of configuration
+values will use that same backend.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.cache.Cache.get_or_create">
+<tt class="descname">get_or_create</tt><big>(</big><em>key</em>, <em>creation_function</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.Cache.get_or_create" title="Permalink to this definition">¶</a></dt>
+<dd><p>Retrieve a value from the cache, using the given creation function
+to generate a new value.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="mako.cache.Cache.id">
+<tt class="descname">id</tt><em class="property"> = None</em><a class="headerlink" href="#mako.cache.Cache.id" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return the ‘id’ that identifies this cache.</p>
+<p>This is a value that should be globally unique to the
+<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> associated with this cache, and can
+be used by a caching system to name a local container
+for data specific to this template.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="mako.cache.Cache.impl">
+<tt class="descname">impl</tt><em class="property"> = None</em><a class="headerlink" href="#mako.cache.Cache.impl" title="Permalink to this definition">¶</a></dt>
+<dd><p>Provide the <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> in use by this <a class="reference internal" href="#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a>.</p>
+<p>This accessor allows a <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> with additional
+methods beyond that of <a class="reference internal" href="#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> to be used programmatically.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.cache.Cache.invalidate">
+<tt class="descname">invalidate</tt><big>(</big><em>key</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.Cache.invalidate" title="Permalink to this definition">¶</a></dt>
+<dd><p>Invalidate a value in the cache.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>key</strong> – the value’s key.</li>
+<li><strong>**kw</strong> – cache configuration arguments.  The
+backend is configured using these arguments upon first request.
+Subsequent requests that use the same series of configuration
+values will use that same backend.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.cache.Cache.invalidate_body">
+<tt class="descname">invalidate_body</tt><big>(</big><big>)</big><a class="headerlink" href="#mako.cache.Cache.invalidate_body" title="Permalink to this definition">¶</a></dt>
+<dd><p>Invalidate the cached content of the “body” method for this
+template.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.cache.Cache.invalidate_closure">
+<tt class="descname">invalidate_closure</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#mako.cache.Cache.invalidate_closure" title="Permalink to this definition">¶</a></dt>
+<dd><p>Invalidate a nested <tt class="docutils literal"><span class="pre"><%def></span></tt> within this template.</p>
+<p>Caching of nested defs is a blunt tool as there is no
+management of scope – nested defs that use cache tags
+need to have names unique of all other nested defs in the
+template, else their content will be overwritten by
+each other.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.cache.Cache.invalidate_def">
+<tt class="descname">invalidate_def</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#mako.cache.Cache.invalidate_def" title="Permalink to this definition">¶</a></dt>
+<dd><p>Invalidate the cached content of a particular <tt class="docutils literal"><span class="pre"><%def></span></tt> within this
+template.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.cache.Cache.put">
+<tt class="descname">put</tt><big>(</big><em>key</em>, <em>value</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.Cache.put" title="Permalink to this definition">¶</a></dt>
+<dd><p>A synonym for <a class="reference internal" href="#mako.cache.Cache.set" title="mako.cache.Cache.set"><tt class="xref py py-meth docutils literal"><span class="pre">Cache.set()</span></tt></a>.</p>
+<p>This is here for backwards compatibility.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.cache.Cache.set">
+<tt class="descname">set</tt><big>(</big><em>key</em>, <em>value</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.Cache.set" title="Permalink to this definition">¶</a></dt>
+<dd><p>Place a value in the cache.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>key</strong> – the value’s key.</li>
+<li><strong>value</strong> – the value.</li>
+<li><strong>**kw</strong> – cache configuration arguments.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="mako.cache.Cache.starttime">
+<tt class="descname">starttime</tt><em class="property"> = None</em><a class="headerlink" href="#mako.cache.Cache.starttime" title="Permalink to this definition">¶</a></dt>
+<dd><p>Epochal time value for when the owning <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> was
+first compiled.</p>
+<p>A cache implementation may wish to invalidate data earlier than
+this timestamp; this has the effect of the cache for a specific
+<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> starting clean any time the <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>
+is recompiled, such as when the original template file changed on
+the filesystem.</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="mako.cache.CacheImpl">
+<em class="property">class </em><tt class="descclassname">mako.cache.</tt><tt class="descname">CacheImpl</tt><big>(</big><em>cache</em><big>)</big><a class="headerlink" href="#mako.cache.CacheImpl" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
+<p>Provide a cache implementation for use by <a class="reference internal" href="#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a>.</p>
+<dl class="method">
+<dt id="mako.cache.CacheImpl.get">
+<tt class="descname">get</tt><big>(</big><em>key</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.CacheImpl.get" title="Permalink to this definition">¶</a></dt>
+<dd><p>Retrieve a value from the cache.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>key</strong> – the value’s key.</li>
+<li><strong>**kw</strong> – cache configuration arguments.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.cache.CacheImpl.get_or_create">
+<tt class="descname">get_or_create</tt><big>(</big><em>key</em>, <em>creation_function</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.CacheImpl.get_or_create" title="Permalink to this definition">¶</a></dt>
+<dd><p>Retrieve a value from the cache, using the given creation function
+to generate a new value.</p>
+<p>This function <em>must</em> return a value, either from
+the cache, or via the given creation function.
+If the creation function is called, the newly
+created value should be populated into the cache
+under the given key before being returned.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>key</strong> – the value’s key.</li>
+<li><strong>creation_function</strong> – function that when called generates
+a new value.</li>
+<li><strong>**kw</strong> – cache configuration arguments.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.cache.CacheImpl.invalidate">
+<tt class="descname">invalidate</tt><big>(</big><em>key</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.CacheImpl.invalidate" title="Permalink to this definition">¶</a></dt>
+<dd><p>Invalidate a value in the cache.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>key</strong> – the value’s key.</li>
+<li><strong>**kw</strong> – cache configuration arguments.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="mako.cache.CacheImpl.pass_context">
+<tt class="descname">pass_context</tt><em class="property"> = False</em><a class="headerlink" href="#mako.cache.CacheImpl.pass_context" title="Permalink to this definition">¶</a></dt>
+<dd><p>If <tt class="docutils literal"><span class="pre">True</span></tt>, the <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> will be passed to
+<a class="reference internal" href="#mako.cache.CacheImpl.get_or_create" title="mako.cache.CacheImpl.get_or_create"><tt class="xref py py-meth docutils literal"><span class="pre">get_or_create</span></tt></a> as the name <tt class="docutils literal"><span class="pre">'context'</span></tt>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.cache.CacheImpl.set">
+<tt class="descname">set</tt><big>(</big><em>key</em>, <em>value</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.CacheImpl.set" title="Permalink to this definition">¶</a></dt>
+<dd><p>Place a value in the cache.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>key</strong> – the value’s key.</li>
+<li><strong>value</strong> – the value.</li>
+<li><strong>**kw</strong> – cache configuration arguments.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="mako.cache.register_plugin">
+<tt class="descclassname">mako.cache.</tt><tt class="descname">register_plugin</tt><big>(</big><em>self</em>, <em>name</em>, <em>modulepath</em>, <em>objname</em><big>)</big><a class="headerlink" href="#mako.cache.register_plugin" title="Permalink to this definition">¶</a></dt>
+<dd></dd></dl>
+
+<dl class="class">
+<dt id="mako.ext.beaker_cache.BeakerCacheImpl">
+<em class="property">class </em><tt class="descclassname">mako.ext.beaker_cache.</tt><tt class="descname">BeakerCacheImpl</tt><big>(</big><em>cache</em><big>)</big><a class="headerlink" href="#mako.ext.beaker_cache.BeakerCacheImpl" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bases: <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">mako.cache.CacheImpl</span></tt></a></p>
+<p>A <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> provided for the Beaker caching system.</p>
+<p>This plugin is used by default, based on the default
+value of <tt class="docutils literal"><span class="pre">'beaker'</span></tt> for the <tt class="docutils literal"><span class="pre">cache_impl</span></tt> parameter of the
+<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> or <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> classes.</p>
+</dd></dl>
+
+</div>
+</div>
+
+    </div>
+
+</div>
+
+<div id="docs-bottom-navigation" class="docs-navigation-links">
+        Previous:
+        <a href="unicode.html" title="previous chapter">The Unicode Chapter</a>
+
+    <div id="docs-copyright">
+        © Copyright the Mako authors and contributors.
+        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
+        with Mako templates.
+    </div>
+</div>
+
+</div>
+
+<div class="clearfix">
+
+<hr/>
+
+<div class="copyright">Website content copyright © by Michael Bayer.
+    All rights reserved.  Mako and its documentation are licensed
+    under the MIT license.  mike(&)zzzcomputing.com</div>
+
+</div>
+</div>
+</body>
+</html>
diff --git a/lib/Mako-0.7.3/doc/defs.html b/lib/Mako-0.7.3/doc/defs.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/defs.html
@@ -0,0 +1,728 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<head>
+<title>
+    
+                Defs and Blocks
+             — 
+    Mako 0.7.3 Documentation
+</title>
+
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
+
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+          URL_ROOT:    '#',
+          VERSION:     '0.7.3',
+          COLLAPSE_MODINDEX: false,
+          FILE_SUFFIX: '.html'
+      };
+    </script>
+        <script type="text/javascript" src="_static/jquery.js"></script>
+        <script type="text/javascript" src="_static/underscore.js"></script>
+        <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="top" title="Mako 0.7.3 Documentation" href="index.html" />
+        <link rel="next" title="The Mako Runtime Environment" href="runtime.html" />
+        <link rel="prev" title="Syntax" href="syntax.html" />
+
+<link rel="stylesheet" href="_static/site.css"></link>
+
+
+</head>
+<body>
+    <div id="wrap">
+    <div class="rightbar">
+
+
+    <div class="slogan">
+    Hyperfast and lightweight templating for the Python platform.
+    </div>
+
+
+    </div>
+
+    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
+
+    <hr/>
+
+    
+
+
+
+
+
+
+
+
+
+<div id="docs-container">
+
+
+
+<div id="docs-header">
+    <h1>Mako 0.7.3 Documentation</h1>
+
+    <div id="docs-search">
+    Search:
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </div>
+
+    <div id="docs-version-header">
+        Release: <span class="version-num">0.7.3</span>
+
+    </div>
+
+</div>
+
+<div id="docs-top-navigation">
+    <div id="docs-top-page-control" class="docs-navigation-links">
+        <ul>
+            <li>Prev:
+            <a href="syntax.html" title="previous chapter">Syntax</a>
+            </li>
+            <li>Next:
+            <a href="runtime.html" title="next chapter">The Mako Runtime Environment</a>
+            </li>
+
+        <li>
+            <a href="index.html">Table of Contents</a> |
+            <a href="genindex.html">Index</a>
+            | <a href="_sources/defs.txt">view source
+        </li>
+        </ul>
+    </div>
+
+    <div id="docs-navigation-banner">
+        <a href="index.html">Mako 0.7.3 Documentation</a>
+        » 
+                Defs and Blocks
+             
+
+        <h2>
+            
+                Defs and Blocks
+            
+        </h2>
+    </div>
+
+</div>
+
+<div id="docs-body-container">
+
+    <div id="docs-sidebar">
+    <h3><a href="index.html">Table of Contents</a></h3>
+    <ul>
+<li><a class="reference internal" href="#">Defs and Blocks</a><ul>
+<li><a class="reference internal" href="#using-defs">Using Defs</a><ul>
+<li><a class="reference internal" href="#calling-defs-from-other-files">Calling Defs from Other Files</a></li>
+<li><a class="reference internal" href="#calling-defs-programmatically">Calling Defs Programmatically</a></li>
+<li><a class="reference internal" href="#defs-within-defs">Defs within Defs</a></li>
+<li><a class="reference internal" href="#calling-a-def-with-embedded-content-and-or-other-defs">Calling a Def with Embedded Content and/or Other Defs</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#using-blocks">Using Blocks</a><ul>
+<li><a class="reference internal" href="#using-named-blocks">Using Named Blocks</a></li>
+<li><a class="reference internal" href="#using-page-arguments-in-named-blocks">Using Page Arguments in Named Blocks</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+
+
+    <h4>Previous Topic</h4>
+    <p>
+    <a href="syntax.html" title="previous chapter">Syntax</a>
+    </p>
+    <h4>Next Topic</h4>
+    <p>
+    <a href="runtime.html" title="next chapter">The Mako Runtime Environment</a>
+    </p>
+
+    <h4>Quick Search</h4>
+    <p>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </p>
+
+    </div>
+
+    <div id="docs-body" class="withsidebar" >
+        
+<div class="section" id="defs-and-blocks">
+<span id="defs-toplevel"></span><h1>Defs and Blocks<a class="headerlink" href="#defs-and-blocks" title="Permalink to this headline">¶</a></h1>
+<p><tt class="docutils literal"><span class="pre"><%def></span></tt> and <tt class="docutils literal"><span class="pre"><%block></span></tt> are two tags that both demarcate any block of text
+and/or code.   They both exist within generated Python as a callable function,
+i.e., a Python <tt class="docutils literal"><span class="pre">def</span></tt>.   They differ in their scope and calling semantics.
+Whereas <tt class="docutils literal"><span class="pre"><%def></span></tt> provides a construct that is very much like a named Python
+<tt class="docutils literal"><span class="pre">def</span></tt>, the <tt class="docutils literal"><span class="pre"><%block></span></tt> is more layout oriented.</p>
+<div class="section" id="using-defs">
+<h2>Using Defs<a class="headerlink" href="#using-defs" title="Permalink to this headline">¶</a></h2>
+<p>The <tt class="docutils literal"><span class="pre"><%def></span></tt> tag requires a <tt class="docutils literal"><span class="pre">name</span></tt> attribute, where the <tt class="docutils literal"><span class="pre">name</span></tt> references
+a Python function signature:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"hello()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    hello world</span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>To invoke the <tt class="docutils literal"><span class="pre"><%def></span></tt>, it is normally called as an expression:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x">the def:  </span><span class="cp">${</span><span class="n">hello</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>If the <tt class="docutils literal"><span class="pre"><%def></span></tt> is not nested inside of another <tt class="docutils literal"><span class="pre"><%def></span></tt>,
+it’s known as a <strong>top level def</strong> and can be accessed anywhere in
+the template, including above where it was defined.</p>
+<p>All defs, top level or not, have access to the current
+contextual namespace in exactly the same way their containing
+template does. Suppose the template below is executed with the
+variables <tt class="docutils literal"><span class="pre">username</span></tt> and <tt class="docutils literal"><span class="pre">accountdata</span></tt> inside the context:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x">Hello there </span><span class="cp">${</span><span class="n">username</span><span class="cp">}</span><span class="x">, how are ya.  Lets see what your account says:</span>
+
+<span class="cp">${</span><span class="n">account</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"account()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    Account for </span><span class="cp">${</span><span class="n">username</span><span class="cp">}</span><span class="x">:<br/></span>
+
+    <span class="cp">%</span> <span class="k">for</span> <span class="n">row</span> <span class="ow">in</span> <span class="n">accountdata</span><span class="p">:</span><span class="x"></span>
+<span class="x">        Value: </span><span class="cp">${</span><span class="n">row</span><span class="cp">}</span><span class="x"><br/></span>
+    <span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>The <tt class="docutils literal"><span class="pre">username</span></tt> and <tt class="docutils literal"><span class="pre">accountdata</span></tt> variables are present
+within the main template body as well as the body of the
+<tt class="docutils literal"><span class="pre">account()</span></tt> def.</p>
+<p>Since defs are just Python functions, you can define and pass
+arguments to them as well:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="n">account</span><span class="p">(</span><span class="n">accountname</span><span class="o">=</span><span class="s">'john'</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"account(accountname, type='regular')"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    account name: </span><span class="cp">${</span><span class="n">accountname</span><span class="cp">}</span><span class="x">, type: </span><span class="cp">${</span><span class="nb">type</span><span class="cp">}</span><span class="x"></span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>When you declare an argument signature for your def, they are
+required to follow normal Python conventions (i.e., all
+arguments are required except keyword arguments with a default
+value). This is in contrast to using context-level variables,
+which evaluate to <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> if you reference a name that
+does not exist.</p>
+<div class="section" id="calling-defs-from-other-files">
+<h3>Calling Defs from Other Files<a class="headerlink" href="#calling-defs-from-other-files" title="Permalink to this headline">¶</a></h3>
+<p>Top level <tt class="docutils literal"><span class="pre"><%def></span></tt>s are <strong>exported</strong> by your template’s
+module, and can be called from the outside; including from other
+templates, as well as normal Python code. Calling a <tt class="docutils literal"><span class="pre"><%def></span></tt>
+from another template is something like using an <tt class="docutils literal"><span class="pre"><%include></span></tt>
+– except you are calling a specific function within the
+template, not the whole template.</p>
+<p>The remote <tt class="docutils literal"><span class="pre"><%def></span></tt> call is also a little bit like calling
+functions from other modules in Python. There is an “import”
+step to pull the names from another template into your own
+template; then the function or functions are available.</p>
+<p>To import another template, use the <tt class="docutils literal"><span class="pre"><%namespace></span></tt> tag:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">namespace</span> <span class="na">name=</span><span class="s">"mystuff"</span> <span class="na">file=</span><span class="s">"mystuff.html"</span><span class="cp">/></span><span class="x"></span>
+</pre></div>
+</div>
+<p>The above tag adds a local variable <tt class="docutils literal"><span class="pre">mystuff</span></tt> to the current
+scope.</p>
+<p>Then, just call the defs off of <tt class="docutils literal"><span class="pre">mystuff</span></tt>:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="n">mystuff</span><span class="o">.</span><span class="n">somedef</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span><span class="n">y</span><span class="o">=</span><span class="mi">7</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>The <tt class="docutils literal"><span class="pre"><%namespace></span></tt> tag also supports some of the other
+semantics of Python’s <tt class="docutils literal"><span class="pre">import</span></tt> statement, including pulling
+names into the local variable space, or using <tt class="docutils literal"><span class="pre">*</span></tt> to represent
+all names, using the <tt class="docutils literal"><span class="pre">import</span></tt> attribute:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">namespace</span> <span class="na">file=</span><span class="s">"mystuff.html"</span> <span class="na">import=</span><span class="s">"foo, bar"</span><span class="cp">/></span><span class="x"></span>
+</pre></div>
+</div>
+<p>This is just a quick intro to the concept of a <strong>namespace</strong>,
+which is a central Mako concept that has its own chapter in
+these docs. For more detail and examples, see
+<a class="reference internal" href="namespaces.html"><em>Namespaces</em></a>.</p>
+</div>
+<div class="section" id="calling-defs-programmatically">
+<h3>Calling Defs Programmatically<a class="headerlink" href="#calling-defs-programmatically" title="Permalink to this headline">¶</a></h3>
+<p>You can call defs programmatically from any <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object
+using the <a class="reference internal" href="usage.html#mako.template.Template.get_def" title="mako.template.Template.get_def"><tt class="xref py py-meth docutils literal"><span class="pre">get_def()</span></tt></a> method, which returns a <a class="reference internal" href="usage.html#mako.template.DefTemplate" title="mako.template.DefTemplate"><tt class="xref py py-class docutils literal"><span class="pre">DefTemplate</span></tt></a>
+object. This is a <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> subclass which the parent
+<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> creates, and is usable like any other template:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
+
+<span class="n">template</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"""</span>
+<span class="s">    <</span><span class="si">%d</span><span class="s">ef name="hi(name)"></span>
+<span class="s">        hi ${name}!</span>
+<span class="s">    </</span><span class="si">%d</span><span class="s">ef></span>
+
+<span class="s">    <</span><span class="si">%d</span><span class="s">ef name="bye(name)"></span>
+<span class="s">        bye ${name}!</span>
+<span class="s">    </</span><span class="si">%d</span><span class="s">ef></span>
+<span class="s">"""</span><span class="p">)</span>
+
+<span class="k">print</span> <span class="n">template</span><span class="o">.</span><span class="n">get_def</span><span class="p">(</span><span class="s">"hi"</span><span class="p">)</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">"ed"</span><span class="p">)</span>
+<span class="k">print</span> <span class="n">template</span><span class="o">.</span><span class="n">get_def</span><span class="p">(</span><span class="s">"bye"</span><span class="p">)</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">"ed"</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="defs-within-defs">
+<h3>Defs within Defs<a class="headerlink" href="#defs-within-defs" title="Permalink to this headline">¶</a></h3>
+<p>The def model follows regular Python rules for closures.
+Declaring <tt class="docutils literal"><span class="pre"><%def></span></tt> inside another <tt class="docutils literal"><span class="pre"><%def></span></tt> declares it
+within the parent’s <strong>enclosing scope</strong>:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"mydef()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"subdef()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">        a sub def</span>
+<span class="x">    </span><span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+
+<span class="x">    i'm the def, and the subcomponent is </span><span class="cp">${</span><span class="n">subdef</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>Just like Python, names that exist outside the inner <tt class="docutils literal"><span class="pre"><%def></span></tt>
+exist inside it as well:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span>
+    <span class="n">x</span> <span class="o">=</span> <span class="mi">12</span>
+<span class="cp">%></span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"outer()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    </span><span class="cp"><%</span>
+        <span class="n">y</span> <span class="o">=</span> <span class="mi">15</span>
+    <span class="cp">%></span><span class="x"></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"inner()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">        inner, x is </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x">, y is </span><span class="cp">${</span><span class="n">y</span><span class="cp">}</span><span class="x"></span>
+<span class="x">    </span><span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+
+<span class="x">    outer, x is </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x">, y is </span><span class="cp">${</span><span class="n">y</span><span class="cp">}</span><span class="x"></span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>Assigning to a name inside of a def declares that name as local
+to the scope of that def (again, like Python itself). This means
+the following code will raise an error:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span>
+    <span class="n">x</span> <span class="o">=</span> <span class="mi">10</span>
+<span class="cp">%></span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"somedef()"</span><span class="cp">></span>
+    <span class="cp">## error !</span><span class="x"></span>
+<span class="x">    somedef, x is </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x"></span>
+<span class="x">    </span><span class="cp"><%</span>
+        <span class="n">x</span> <span class="o">=</span> <span class="mi">27</span>
+    <span class="cp">%></span><span class="x"></span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>...because the assignment to <tt class="docutils literal"><span class="pre">x</span></tt> declares <tt class="docutils literal"><span class="pre">x</span></tt> as local to the
+scope of <tt class="docutils literal"><span class="pre">somedef</span></tt>, rendering the “outer” version unreachable
+in the expression that tries to render it.</p>
+</div>
+<div class="section" id="calling-a-def-with-embedded-content-and-or-other-defs">
+<span id="defs-with-content"></span><h3>Calling a Def with Embedded Content and/or Other Defs<a class="headerlink" href="#calling-a-def-with-embedded-content-and-or-other-defs" title="Permalink to this headline">¶</a></h3>
+<p>A flip-side to def within def is a def call with content. This
+is where you call a def, and at the same time declare a block of
+content (or multiple blocks) that can be used by the def being
+called. The main point of such a call is to create custom,
+nestable tags, just like any other template language’s
+custom-tag creation system – where the external tag controls the
+execution of the nested tags and can communicate state to them.
+Only with Mako, you don’t have to use any external Python
+modules, you can define arbitrarily nestable tags right in your
+templates.</p>
+<p>To achieve this, the target def is invoked using the form
+<tt class="docutils literal"><span class="pre"><%namepacename:defname></span></tt> instead of the normal <tt class="docutils literal"><span class="pre">${}</span></tt>
+syntax. This syntax, introduced in Mako 0.2.3, is functionally
+equivalent to another tag known as <tt class="docutils literal"><span class="pre">%call</span></tt>, which takes the form
+<tt class="docutils literal"><span class="pre"><%call</span> <span class="pre">expr='namespacename.defname(args)'></span></tt>. While <tt class="docutils literal"><span class="pre">%call</span></tt>
+is available in all versions of Mako, the newer style is
+probably more familiar looking. The <tt class="docutils literal"><span class="pre">namespace</span></tt> portion of the
+call is the name of the <strong>namespace</strong> in which the def is
+defined – in the most simple cases, this can be <tt class="docutils literal"><span class="pre">local</span></tt> or
+<tt class="docutils literal"><span class="pre">self</span></tt> to reference the current template’s namespace (the
+difference between <tt class="docutils literal"><span class="pre">local</span></tt> and <tt class="docutils literal"><span class="pre">self</span></tt> is one of inheritance
+– see <a class="reference internal" href="namespaces.html#namespaces-builtin"><em>Built-in Namespaces</em></a> for details).</p>
+<p>When the target def is invoked, a variable <tt class="docutils literal"><span class="pre">caller</span></tt> is placed
+in its context which contains another namespace containing the
+body and other defs defined by the caller. The body itself is
+referenced by the method <tt class="docutils literal"><span class="pre">body()</span></tt>. Below, we build a <tt class="docutils literal"><span class="pre">%def</span></tt>
+that operates upon <tt class="docutils literal"><span class="pre">caller.body()</span></tt> to invoke the body of the
+custom tag:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"buildtable()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    <table></span>
+<span class="x">        <tr><td></span>
+<span class="x">            </span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x">        </td></tr></span>
+<span class="x">    </table></span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">self:buildtable</span><span class="cp">></span><span class="x"></span>
+<span class="x">    I am the table body.</span>
+<span class="cp"></%</span><span class="nb">self:buildtable</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>This produces the output (whitespace formatted):</p>
+<div class="highlight-html"><div class="highlight"><pre><span class="nt"><table></span>
+    <span class="nt"><tr><td></span>
+        I am the table body.
+    <span class="nt"></td></tr></span>
+<span class="nt"></table></span>
+</pre></div>
+</div>
+<p>Using the older <tt class="docutils literal"><span class="pre">%call</span></tt> syntax looks like:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"buildtable()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    <table></span>
+<span class="x">        <tr><td></span>
+<span class="x">            </span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x">        </td></tr></span>
+<span class="x">    </table></span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">call</span> <span class="na">expr=</span><span class="s">"buildtable()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    I am the table body.</span>
+<span class="cp"></%</span><span class="nb">call</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>The <tt class="docutils literal"><span class="pre">body()</span></tt> can be executed multiple times or not at all.
+This means you can use def-call-with-content to build iterators,
+conditionals, etc:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"lister(count)"</span><span class="cp">></span>
+    <span class="cp">%</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">count</span><span class="p">):</span><span class="x"></span>
+<span class="x">        </span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span>
+    <span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">self:lister</span> <span class="na">count=</span><span class="s">"${3}"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    hi</span>
+<span class="cp"></%</span><span class="nb">self:lister</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>Produces:</p>
+<div class="highlight-html"><div class="highlight"><pre>hi
+hi
+hi
+</pre></div>
+</div>
+<p>Notice above we pass <tt class="docutils literal"><span class="pre">3</span></tt> as a Python expression, so that it
+remains as an integer.</p>
+<p>A custom “conditional” tag:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"conditional(expression)"</span><span class="cp">></span>
+    <span class="cp">%</span> <span class="k">if</span> <span class="n">expression</span><span class="p">:</span><span class="x"></span>
+<span class="x">        </span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span>
+    <span class="cp">%</span><span class="k"> endif</span><span class="x"></span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">self:conditional</span> <span class="na">expression=</span><span class="s">"${4==4}"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    i'm the result</span>
+<span class="cp"></%</span><span class="nb">self:conditional</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>Produces:</p>
+<div class="highlight-html"><div class="highlight"><pre>i'm the result
+</pre></div>
+</div>
+<p>But that’s not all. The <tt class="docutils literal"><span class="pre">body()</span></tt> function also can handle
+arguments, which will augment the local namespace of the body
+callable. The caller must define the arguments which it expects
+to receive from its target def using the <tt class="docutils literal"><span class="pre">args</span></tt> attribute,
+which is a comma-separated list of argument names. Below, our
+<tt class="docutils literal"><span class="pre"><%def></span></tt> calls the <tt class="docutils literal"><span class="pre">body()</span></tt> of its caller, passing in an
+element of data from its argument:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"layoutdata(somedata)"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    <table></span>
+    <span class="cp">%</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">somedata</span><span class="p">:</span><span class="x"></span>
+<span class="x">        <tr></span>
+        <span class="cp">%</span> <span class="k">for</span> <span class="n">col</span> <span class="ow">in</span> <span class="n">item</span><span class="p">:</span><span class="x"></span>
+<span class="x">            <td></span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">body</span><span class="p">(</span><span class="n">col</span><span class="o">=</span><span class="n">col</span><span class="p">)</span><span class="cp">}</span><span class="x"></td></span>
+        <span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
+<span class="x">        </tr></span>
+    <span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
+<span class="x">    </table></span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">self:layoutdata</span> <span class="na">somedata=</span><span class="s">"${[[1,2,3],[4,5,6],[7,8,9]]}"</span> <span class="na">args=</span><span class="s">"col"</span><span class="cp">></span><span class="x">\</span>
+<span class="x">Body data: </span><span class="cp">${</span><span class="n">col</span><span class="cp">}</span><span class="x">\</span>
+<span class="cp"></%</span><span class="nb">self:layoutdata</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>Produces:</p>
+<div class="highlight-html"><div class="highlight"><pre><span class="nt"><table></span>
+    <span class="nt"><tr></span>
+        <span class="nt"><td></span>Body data: 1<span class="nt"></td></span>
+        <span class="nt"><td></span>Body data: 2<span class="nt"></td></span>
+        <span class="nt"><td></span>Body data: 3<span class="nt"></td></span>
+    <span class="nt"></tr></span>
+    <span class="nt"><tr></span>
+        <span class="nt"><td></span>Body data: 4<span class="nt"></td></span>
+        <span class="nt"><td></span>Body data: 5<span class="nt"></td></span>
+        <span class="nt"><td></span>Body data: 6<span class="nt"></td></span>
+    <span class="nt"></tr></span>
+    <span class="nt"><tr></span>
+        <span class="nt"><td></span>Body data: 7<span class="nt"></td></span>
+        <span class="nt"><td></span>Body data: 8<span class="nt"></td></span>
+        <span class="nt"><td></span>Body data: 9<span class="nt"></td></span>
+    <span class="nt"></tr></span>
+<span class="nt"></table></span>
+</pre></div>
+</div>
+<p>You don’t have to stick to calling just the <tt class="docutils literal"><span class="pre">body()</span></tt> function.
+The caller can define any number of callables, allowing the
+<tt class="docutils literal"><span class="pre"><%call></span></tt> tag to produce whole layouts:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"layout()"</span><span class="cp">></span>
+    <span class="cp">## a layout def</span><span class="x"></span>
+<span class="x">    <div class="mainlayout"></span>
+<span class="x">        <div class="header"></span>
+<span class="x">            </span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">header</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x">        </div></span>
+
+<span class="x">        <div class="sidebar"></span>
+<span class="x">            </span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">sidebar</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x">        </div></span>
+
+<span class="x">        <div class="content"></span>
+<span class="x">            </span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x">        </div></span>
+<span class="x">    </div></span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span>
+
+<span class="cp">## calls the layout def</span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">self:layout</span><span class="cp">></span><span class="x"></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"header()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">        I am the header</span>
+<span class="x">    </span><span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"sidebar()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">        <ul></span>
+<span class="x">            <li>sidebar 1</li></span>
+<span class="x">            <li>sidebar 2</li></span>
+<span class="x">        </ul></span>
+<span class="x">    </span><span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+
+<span class="x">        this is the body</span>
+<span class="cp"></%</span><span class="nb">self:layout</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>The above layout would produce:</p>
+<div class="highlight-html"><div class="highlight"><pre><span class="nt"><div</span> <span class="na">class=</span><span class="s">"mainlayout"</span><span class="nt">></span>
+    <span class="nt"><div</span> <span class="na">class=</span><span class="s">"header"</span><span class="nt">></span>
+    I am the header
+    <span class="nt"></div></span>
+
+    <span class="nt"><div</span> <span class="na">class=</span><span class="s">"sidebar"</span><span class="nt">></span>
+    <span class="nt"><ul></span>
+        <span class="nt"><li></span>sidebar 1<span class="nt"></li></span>
+        <span class="nt"><li></span>sidebar 2<span class="nt"></li></span>
+    <span class="nt"></ul></span>
+    <span class="nt"></div></span>
+
+    <span class="nt"><div</span> <span class="na">class=</span><span class="s">"content"</span><span class="nt">></span>
+    this is the body
+    <span class="nt"></div></span>
+<span class="nt"></div></span>
+</pre></div>
+</div>
+<p>The number of things you can do with <tt class="docutils literal"><span class="pre"><%call></span></tt> and/or the
+<tt class="docutils literal"><span class="pre"><%namespacename:defname></span></tt> calling syntax is enormous. You can
+create form widget libraries, such as an enclosing <tt class="docutils literal"><span class="pre"><FORM></span></tt>
+tag and nested HTML input elements, or portable wrapping schemes
+using <tt class="docutils literal"><span class="pre"><div></span></tt> or other elements. You can create tags that
+interpret rows of data, such as from a database, providing the
+individual columns of each row to a <tt class="docutils literal"><span class="pre">body()</span></tt> callable which
+lays out the row any way it wants. Basically anything you’d do
+with a “custom tag” or tag library in some other system, Mako
+provides via <tt class="docutils literal"><span class="pre"><%def></span></tt> tags and plain Python callables which are
+invoked via <tt class="docutils literal"><span class="pre"><%namespacename:defname></span></tt> or <tt class="docutils literal"><span class="pre"><%call></span></tt>.</p>
+</div>
+</div>
+<div class="section" id="using-blocks">
+<span id="blocks"></span><h2>Using Blocks<a class="headerlink" href="#using-blocks" title="Permalink to this headline">¶</a></h2>
+<p>The <tt class="docutils literal"><span class="pre"><%block></span></tt> tag introduces some new twists on the
+<tt class="docutils literal"><span class="pre"><%def></span></tt> tag which make it more closely tailored towards layout.</p>
+<p class="versionadded">
+<span class="versionmodified">New in version 0.4.1.</span></p>
+<p>An example of a block:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><html></span>
+<span class="x">    <body></span>
+<span class="x">        </span><span class="cp"><%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="x">            this is a block.</span>
+<span class="x">        </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="x">    </body></span>
+<span class="x"></html></span>
+</pre></div>
+</div>
+<p>In the above example, we define a simple block.  The block renders its content in the place
+that it’s defined.  Since the block is called for us, it doesn’t need a name and the above
+is referred to as an <strong>anonymous block</strong>.  So the output of the above template will be:</p>
+<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span>
+    <span class="nt"><body></span>
+            this is a block.
+    <span class="nt"></body></span>
+<span class="nt"></html></span>
+</pre></div>
+</div>
+<p>So in fact the above block has absolutely no effect.  Its usefulness comes when we start
+using modifiers.  Such as, we can apply a filter to our block:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><html></span>
+<span class="x">    <body></span>
+<span class="x">        </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">filter=</span><span class="s">"h"</span><span class="cp">></span><span class="x"></span>
+<span class="x">            <html>this is some escaped html.</html></span>
+<span class="x">        </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="x">    </body></span>
+<span class="x"></html></span>
+</pre></div>
+</div>
+<p>or perhaps a caching directive:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><html></span>
+<span class="x">    <body></span>
+<span class="x">        </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">cached=</span><span class="s">"True"</span> <span class="na">cache_timeout=</span><span class="s">"60"</span><span class="cp">></span><span class="x"></span>
+<span class="x">            This content will be cached for 60 seconds.</span>
+<span class="x">        </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="x">    </body></span>
+<span class="x"></html></span>
+</pre></div>
+</div>
+<p>Blocks also work in iterations, conditionals, just like defs:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">%</span> <span class="k">if</span> <span class="n">some_condition</span><span class="p">:</span><span class="x"></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span><span class="cp">></span><span class="x">condition is met</span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span>
+<span class="cp">%</span><span class="k"> endif</span><span class="x"></span>
+</pre></div>
+</div>
+<p>While the block renders at the point it is defined in the template,
+the underlying function is present in the generated Python code only
+once, so there’s no issue with placing a block inside of a loop or
+similar. Anonymous blocks are defined as closures in the local
+rendering body, so have access to local variable scope:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">%</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">):</span><span class="x"></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span><span class="cp">></span><span class="x">i is </span><span class="cp">${</span><span class="n">i</span><span class="cp">}</%</span><span class="nb">block</span><span class="cp">></span>
+<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
+</pre></div>
+</div>
+<div class="section" id="using-named-blocks">
+<h3>Using Named Blocks<a class="headerlink" href="#using-named-blocks" title="Permalink to this headline">¶</a></h3>
+<p>Possibly the more important area where blocks are useful is when we
+do actually give them names. Named blocks are tailored to behave
+somewhat closely to Jinja2’s block tag, in that they define an area
+of a layout which can be overridden by an inheriting template. In
+sharp contrast to the <tt class="docutils literal"><span class="pre"><%def></span></tt> tag, the name given to a block is
+global for the entire template regardless of how deeply it’s nested:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><html></span>
+<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    <head></span>
+<span class="x">        <title></span>
+<span class="x">            </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"title"</span><span class="cp">></span><span class="x">Title</span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="x">        </title></span>
+<span class="x">    </head></span>
+<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="x"><body></span>
+<span class="x">    </span><span class="cp">${</span><span class="nb">next</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x"></body></span>
+<span class="x"></html></span>
+</pre></div>
+</div>
+<p>The above example has two named blocks “<tt class="docutils literal"><span class="pre">header</span></tt>” and “<tt class="docutils literal"><span class="pre">title</span></tt>”, both of which can be referred to
+by an inheriting template. A detailed walkthrough of this usage can be found at <a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</p>
+<p>Note above that named blocks don’t have any argument declaration the way defs do. They still implement themselves
+as Python functions, however, so they can be invoked additional times beyond their initial definition:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><div name="page"></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"pagecontrol"</span><span class="cp">></span><span class="x"></span>
+<span class="x">        <a href="">previous page</a> |</span>
+<span class="x">        <a href="">next page</a></span>
+<span class="x">    </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+
+<span class="x">    <table></span>
+<span class="x">        ## some content</span>
+<span class="x">    </table></span>
+
+<span class="x">    </span><span class="cp">${</span><span class="n">pagecontrol</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x"></div></span>
+</pre></div>
+</div>
+<p>The content referenced by <tt class="docutils literal"><span class="pre">pagecontrol</span></tt> above will be rendered both above and below the <tt class="docutils literal"><span class="pre"><table></span></tt> tags.</p>
+<p>To keep things sane, named blocks have restrictions that defs do not:</p>
+<ul class="simple">
+<li>The <tt class="docutils literal"><span class="pre"><%block></span></tt> declaration cannot have any argument signature.</li>
+<li>The name of a <tt class="docutils literal"><span class="pre"><%block></span></tt> can only be defined once in a template – an error is raised if two blocks of the same
+name occur anywhere in a single template, regardless of nesting.  A similar error is raised if a top level def
+shares the same name as that of a block.</li>
+<li>A named <tt class="docutils literal"><span class="pre"><%block></span></tt> cannot be defined within a <tt class="docutils literal"><span class="pre"><%def></span></tt>, or inside the body of a “call”, i.e.
+<tt class="docutils literal"><span class="pre"><%call></span></tt> or <tt class="docutils literal"><span class="pre"><%namespacename:defname></span></tt> tag.  Anonymous blocks can, however.</li>
+</ul>
+</div>
+<div class="section" id="using-page-arguments-in-named-blocks">
+<h3>Using Page Arguments in Named Blocks<a class="headerlink" href="#using-page-arguments-in-named-blocks" title="Permalink to this headline">¶</a></h3>
+<p>A named block is very much like a top level def. It has a similar
+restriction to these types of defs in that arguments passed to the
+template via the <tt class="docutils literal"><span class="pre"><%page></span></tt> tag aren’t automatically available.
+Using arguments with the <tt class="docutils literal"><span class="pre"><%page></span></tt> tag is described in the section
+<a class="reference internal" href="namespaces.html#namespaces-body"><em>The body() Method</em></a>, and refers to scenarios such as when the
+<tt class="docutils literal"><span class="pre">body()</span></tt> method of a template is called from an inherited template passing
+arguments, or the template is invoked from an <tt class="docutils literal"><span class="pre"><%include></span></tt> tag
+with arguments. To allow a named block to share the same arguments
+passed to the page, the <tt class="docutils literal"><span class="pre">args</span></tt> attribute can be used:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">args=</span><span class="s">"post"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="x"><a name="</span><span class="cp">${</span><span class="n">post</span><span class="o">.</span><span class="n">title</span><span class="cp">}</span><span class="x">" /></span>
+
+<span class="x"><span class="post_prose"></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"post_prose"</span> <span class="na">args=</span><span class="s">"post"</span><span class="cp">></span><span class="x"></span>
+<span class="x">        </span><span class="cp">${</span><span class="n">post</span><span class="o">.</span><span class="n">content</span><span class="cp">}</span><span class="x"></span>
+<span class="x">    </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="x"></span></span>
+</pre></div>
+</div>
+<p>Where above, if the template is called via a directive like
+<tt class="docutils literal"><span class="pre"><%include</span> <span class="pre">file="post.mako"</span> <span class="pre">args="post=post"</span> <span class="pre">/></span></tt>, the <tt class="docutils literal"><span class="pre">post</span></tt>
+variable is available both in the main body as well as the
+<tt class="docutils literal"><span class="pre">post_prose</span></tt> block.</p>
+<p>Similarly, the <tt class="docutils literal"><span class="pre">**pageargs</span></tt> variable is present, in named blocks only,
+for those arguments not explicit in the <tt class="docutils literal"><span class="pre"><%page></span></tt> tag:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"post_prose"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    </span><span class="cp">${</span><span class="n">pageargs</span><span class="p">[</span><span class="s">'post'</span><span class="p">]</span><span class="o">.</span><span class="n">content</span><span class="cp">}</span><span class="x"></span>
+<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>The <tt class="docutils literal"><span class="pre">args</span></tt> attribute is only allowed with named blocks. With
+anonymous blocks, the Python function is always rendered in the same
+scope as the call itself, so anything available directly outside the
+anonymous block is available inside as well.</p>
+</div>
+</div>
+</div>
+
+    </div>
+
+</div>
+
+<div id="docs-bottom-navigation" class="docs-navigation-links">
+        Previous:
+        <a href="syntax.html" title="previous chapter">Syntax</a>
+        Next:
+        <a href="runtime.html" title="next chapter">The Mako Runtime Environment</a>
+
+    <div id="docs-copyright">
+        © Copyright the Mako authors and contributors.
+        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
+        with Mako templates.
+    </div>
+</div>
+
+</div>
+
+<div class="clearfix">
+
+<hr/>
+
+<div class="copyright">Website content copyright © by Michael Bayer.
+    All rights reserved.  Mako and its documentation are licensed
+    under the MIT license.  mike(&)zzzcomputing.com</div>
+
+</div>
+</div>
+</body>
+</html>
diff --git a/lib/Mako-0.7.3/doc/filtering.html b/lib/Mako-0.7.3/doc/filtering.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/filtering.html
@@ -0,0 +1,478 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<head>
+<title>
+    
+                Filtering and Buffering
+             — 
+    Mako 0.7.3 Documentation
+</title>
+
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
+
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+          URL_ROOT:    '#',
+          VERSION:     '0.7.3',
+          COLLAPSE_MODINDEX: false,
+          FILE_SUFFIX: '.html'
+      };
+    </script>
+        <script type="text/javascript" src="_static/jquery.js"></script>
+        <script type="text/javascript" src="_static/underscore.js"></script>
+        <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="top" title="Mako 0.7.3 Documentation" href="index.html" />
+        <link rel="next" title="The Unicode Chapter" href="unicode.html" />
+        <link rel="prev" title="Inheritance" href="inheritance.html" />
+
+<link rel="stylesheet" href="_static/site.css"></link>
+
+
+</head>
+<body>
+    <div id="wrap">
+    <div class="rightbar">
+
+
+    <div class="slogan">
+    Hyperfast and lightweight templating for the Python platform.
+    </div>
+
+
+    </div>
+
+    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
+
+    <hr/>
+
+    
+
+
+
+
+
+
+
+
+
+<div id="docs-container">
+
+
+
+<div id="docs-header">
+    <h1>Mako 0.7.3 Documentation</h1>
+
+    <div id="docs-search">
+    Search:
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </div>
+
+    <div id="docs-version-header">
+        Release: <span class="version-num">0.7.3</span>
+
+    </div>
+
+</div>
+
+<div id="docs-top-navigation">
+    <div id="docs-top-page-control" class="docs-navigation-links">
+        <ul>
+            <li>Prev:
+            <a href="inheritance.html" title="previous chapter">Inheritance</a>
+            </li>
+            <li>Next:
+            <a href="unicode.html" title="next chapter">The Unicode Chapter</a>
+            </li>
+
+        <li>
+            <a href="index.html">Table of Contents</a> |
+            <a href="genindex.html">Index</a>
+            | <a href="_sources/filtering.txt">view source
+        </li>
+        </ul>
+    </div>
+
+    <div id="docs-navigation-banner">
+        <a href="index.html">Mako 0.7.3 Documentation</a>
+        » 
+                Filtering and Buffering
+             
+
+        <h2>
+            
+                Filtering and Buffering
+            
+        </h2>
+    </div>
+
+</div>
+
+<div id="docs-body-container">
+
+    <div id="docs-sidebar">
+    <h3><a href="index.html">Table of Contents</a></h3>
+    <ul>
+<li><a class="reference internal" href="#">Filtering and Buffering</a><ul>
+<li><a class="reference internal" href="#expression-filtering">Expression Filtering</a><ul>
+<li><a class="reference internal" href="#the-default-filters-argument">The <tt class="docutils literal"><span class="pre">default_filters</span></tt> Argument</a></li>
+<li><a class="reference internal" href="#turning-off-filtering-with-the-n-filter">Turning off Filtering with the <tt class="docutils literal"><span class="pre">n</span></tt> Filter</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#filtering-defs-and-blocks">Filtering Defs and Blocks</a></li>
+<li><a class="reference internal" href="#buffering">Buffering</a></li>
+<li><a class="reference internal" href="#decorating">Decorating</a></li>
+</ul>
+</li>
+</ul>
+
+
+    <h4>Previous Topic</h4>
+    <p>
+    <a href="inheritance.html" title="previous chapter">Inheritance</a>
+    </p>
+    <h4>Next Topic</h4>
+    <p>
+    <a href="unicode.html" title="next chapter">The Unicode Chapter</a>
+    </p>
+
+    <h4>Quick Search</h4>
+    <p>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </p>
+
+    </div>
+
+    <div id="docs-body" class="withsidebar" >
+        
+<div class="section" id="filtering-and-buffering">
+<span id="filtering-toplevel"></span><h1>Filtering and Buffering<a class="headerlink" href="#filtering-and-buffering" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="expression-filtering">
+<h2>Expression Filtering<a class="headerlink" href="#expression-filtering" title="Permalink to this headline">¶</a></h2>
+<p>As described in the chapter <a class="reference internal" href="syntax.html"><em>Syntax</em></a>, the “<tt class="docutils literal"><span class="pre">|</span></tt>” operator can be
+applied to a “<tt class="docutils literal"><span class="pre">${}</span></tt>” expression to apply escape filters to the
+output:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">"this is some text"</span> <span class="o">|</span> <span class="n">u</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>The above expression applies URL escaping to the expression, and
+produces <tt class="docutils literal"><span class="pre">this+is+some+text</span></tt>.</p>
+<p>The built-in escape flags are:</p>
+<ul>
+<li><p class="first"><tt class="docutils literal"><span class="pre">u</span></tt> : URL escaping, provided by
+<tt class="docutils literal"><span class="pre">urllib.quote_plus(string.encode('utf-8'))</span></tt></p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">h</span></tt> : HTML escaping, provided by
+<tt class="docutils literal"><span class="pre">markupsafe.escape(string)</span></tt></p>
+<p class="versionadded">
+<span class="versionmodified">New in version 0.3.4: </span>Prior versions use <tt class="docutils literal"><span class="pre">cgi.escape(string,</span> <span class="pre">True)</span></tt>.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">x</span></tt> : XML escaping</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">trim</span></tt> : whitespace trimming, provided by <tt class="docutils literal"><span class="pre">string.strip()</span></tt></p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">entity</span></tt> : produces HTML entity references for applicable
+strings, derived from <tt class="docutils literal"><span class="pre">htmlentitydefs</span></tt></p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">unicode</span></tt> (<tt class="docutils literal"><span class="pre">str</span></tt> on Python 3): produces a Python unicode
+string (this function is applied by default)</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">decode.<some</span> <span class="pre">encoding></span></tt>: decode input into a Python
+unicode with the specified encoding</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">n</span></tt> : disable all default filtering; only filters specified
+in the local expression tag will be applied.</p>
+</li>
+</ul>
+<p>To apply more than one filter, separate them by a comma:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">" <tag>some value</tag> "</span> <span class="o">|</span> <span class="n">h</span><span class="p">,</span><span class="n">trim</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>The above produces <tt class="docutils literal"><span class="pre">&lt;tag&gt;some</span> <span class="pre">value&lt;/tag&gt;</span></tt>, with
+no leading or trailing whitespace. The HTML escaping function is
+applied first, the “trim” function second.</p>
+<p>Naturally, you can make your own filters too. A filter is just a
+Python function that accepts a single string argument, and
+returns the filtered result. The expressions after the <tt class="docutils literal"><span class="pre">|</span></tt>
+operator draw upon the local namespace of the template in which
+they appear, meaning you can define escaping functions locally:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%!</span>
+    <span class="k">def</span> <span class="nf">myescape</span><span class="p">(</span><span class="n">text</span><span class="p">):</span>
+        <span class="k">return</span> <span class="s">"<TAG>"</span> <span class="o">+</span> <span class="n">text</span> <span class="o">+</span> <span class="s">"</TAG>"</span>
+<span class="cp">%></span><span class="x"></span>
+
+<span class="x">Here's some tagged text: </span><span class="cp">${</span><span class="s">"text"</span> <span class="o">|</span> <span class="n">myescape</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>Or from any Python module:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%!</span>
+    <span class="kn">import</span> <span class="nn">myfilters</span>
+<span class="cp">%></span><span class="x"></span>
+
+<span class="x">Here's some tagged text: </span><span class="cp">${</span><span class="s">"text"</span> <span class="o">|</span> <span class="n">myfilters</span><span class="o">.</span><span class="n">tagfilter</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>A page can apply a default set of filters to all expression tags
+using the <tt class="docutils literal"><span class="pre">expression_filter</span></tt> argument to the <tt class="docutils literal"><span class="pre">%page</span></tt> tag:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">expression_filter=</span><span class="s">"h"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="x">Escaped text:  </span><span class="cp">${</span><span class="s">"<html>some html</html>"</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>Result:</p>
+<div class="highlight-html"><div class="highlight"><pre>Escaped text: <span class="ni">&lt;</span>html<span class="ni">&gt;</span>some html<span class="ni">&lt;</span>/html<span class="ni">&gt;</span>
+</pre></div>
+</div>
+<div class="section" id="the-default-filters-argument">
+<span id="filtering-default-filters"></span><h3>The <tt class="docutils literal"><span class="pre">default_filters</span></tt> Argument<a class="headerlink" href="#the-default-filters-argument" title="Permalink to this headline">¶</a></h3>
+<p>In addition to the <tt class="docutils literal"><span class="pre">expression_filter</span></tt> argument, the
+<tt class="docutils literal"><span class="pre">default_filters</span></tt> argument to both <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> and
+<a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> can specify filtering for all expression tags
+at the programmatic level. This array-based argument, when given
+its default argument of <tt class="docutils literal"><span class="pre">None</span></tt>, will be internally set to
+<tt class="docutils literal"><span class="pre">["unicode"]</span></tt> (or <tt class="docutils literal"><span class="pre">["str"]</span></tt> on Python 3), except when
+<tt class="docutils literal"><span class="pre">disable_unicode=True</span></tt> is set in which case it defaults to
+<tt class="docutils literal"><span class="pre">["str"]</span></tt>:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/tmp'</span><span class="p">],</span> <span class="n">default_filters</span><span class="o">=</span><span class="p">[</span><span class="s">'unicode'</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>To replace the usual <tt class="docutils literal"><span class="pre">unicode</span></tt>/<tt class="docutils literal"><span class="pre">str</span></tt> function with a
+specific encoding, the <tt class="docutils literal"><span class="pre">decode</span></tt> filter can be substituted:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/tmp'</span><span class="p">],</span> <span class="n">default_filters</span><span class="o">=</span><span class="p">[</span><span class="s">'decode.utf8'</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>To disable <tt class="docutils literal"><span class="pre">default_filters</span></tt> entirely, set it to an empty
+list:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/tmp'</span><span class="p">],</span> <span class="n">default_filters</span><span class="o">=</span><span class="p">[])</span>
+</pre></div>
+</div>
+<p>Any string name can be added to <tt class="docutils literal"><span class="pre">default_filters</span></tt> where it
+will be added to all expressions as a filter. The filters are
+applied from left to right, meaning the leftmost filter is
+applied first.</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="n">templatetext</span><span class="p">,</span> <span class="n">default_filters</span><span class="o">=</span><span class="p">[</span><span class="s">'unicode'</span><span class="p">,</span> <span class="s">'myfilter'</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>To ease the usage of <tt class="docutils literal"><span class="pre">default_filters</span></tt> with custom filters,
+you can also add imports (or other code) to all templates using
+the <tt class="docutils literal"><span class="pre">imports</span></tt> argument:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/tmp'</span><span class="p">],</span>
+                   <span class="n">default_filters</span><span class="o">=</span><span class="p">[</span><span class="s">'unicode'</span><span class="p">,</span> <span class="s">'myfilter'</span><span class="p">],</span>
+                   <span class="n">imports</span><span class="o">=</span><span class="p">[</span><span class="s">'from mypackage import myfilter'</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>The above will generate templates something like this:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># ....</span>
+<span class="kn">from</span> <span class="nn">mypackage</span> <span class="kn">import</span> <span class="n">myfilter</span>
+
+<span class="k">def</span> <span class="nf">render_body</span><span class="p">(</span><span class="n">context</span><span class="p">):</span>
+    <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">myfilter</span><span class="p">(</span><span class="nb">unicode</span><span class="p">(</span><span class="s">"some text"</span><span class="p">)))</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="turning-off-filtering-with-the-n-filter">
+<h3>Turning off Filtering with the <tt class="docutils literal"><span class="pre">n</span></tt> Filter<a class="headerlink" href="#turning-off-filtering-with-the-n-filter" title="Permalink to this headline">¶</a></h3>
+<p>In all cases the special <tt class="docutils literal"><span class="pre">n</span></tt> filter, used locally within an
+expression, will <strong>disable</strong> all filters declared in the
+<tt class="docutils literal"><span class="pre"><%page></span></tt> tag as well as in <tt class="docutils literal"><span class="pre">default_filters</span></tt>. Such as:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">'myexpression'</span> <span class="o">|</span> <span class="n">n</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>will render <tt class="docutils literal"><span class="pre">myexpression</span></tt> with no filtering of any kind, and:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">'myexpression'</span> <span class="o">|</span> <span class="n">n</span><span class="p">,</span><span class="n">trim</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>will render <tt class="docutils literal"><span class="pre">myexpression</span></tt> using the <tt class="docutils literal"><span class="pre">trim</span></tt> filter only.</p>
+</div>
+</div>
+<div class="section" id="filtering-defs-and-blocks">
+<h2>Filtering Defs and Blocks<a class="headerlink" href="#filtering-defs-and-blocks" title="Permalink to this headline">¶</a></h2>
+<p>The <tt class="docutils literal"><span class="pre">%def</span></tt> and <tt class="docutils literal"><span class="pre">%block</span></tt> tags have an argument called <tt class="docutils literal"><span class="pre">filter</span></tt> which will apply the
+given list of filter functions to the output of the <tt class="docutils literal"><span class="pre">%def</span></tt>:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"foo()"</span> <span class="na">filter=</span><span class="s">"h, trim"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    <b>this is bold</b></span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>When the <tt class="docutils literal"><span class="pre">filter</span></tt> attribute is applied to a def as above, the def
+is automatically <strong>buffered</strong> as well. This is described next.</p>
+</div>
+<div class="section" id="buffering">
+<h2>Buffering<a class="headerlink" href="#buffering" title="Permalink to this headline">¶</a></h2>
+<p>One of Mako’s central design goals is speed. To this end, all of
+the textual content within a template and its various callables
+is by default piped directly to the single buffer that is stored
+within the <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object. While this normally is easy to
+miss, it has certain side effects. The main one is that when you
+call a def using the normal expression syntax, i.e.
+<tt class="docutils literal"><span class="pre">${somedef()}</span></tt>, it may appear that the return value of the
+function is the content it produced, which is then delivered to
+your template just like any other expression substitution,
+except that normally, this is not the case; the return value of
+<tt class="docutils literal"><span class="pre">${somedef()}</span></tt> is simply the empty string <tt class="docutils literal"><span class="pre">''</span></tt>. By the time
+you receive this empty string, the output of <tt class="docutils literal"><span class="pre">somedef()</span></tt> has
+been sent to the underlying buffer.</p>
+<p>You may not want this effect, if for example you are doing
+something like this:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">" results "</span> <span class="o">+</span> <span class="n">somedef</span><span class="p">()</span> <span class="o">+</span> <span class="s">" more results "</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>If the <tt class="docutils literal"><span class="pre">somedef()</span></tt> function produced the content “<tt class="docutils literal"><span class="pre">somedef's</span>
+<span class="pre">results</span></tt>”, the above template would produce this output:</p>
+<div class="highlight-html"><div class="highlight"><pre>somedef's results results more results
+</pre></div>
+</div>
+<p>This is because <tt class="docutils literal"><span class="pre">somedef()</span></tt> fully executes before the
+expression returns the results of its concatenation; the
+concatenation in turn receives just the empty string as its
+middle expression.</p>
+<p>Mako provides two ways to work around this. One is by applying
+buffering to the <tt class="docutils literal"><span class="pre">%def</span></tt> itself:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"somedef()"</span> <span class="na">buffered=</span><span class="s">"True"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    somedef's results</span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>The above definition will generate code similar to this:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">somedef</span><span class="p">():</span>
+    <span class="n">context</span><span class="o">.</span><span class="n">push_buffer</span><span class="p">()</span>
+    <span class="k">try</span><span class="p">:</span>
+        <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"somedef's results"</span><span class="p">)</span>
+    <span class="k">finally</span><span class="p">:</span>
+        <span class="n">buf</span> <span class="o">=</span> <span class="n">context</span><span class="o">.</span><span class="n">pop_buffer</span><span class="p">()</span>
+    <span class="k">return</span> <span class="n">buf</span><span class="o">.</span><span class="n">getvalue</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>So that the content of <tt class="docutils literal"><span class="pre">somedef()</span></tt> is sent to a second buffer,
+which is then popped off the stack and its value returned. The
+speed hit inherent in buffering the output of a def is also
+apparent.</p>
+<p>Note that the <tt class="docutils literal"><span class="pre">filter</span></tt> argument on <tt class="docutils literal"><span class="pre">%def</span></tt> also causes the def to
+be buffered. This is so that the final content of the <tt class="docutils literal"><span class="pre">%def</span></tt> can
+be delivered to the escaping function in one batch, which
+reduces method calls and also produces more deterministic
+behavior for the filtering function itself, which can possibly
+be useful for a filtering function that wishes to apply a
+transformation to the text as a whole.</p>
+<p>The other way to buffer the output of a def or any Mako callable
+is by using the built-in <tt class="docutils literal"><span class="pre">capture</span></tt> function. This function
+performs an operation similar to the above buffering operation
+except it is specified by the caller.</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">" results "</span> <span class="o">+</span> <span class="n">capture</span><span class="p">(</span><span class="n">somedef</span><span class="p">)</span> <span class="o">+</span> <span class="s">" more results "</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>Note that the first argument to the <tt class="docutils literal"><span class="pre">capture</span></tt> function is
+<strong>the function itself</strong>, not the result of calling it. This is
+because the <tt class="docutils literal"><span class="pre">capture</span></tt> function takes over the job of actually
+calling the target function, after setting up a buffered
+environment. To send arguments to the function, just send them
+to <tt class="docutils literal"><span class="pre">capture</span></tt> instead:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="n">capture</span><span class="p">(</span><span class="n">somedef</span><span class="p">,</span> <span class="mi">17</span><span class="p">,</span> <span class="s">'hi'</span><span class="p">,</span> <span class="n">use_paging</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>The above call is equivalent to the unbuffered call:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="n">somedef</span><span class="p">(</span><span class="mi">17</span><span class="p">,</span> <span class="s">'hi'</span><span class="p">,</span> <span class="n">use_paging</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="decorating">
+<h2>Decorating<a class="headerlink" href="#decorating" title="Permalink to this headline">¶</a></h2>
+<p class="versionadded">
+<span class="versionmodified">New in version 0.2.5.</span></p>
+<p>Somewhat like a filter for a <tt class="docutils literal"><span class="pre">%def</span></tt> but more flexible, the <tt class="docutils literal"><span class="pre">decorator</span></tt>
+argument to <tt class="docutils literal"><span class="pre">%def</span></tt> allows the creation of a function that will
+work in a similar manner to a Python decorator. The function can
+control whether or not the function executes. The original
+intent of this function is to allow the creation of custom cache
+logic, but there may be other uses as well.</p>
+<p><tt class="docutils literal"><span class="pre">decorator</span></tt> is intended to be used with a regular Python
+function, such as one defined in a library module. Here we’ll
+illustrate the python function defined in the template for
+simplicities’ sake:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%!</span>
+    <span class="k">def</span> <span class="nf">bar</span><span class="p">(</span><span class="n">fn</span><span class="p">):</span>
+        <span class="k">def</span> <span class="nf">decorate</span><span class="p">(</span><span class="n">context</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
+            <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"BAR"</span><span class="p">)</span>
+            <span class="n">fn</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">)</span>
+            <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"BAR"</span><span class="p">)</span>
+            <span class="k">return</span> <span class="s">''</span>
+        <span class="k">return</span> <span class="n">decorate</span>
+<span class="cp">%></span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"foo()"</span> <span class="na">decorator=</span><span class="s">"bar"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    this is foo</span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+
+<span class="cp">${</span><span class="n">foo</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>The above template will return, with more whitespace than this,
+<tt class="docutils literal"><span class="pre">"BAR</span> <span class="pre">this</span> <span class="pre">is</span> <span class="pre">foo</span> <span class="pre">BAR"</span></tt>. The function is the render callable
+itself (or possibly a wrapper around it), and by default will
+write to the context. To capture its output, use the <a class="reference internal" href="namespaces.html#mako.runtime.capture" title="mako.runtime.capture"><tt class="xref py py-func docutils literal"><span class="pre">capture()</span></tt></a>
+callable in the <tt class="docutils literal"><span class="pre">mako.runtime</span></tt> module (available in templates
+as just <tt class="docutils literal"><span class="pre">runtime</span></tt>):</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%!</span>
+    <span class="k">def</span> <span class="nf">bar</span><span class="p">(</span><span class="n">fn</span><span class="p">):</span>
+        <span class="k">def</span> <span class="nf">decorate</span><span class="p">(</span><span class="n">context</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
+            <span class="k">return</span> <span class="s">"BAR"</span> <span class="o">+</span> <span class="n">runtime</span><span class="o">.</span><span class="n">capture</span><span class="p">(</span><span class="n">context</span><span class="p">,</span> <span class="n">fn</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">)</span> <span class="o">+</span> <span class="s">"BAR"</span>
+        <span class="k">return</span> <span class="n">decorate</span>
+<span class="cp">%></span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"foo()"</span> <span class="na">decorator=</span><span class="s">"bar"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    this is foo</span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+
+<span class="cp">${</span><span class="n">foo</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>The decorator can be used with top-level defs as well as nested
+defs, and blocks too. Note that when calling a top-level def from the
+<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> API, i.e. <tt class="docutils literal"><span class="pre">template.get_def('somedef').render()</span></tt>,
+the decorator has to write the output to the <tt class="docutils literal"><span class="pre">context</span></tt>, i.e.
+as in the first example. The return value gets discarded.</p>
+</div>
+</div>
+
+    </div>
+
+</div>
+
+<div id="docs-bottom-navigation" class="docs-navigation-links">
+        Previous:
+        <a href="inheritance.html" title="previous chapter">Inheritance</a>
+        Next:
+        <a href="unicode.html" title="next chapter">The Unicode Chapter</a>
+
+    <div id="docs-copyright">
+        © Copyright the Mako authors and contributors.
+        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
+        with Mako templates.
+    </div>
+</div>
+
+</div>
+
+<div class="clearfix">
+
+<hr/>
+
+<div class="copyright">Website content copyright © by Michael Bayer.
+    All rights reserved.  Mako and its documentation are licensed
+    under the MIT license.  mike(&)zzzcomputing.com</div>
+
+</div>
+</div>
+</body>
+</html>
diff --git a/lib/Mako-0.7.3/doc/genindex.html b/lib/Mako-0.7.3/doc/genindex.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/genindex.html
@@ -0,0 +1,916 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<head>
+<title>
+    
+    Index
+ — 
+    Mako 0.7.3 Documentation
+</title>
+
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
+
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+          URL_ROOT:    '#',
+          VERSION:     '0.7.3',
+          COLLAPSE_MODINDEX: false,
+          FILE_SUFFIX: '.html'
+      };
+    </script>
+        <script type="text/javascript" src="_static/jquery.js"></script>
+        <script type="text/javascript" src="_static/underscore.js"></script>
+        <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="index" title="Index" href="#" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="top" title="Mako 0.7.3 Documentation" href="index.html" />
+
+<link rel="stylesheet" href="_static/site.css"></link>
+
+
+</head>
+<body>
+    <div id="wrap">
+    <div class="rightbar">
+
+
+    <div class="slogan">
+    Hyperfast and lightweight templating for the Python platform.
+    </div>
+
+
+    </div>
+
+    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
+
+    <hr/>
+
+    
+
+
+
+
+
+
+
+
+
+<div id="docs-container">
+
+
+
+<div id="docs-header">
+    <h1>Mako 0.7.3 Documentation</h1>
+
+    <div id="docs-search">
+    Search:
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </div>
+
+    <div id="docs-version-header">
+        Release: <span class="version-num">0.7.3</span>
+
+    </div>
+
+</div>
+
+<div id="docs-top-navigation">
+    <div id="docs-top-page-control" class="docs-navigation-links">
+        <ul>
+
+        <li>
+            <a href="index.html">Table of Contents</a> |
+            <a href="#">Index</a>
+        </li>
+        </ul>
+    </div>
+
+    <div id="docs-navigation-banner">
+        <a href="index.html">Mako 0.7.3 Documentation</a>
+        » 
+    Index
+ 
+
+        <h2>
+            
+    Index
+
+        </h2>
+    </div>
+
+</div>
+
+<div id="docs-body-container">
+
+
+    <div id="docs-body" class="" >
+        
+
+
+
+   <h1 id="index">Index</h1>
+
+    <a href="#A"><strong>A</strong></a>
+    | <a href="#B"><strong>B</strong></a>
+    | <a href="#C"><strong>C</strong></a>
+    | <a href="#D"><strong>D</strong></a>
+    | <a href="#E"><strong>E</strong></a>
+    | <a href="#F"><strong>F</strong></a>
+    | <a href="#G"><strong>G</strong></a>
+    | <a href="#H"><strong>H</strong></a>
+    | <a href="#I"><strong>I</strong></a>
+    | <a href="#K"><strong>K</strong></a>
+    | <a href="#L"><strong>L</strong></a>
+    | <a href="#M"><strong>M</strong></a>
+    | <a href="#N"><strong>N</strong></a>
+    | <a href="#P"><strong>P</strong></a>
+    | <a href="#R"><strong>R</strong></a>
+    | <a href="#S"><strong>S</strong></a>
+    | <a href="#T"><strong>T</strong></a>
+    | <a href="#U"><strong>U</strong></a>
+    | <a href="#W"><strong>W</strong></a>
+
+   <hr />
+
+<h2 id="A">A</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="usage.html#mako.lookup.TemplateCollection.adjust_uri">adjust_uri() (mako.lookup.TemplateCollection method)</a>
+</dt>
+
+    <dd><dl>
+      <dt><a href="usage.html#mako.lookup.TemplateLookup.adjust_uri">(mako.lookup.TemplateLookup method)</a>
+      </dt>
+    </dl></dd>
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+
+<dt>
+        <a href="namespaces.html#mako.runtime.Namespace.attr">attr (mako.runtime.Namespace attribute)</a>
+</dt>
+
+
+  
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="B">B</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="caching.html#mako.ext.beaker_cache.BeakerCacheImpl">BeakerCacheImpl (class in mako.ext.beaker_cache)</a>
+</dt>
+
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="C">C</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="caching.html#mako.cache.Cache">Cache (class in mako.cache)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="namespaces.html#mako.runtime.Namespace.cache">cache (mako.runtime.Namespace attribute)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="caching.html#mako.cache.CacheImpl">CacheImpl (class in mako.cache)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="namespaces.html#mako.runtime.capture">capture() (in module mako.runtime)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="usage.html#mako.template.Template.code">code (mako.template.Template attribute)</a>
+</dt>
+
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+
+<dt>
+        <a href="runtime.html#mako.runtime.Context">Context (class in mako.runtime)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="namespaces.html#mako.runtime.Namespace.context">context (mako.runtime.Namespace attribute)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="runtime.html#mako.runtime.LoopContext.cycle">cycle() (mako.runtime.LoopContext method)</a>
+</dt>
+
+
+  
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="D">D</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="usage.html#mako.template.DefTemplate">DefTemplate (class in mako.template)</a>
+</dt>
+
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="E">E</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="usage.html#RichTraceback.error">error (RichTraceback attribute)</a>
+</dt>
+
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="F">F</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="namespaces.html#mako.runtime.ModuleNamespace.filename">filename (mako.runtime.ModuleNamespace attribute)</a>
+</dt>
+
+    <dd><dl>
+      <dt><a href="namespaces.html#mako.runtime.Namespace.filename">(mako.runtime.Namespace attribute)</a>
+      </dt>
+      <dt><a href="namespaces.html#mako.runtime.TemplateNamespace.filename">(mako.runtime.TemplateNamespace attribute)</a>
+      </dt>
+    </dl></dd>
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+
+<dt>
+        <a href="usage.html#mako.lookup.TemplateCollection.filename_to_uri">filename_to_uri() (mako.lookup.TemplateCollection method)</a>
+</dt>
+
+    <dd><dl>
+      <dt><a href="usage.html#mako.lookup.TemplateLookup.filename_to_uri">(mako.lookup.TemplateLookup method)</a>
+      </dt>
+    </dl></dd>
+
+  
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="G">G</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="caching.html#mako.cache.Cache.get">get() (mako.cache.Cache method)</a>
+</dt>
+
+    <dd><dl>
+      <dt><a href="caching.html#mako.cache.CacheImpl.get">(mako.cache.CacheImpl method)</a>
+      </dt>
+      <dt><a href="runtime.html#mako.runtime.Context.get">(mako.runtime.Context method)</a>
+      </dt>
+    </dl></dd>
+
+  
+
+
+<dt>
+        <a href="namespaces.html#mako.runtime.Namespace.get_cached">get_cached() (mako.runtime.Namespace method)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="usage.html#mako.template.Template.get_def">get_def() (mako.template.Template method)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="namespaces.html#mako.runtime.Namespace.get_namespace">get_namespace() (mako.runtime.Namespace method)</a>
+</dt>
+
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+
+<dt>
+        <a href="caching.html#mako.cache.Cache.get_or_create">get_or_create() (mako.cache.Cache method)</a>
+</dt>
+
+    <dd><dl>
+      <dt><a href="caching.html#mako.cache.CacheImpl.get_or_create">(mako.cache.CacheImpl method)</a>
+      </dt>
+    </dl></dd>
+
+  
+
+
+<dt>
+        <a href="usage.html#mako.lookup.TemplateCollection.get_template">get_template() (mako.lookup.TemplateCollection method)</a>
+</dt>
+
+    <dd><dl>
+      <dt><a href="usage.html#mako.lookup.TemplateLookup.get_template">(mako.lookup.TemplateLookup method)</a>
+      </dt>
+      <dt><a href="namespaces.html#mako.runtime.Namespace.get_template">(mako.runtime.Namespace method)</a>
+      </dt>
+    </dl></dd>
+
+  
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="H">H</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="usage.html#mako.lookup.TemplateCollection.has_template">has_template() (mako.lookup.TemplateCollection method)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="usage.html#mako.exceptions.html_error_template">html_error_template() (in module mako.exceptions)</a>
+</dt>
+
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="I">I</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="caching.html#mako.cache.Cache.id">id (mako.cache.Cache attribute)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="caching.html#mako.cache.Cache.impl">impl (mako.cache.Cache attribute)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="namespaces.html#mako.runtime.Namespace.include_file">include_file() (mako.runtime.Namespace method)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="caching.html#mako.cache.Cache.invalidate">invalidate() (mako.cache.Cache method)</a>
+</dt>
+
+    <dd><dl>
+      <dt><a href="caching.html#mako.cache.CacheImpl.invalidate">(mako.cache.CacheImpl method)</a>
+      </dt>
+    </dl></dd>
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+
+<dt>
+        <a href="caching.html#mako.cache.Cache.invalidate_body">invalidate_body() (mako.cache.Cache method)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="caching.html#mako.cache.Cache.invalidate_closure">invalidate_closure() (mako.cache.Cache method)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="caching.html#mako.cache.Cache.invalidate_def">invalidate_def() (mako.cache.Cache method)</a>
+</dt>
+
+
+  
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="K">K</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="runtime.html#mako.runtime.Context.keys">keys() (mako.runtime.Context method)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="runtime.html#mako.runtime.Context.kwargs">kwargs (mako.runtime.Context attribute)</a>
+</dt>
+
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="L">L</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="usage.html#RichTraceback.lineno">lineno (RichTraceback attribute)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="runtime.html#mako.runtime.Context.locals_">locals_() (mako.runtime.Context method)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="runtime.html#mako.runtime.Context.lookup">lookup (mako.runtime.Context attribute)</a>
+</dt>
+
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+
+<dt>
+        <a href="runtime.html#mako.runtime.LoopContext">LoopContext (class in mako.runtime)</a>
+</dt>
+
+
+  
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="M">M</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="usage.html#RichTraceback.message">message (RichTraceback attribute)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="namespaces.html#mako.runtime.Namespace.module">module (mako.runtime.Namespace attribute)</a>
+</dt>
+
+    <dd><dl>
+      <dt><a href="namespaces.html#mako.runtime.TemplateNamespace.module">(mako.runtime.TemplateNamespace attribute)</a>
+      </dt>
+    </dl></dd>
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+
+<dt>
+        <a href="namespaces.html#mako.runtime.ModuleNamespace">ModuleNamespace (class in mako.runtime)</a>
+</dt>
+
+
+  
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="N">N</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="namespaces.html#mako.runtime.Namespace">Namespace (class in mako.runtime)</a>
+</dt>
+
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="P">P</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="caching.html#mako.cache.CacheImpl.pass_context">pass_context (mako.cache.CacheImpl attribute)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="runtime.html#mako.runtime.Context.pop_caller">pop_caller() (mako.runtime.Context method)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="runtime.html#mako.runtime.Context.push_caller">push_caller() (mako.runtime.Context method)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="caching.html#mako.cache.Cache.put">put() (mako.cache.Cache method)</a>
+</dt>
+
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+
+<dt>
+        <a href="usage.html#mako.lookup.TemplateLookup.put_string">put_string() (mako.lookup.TemplateLookup method)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="usage.html#mako.lookup.TemplateLookup.put_template">put_template() (mako.lookup.TemplateLookup method)</a>
+</dt>
+
+
+  
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="R">R</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="usage.html#RichTraceback.records">records (RichTraceback attribute)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="caching.html#mako.cache.register_plugin">register_plugin() (in module mako.cache)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="usage.html#mako.template.Template.render">render() (mako.template.Template method)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="usage.html#mako.template.Template.render_context">render_context() (mako.template.Template method)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="usage.html#mako.template.Template.render_unicode">render_unicode() (mako.template.Template method)</a>
+</dt>
+
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+
+<dt>
+        <a href="usage.html#RichTraceback.reverse_records">reverse_records (RichTraceback attribute)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="usage.html#RichTraceback.reverse_traceback">reverse_traceback (RichTraceback attribute)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="usage.html#mako.exceptions.RichTraceback">RichTraceback (class in mako.exceptions)</a>
+</dt>
+
+
+  
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="S">S</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="caching.html#mako.cache.Cache.set">set() (mako.cache.Cache method)</a>
+</dt>
+
+    <dd><dl>
+      <dt><a href="caching.html#mako.cache.CacheImpl.set">(mako.cache.CacheImpl method)</a>
+      </dt>
+    </dl></dd>
+
+  
+
+
+<dt>
+        <a href="usage.html#mako.template.Template.source">source (mako.template.Template attribute)</a>
+</dt>
+
+    <dd><dl>
+      <dt><a href="usage.html#RichTraceback.source">(RichTraceback attribute)</a>
+      </dt>
+    </dl></dd>
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+
+<dt>
+        <a href="caching.html#mako.cache.Cache.starttime">starttime (mako.cache.Cache attribute)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="namespaces.html#mako.runtime.supports_caller">supports_caller() (in module mako.runtime)</a>
+</dt>
+
+
+  
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="T">T</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="usage.html#mako.template.Template">Template (class in mako.template)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="namespaces.html#mako.runtime.Namespace.template">template (mako.runtime.Namespace attribute)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="usage.html#mako.lookup.TemplateCollection">TemplateCollection (class in mako.lookup)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="usage.html#mako.lookup.TemplateLookup">TemplateLookup (class in mako.lookup)</a>
+</dt>
+
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+
+<dt>
+        <a href="namespaces.html#mako.runtime.TemplateNamespace">TemplateNamespace (class in mako.runtime)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="usage.html#mako.exceptions.text_error_template">text_error_template() (in module mako.exceptions)</a>
+</dt>
+
+
+  
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="U">U</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="runtime.html#mako.runtime.Undefined">Undefined (class in mako.runtime)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="namespaces.html#mako.runtime.Namespace.uri">uri (mako.runtime.Namespace attribute)</a>
+</dt>
+
+    <dd><dl>
+      <dt><a href="namespaces.html#mako.runtime.TemplateNamespace.uri">(mako.runtime.TemplateNamespace attribute)</a>
+      </dt>
+    </dl></dd>
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+<dt></dt></dl>
+</td></tr></table>
+<h2 id="W">W</h2>
+<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
+<dl>
+    
+
+<dt>
+        <a href="runtime.html#mako.runtime.Context.write">write() (mako.runtime.Context method)</a>
+</dt>
+
+
+  
+
+
+<dt>
+        <a href="runtime.html#mako.runtime.Context.writer">writer() (mako.runtime.Context method)</a>
+</dt>
+
+
+  
+     
+        </dl></td><td width="33%" valign="top"><dl>
+
+<dt></dt></dl>
+</td></tr></table>
+
+
+
+    </div>
+
+</div>
+
+<div id="docs-bottom-navigation" class="docs-navigation-links">
+
+    <div id="docs-copyright">
+        © Copyright the Mako authors and contributors.
+        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
+        with Mako templates.
+    </div>
+</div>
+
+</div>
+
+<div class="clearfix">
+
+<hr/>
+
+<div class="copyright">Website content copyright © by Michael Bayer.
+    All rights reserved.  Mako and its documentation are licensed
+    under the MIT license.  mike(&)zzzcomputing.com</div>
+
+</div>
+</div>
+</body>
+</html>
diff --git a/lib/Mako-0.7.3/doc/index.html b/lib/Mako-0.7.3/doc/index.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/index.html
@@ -0,0 +1,230 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<head>
+<title>
+    Mako 0.7.3 Documentation
+</title>
+
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
+
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+          URL_ROOT:    '#',
+          VERSION:     '0.7.3',
+          COLLAPSE_MODINDEX: false,
+          FILE_SUFFIX: '.html'
+      };
+    </script>
+        <script type="text/javascript" src="_static/jquery.js"></script>
+        <script type="text/javascript" src="_static/underscore.js"></script>
+        <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="top" title="Mako 0.7.3 Documentation" href="#" />
+        <link rel="next" title="Usage" href="usage.html" />
+
+<link rel="stylesheet" href="_static/site.css"></link>
+
+
+</head>
+<body>
+    <div id="wrap">
+    <div class="rightbar">
+
+
+    <div class="slogan">
+    Hyperfast and lightweight templating for the Python platform.
+    </div>
+
+
+    </div>
+
+    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
+
+    <hr/>
+
+    
+
+
+
+
+
+
+
+
+
+<div id="docs-container">
+
+
+
+<div id="docs-header">
+    <h1>Mako 0.7.3 Documentation</h1>
+
+    <div id="docs-search">
+    Search:
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </div>
+
+    <div id="docs-version-header">
+        Release: <span class="version-num">0.7.3</span>
+
+    </div>
+
+</div>
+
+<div id="docs-top-navigation">
+    <div id="docs-top-page-control" class="docs-navigation-links">
+        <ul>
+            <li>Next:
+            <a href="usage.html" title="next chapter">Usage</a>
+            </li>
+
+        <li>
+            <a href="#">Table of Contents</a> |
+            <a href="genindex.html">Index</a>
+            | <a href="_sources/index.txt">view source
+        </li>
+        </ul>
+    </div>
+
+    <div id="docs-navigation-banner">
+        <a href="#">Mako 0.7.3 Documentation</a>
+
+        <h2>
+            
+                Table of Contents
+            
+        </h2>
+    </div>
+
+</div>
+
+<div id="docs-body-container">
+
+
+    <div id="docs-body" class="" >
+        
+<div class="section" id="table-of-contents">
+<h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
+<div class="toctree-wrapper compound">
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="usage.html#basic-usage">Basic Usage</a></li>
+<li class="toctree-l2"><a class="reference internal" href="usage.html#using-file-based-templates">Using File-Based Templates</a></li>
+<li class="toctree-l2"><a class="reference internal" href="usage.html#using-templatelookup">Using <tt class="docutils literal"><span class="pre">TemplateLookup</span></tt></a></li>
+<li class="toctree-l2"><a class="reference internal" href="usage.html#using-unicode-and-encoding">Using Unicode and Encoding</a></li>
+<li class="toctree-l2"><a class="reference internal" href="usage.html#handling-exceptions">Handling Exceptions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="usage.html#common-framework-integrations">Common Framework Integrations</a></li>
+<li class="toctree-l2"><a class="reference internal" href="usage.html#api-reference">API Reference</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="syntax.html">Syntax</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="syntax.html#expression-substitution">Expression Substitution</a></li>
+<li class="toctree-l2"><a class="reference internal" href="syntax.html#expression-escaping">Expression Escaping</a></li>
+<li class="toctree-l2"><a class="reference internal" href="syntax.html#control-structures">Control Structures</a></li>
+<li class="toctree-l2"><a class="reference internal" href="syntax.html#comments">Comments</a></li>
+<li class="toctree-l2"><a class="reference internal" href="syntax.html#newline-filters">Newline Filters</a></li>
+<li class="toctree-l2"><a class="reference internal" href="syntax.html#python-blocks">Python Blocks</a></li>
+<li class="toctree-l2"><a class="reference internal" href="syntax.html#module-level-blocks">Module-level Blocks</a></li>
+<li class="toctree-l2"><a class="reference internal" href="syntax.html#tags">Tags</a></li>
+<li class="toctree-l2"><a class="reference internal" href="syntax.html#returning-early-from-a-template">Returning Early from a Template</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="defs.html">Defs and Blocks</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="defs.html#using-defs">Using Defs</a></li>
+<li class="toctree-l2"><a class="reference internal" href="defs.html#using-blocks">Using Blocks</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="runtime.html">The Mako Runtime Environment</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="runtime.html#context">Context</a></li>
+<li class="toctree-l2"><a class="reference internal" href="runtime.html#the-loop-context">The Loop Context</a></li>
+<li class="toctree-l2"><a class="reference internal" href="runtime.html#all-the-built-in-names">All the Built-in Names</a></li>
+<li class="toctree-l2"><a class="reference internal" href="runtime.html#api-reference">API Reference</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="namespaces.html">Namespaces</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="namespaces.html#ways-to-call-namespaces">Ways to Call Namespaces</a></li>
+<li class="toctree-l2"><a class="reference internal" href="namespaces.html#namespaces-from-regular-python-modules">Namespaces from Regular Python Modules</a></li>
+<li class="toctree-l2"><a class="reference internal" href="namespaces.html#declaring-defs-in-namespaces">Declaring Defs in Namespaces</a></li>
+<li class="toctree-l2"><a class="reference internal" href="namespaces.html#the-body-method">The <tt class="docutils literal"><span class="pre">body()</span></tt> Method</a></li>
+<li class="toctree-l2"><a class="reference internal" href="namespaces.html#built-in-namespaces">Built-in Namespaces</a></li>
+<li class="toctree-l2"><a class="reference internal" href="namespaces.html#inheritable-namespaces">Inheritable Namespaces</a></li>
+<li class="toctree-l2"><a class="reference internal" href="namespaces.html#api-reference">API Reference</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="inheritance.html">Inheritance</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="inheritance.html#nesting-blocks">Nesting Blocks</a></li>
+<li class="toctree-l2"><a class="reference internal" href="inheritance.html#rendering-a-named-block-multiple-times">Rendering a Named Block Multiple Times</a></li>
+<li class="toctree-l2"><a class="reference internal" href="inheritance.html#but-what-about-defs">But what about Defs?</a></li>
+<li class="toctree-l2"><a class="reference internal" href="inheritance.html#using-the-next-namespace-to-produce-content-wrapping">Using the <tt class="docutils literal"><span class="pre">next</span></tt> Namespace to Produce Content Wrapping</a></li>
+<li class="toctree-l2"><a class="reference internal" href="inheritance.html#using-the-parent-namespace-to-augment-defs">Using the <tt class="docutils literal"><span class="pre">parent</span></tt> Namespace to Augment Defs</a></li>
+<li class="toctree-l2"><a class="reference internal" href="inheritance.html#inheritable-attributes">Inheritable Attributes</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="filtering.html">Filtering and Buffering</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="filtering.html#expression-filtering">Expression Filtering</a></li>
+<li class="toctree-l2"><a class="reference internal" href="filtering.html#filtering-defs-and-blocks">Filtering Defs and Blocks</a></li>
+<li class="toctree-l2"><a class="reference internal" href="filtering.html#buffering">Buffering</a></li>
+<li class="toctree-l2"><a class="reference internal" href="filtering.html#decorating">Decorating</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="unicode.html">The Unicode Chapter</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="unicode.html#specifying-the-encoding-of-a-template-file">Specifying the Encoding of a Template File</a></li>
+<li class="toctree-l2"><a class="reference internal" href="unicode.html#handling-expressions">Handling Expressions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="unicode.html#defining-output-encoding">Defining Output Encoding</a></li>
+<li class="toctree-l2"><a class="reference internal" href="unicode.html#saying-to-heck-with-it-disabling-the-usage-of-unicode-entirely">Saying to Heck with It: Disabling the Usage of Unicode Entirely</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="caching.html">Caching</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="caching.html#cache-arguments">Cache Arguments</a></li>
+<li class="toctree-l2"><a class="reference internal" href="caching.html#programmatic-cache-access">Programmatic Cache Access</a></li>
+<li class="toctree-l2"><a class="reference internal" href="caching.html#cache-plugins">Cache Plugins</a></li>
+<li class="toctree-l2"><a class="reference internal" href="caching.html#api-reference">API Reference</a></li>
+</ul>
+</li>
+</ul>
+</div>
+<div class="section" id="indices-and-tables">
+<h2>Indices and Tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h2>
+<ul class="simple">
+<li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
+<li><a class="reference internal" href="search.html"><em>Search Page</em></a></li>
+</ul>
+</div>
+</div>
+
+    </div>
+
+</div>
+
+<div id="docs-bottom-navigation" class="docs-navigation-links">
+        Next:
+        <a href="usage.html" title="next chapter">Usage</a>
+
+    <div id="docs-copyright">
+        © Copyright the Mako authors and contributors.
+        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
+        with Mako templates.
+    </div>
+</div>
+
+</div>
+
+<div class="clearfix">
+
+<hr/>
+
+<div class="copyright">Website content copyright © by Michael Bayer.
+    All rights reserved.  Mako and its documentation are licensed
+    under the MIT license.  mike(&)zzzcomputing.com</div>
+
+</div>
+</div>
+</body>
+</html>
diff --git a/lib/Mako-0.7.3/doc/inheritance.html b/lib/Mako-0.7.3/doc/inheritance.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/inheritance.html
@@ -0,0 +1,673 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<head>
+<title>
+    
+                Inheritance
+             — 
+    Mako 0.7.3 Documentation
+</title>
+
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
+
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+          URL_ROOT:    '#',
+          VERSION:     '0.7.3',
+          COLLAPSE_MODINDEX: false,
+          FILE_SUFFIX: '.html'
+      };
+    </script>
+        <script type="text/javascript" src="_static/jquery.js"></script>
+        <script type="text/javascript" src="_static/underscore.js"></script>
+        <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="top" title="Mako 0.7.3 Documentation" href="index.html" />
+        <link rel="next" title="Filtering and Buffering" href="filtering.html" />
+        <link rel="prev" title="Namespaces" href="namespaces.html" />
+
+<link rel="stylesheet" href="_static/site.css"></link>
+
+
+</head>
+<body>
+    <div id="wrap">
+    <div class="rightbar">
+
+
+    <div class="slogan">
+    Hyperfast and lightweight templating for the Python platform.
+    </div>
+
+
+    </div>
+
+    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
+
+    <hr/>
+
+    
+
+
+
+
+
+
+
+
+
+<div id="docs-container">
+
+
+
+<div id="docs-header">
+    <h1>Mako 0.7.3 Documentation</h1>
+
+    <div id="docs-search">
+    Search:
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </div>
+
+    <div id="docs-version-header">
+        Release: <span class="version-num">0.7.3</span>
+
+    </div>
+
+</div>
+
+<div id="docs-top-navigation">
+    <div id="docs-top-page-control" class="docs-navigation-links">
+        <ul>
+            <li>Prev:
+            <a href="namespaces.html" title="previous chapter">Namespaces</a>
+            </li>
+            <li>Next:
+            <a href="filtering.html" title="next chapter">Filtering and Buffering</a>
+            </li>
+
+        <li>
+            <a href="index.html">Table of Contents</a> |
+            <a href="genindex.html">Index</a>
+            | <a href="_sources/inheritance.txt">view source
+        </li>
+        </ul>
+    </div>
+
+    <div id="docs-navigation-banner">
+        <a href="index.html">Mako 0.7.3 Documentation</a>
+        » 
+                Inheritance
+             
+
+        <h2>
+            
+                Inheritance
+            
+        </h2>
+    </div>
+
+</div>
+
+<div id="docs-body-container">
+
+    <div id="docs-sidebar">
+    <h3><a href="index.html">Table of Contents</a></h3>
+    <ul>
+<li><a class="reference internal" href="#">Inheritance</a><ul>
+<li><a class="reference internal" href="#nesting-blocks">Nesting Blocks</a></li>
+<li><a class="reference internal" href="#rendering-a-named-block-multiple-times">Rendering a Named Block Multiple Times</a></li>
+<li><a class="reference internal" href="#but-what-about-defs">But what about Defs?</a></li>
+<li><a class="reference internal" href="#using-the-next-namespace-to-produce-content-wrapping">Using the <tt class="docutils literal"><span class="pre">next</span></tt> Namespace to Produce Content Wrapping</a></li>
+<li><a class="reference internal" href="#using-the-parent-namespace-to-augment-defs">Using the <tt class="docutils literal"><span class="pre">parent</span></tt> Namespace to Augment Defs</a></li>
+<li><a class="reference internal" href="#inheritable-attributes">Inheritable Attributes</a></li>
+</ul>
+</li>
+</ul>
+
+
+    <h4>Previous Topic</h4>
+    <p>
+    <a href="namespaces.html" title="previous chapter">Namespaces</a>
+    </p>
+    <h4>Next Topic</h4>
+    <p>
+    <a href="filtering.html" title="next chapter">Filtering and Buffering</a>
+    </p>
+
+    <h4>Quick Search</h4>
+    <p>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </p>
+
+    </div>
+
+    <div id="docs-body" class="withsidebar" >
+        
+<div class="section" id="inheritance">
+<span id="inheritance-toplevel"></span><h1>Inheritance<a class="headerlink" href="#inheritance" title="Permalink to this headline">¶</a></h1>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">Most of the inheritance examples here take advantage of a feature that’s
+new in Mako as of version 0.4.1 called the “block”.  This tag is very similar to
+the “def” tag but is more streamlined for usage with inheritance.  Note that
+all of the examples here which use blocks can also use defs instead.  Contrasting
+usages will be illustrated.</p>
+</div>
+<p>Using template inheritance, two or more templates can organize
+themselves into an <strong>inheritance chain</strong>, where content and
+functions from all involved templates can be intermixed. The
+general paradigm of template inheritance is this: if a template
+<tt class="docutils literal"><span class="pre">A</span></tt> inherits from template <tt class="docutils literal"><span class="pre">B</span></tt>, then template <tt class="docutils literal"><span class="pre">A</span></tt> agrees
+to send the executional control to template <tt class="docutils literal"><span class="pre">B</span></tt> at runtime
+(<tt class="docutils literal"><span class="pre">A</span></tt> is called the <strong>inheriting</strong> template). Template <tt class="docutils literal"><span class="pre">B</span></tt>,
+the <strong>inherited</strong> template, then makes decisions as to what
+resources from <tt class="docutils literal"><span class="pre">A</span></tt> shall be executed.</p>
+<p>In practice, it looks like this. Here’s a hypothetical inheriting
+template, <tt class="docutils literal"><span class="pre">index.html</span></tt>:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## index.html</span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"base.html"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    this is some header content</span>
+<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+
+<span class="x">this is the body content.</span>
+</pre></div>
+</div>
+<p>And <tt class="docutils literal"><span class="pre">base.html</span></tt>, the inherited template:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## base.html</span><span class="x"></span>
+<span class="x"><html></span>
+<span class="x">    <body></span>
+<span class="x">        <div class="header"></span>
+<span class="x">            </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">/></span><span class="x"></span>
+<span class="x">        </div></span>
+
+<span class="x">        </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+
+<span class="x">        <div class="footer"></span>
+<span class="x">            </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"footer"</span><span class="cp">></span><span class="x"></span>
+<span class="x">                this is the footer</span>
+<span class="x">            </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="x">        </div></span>
+<span class="x">    </body></span>
+<span class="x"></html></span>
+</pre></div>
+</div>
+<p>Here is a breakdown of the execution:</p>
+<ol class="arabic">
+<li><p class="first">When <tt class="docutils literal"><span class="pre">index.html</span></tt> is rendered, control immediately passes to
+<tt class="docutils literal"><span class="pre">base.html</span></tt>.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">base.html</span></tt> then renders the top part of an HTML document,
+then invokes the <tt class="docutils literal"><span class="pre"><%block</span> <span class="pre">name="header"></span></tt> block.  It invokes the
+underlying <tt class="docutils literal"><span class="pre">header()</span></tt> function off of a built-in namespace
+called <tt class="docutils literal"><span class="pre">self</span></tt> (this namespace was first introduced in the
+<a class="reference internal" href="namespaces.html"><em>Namespaces chapter</em></a> in <a class="reference internal" href="namespaces.html#namespace-self"><em>self</em></a>). Since
+<tt class="docutils literal"><span class="pre">index.html</span></tt> is the topmost template and also defines a block
+called <tt class="docutils literal"><span class="pre">header</span></tt>, it’s this <tt class="docutils literal"><span class="pre">header</span></tt> block that ultimately gets
+executed – instead of the one that’s present in <tt class="docutils literal"><span class="pre">base.html</span></tt>.</p>
+</li>
+<li><p class="first">Control comes back to <tt class="docutils literal"><span class="pre">base.html</span></tt>. Some more HTML is
+rendered.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">base.html</span></tt> executes <tt class="docutils literal"><span class="pre">self.body()</span></tt>. The <tt class="docutils literal"><span class="pre">body()</span></tt>
+function on all template-based namespaces refers to the main
+body of the template, therefore the main body of
+<tt class="docutils literal"><span class="pre">index.html</span></tt> is rendered.</p>
+</li>
+<li><p class="first">When <tt class="docutils literal"><span class="pre"><%block</span> <span class="pre">name="header"></span></tt> is encountered in <tt class="docutils literal"><span class="pre">index.html</span></tt>
+during the <tt class="docutils literal"><span class="pre">self.body()</span></tt> call, a conditional is checked – does the
+current inherited template, i.e. <tt class="docutils literal"><span class="pre">base.html</span></tt>, also define this block? If yes,
+the <tt class="docutils literal"><span class="pre"><%block></span></tt> is <strong>not</strong> executed here – the inheritance
+mechanism knows that the parent template is responsible for rendering
+this block (and in fact it already has).  In other words a block
+only renders in its <em>basemost scope</em>.</p>
+</li>
+<li><p class="first">Control comes back to <tt class="docutils literal"><span class="pre">base.html</span></tt>. More HTML is rendered,
+then the <tt class="docutils literal"><span class="pre"><%block</span> <span class="pre">name="footer"></span></tt> expression is invoked.</p>
+</li>
+<li><p class="first">The <tt class="docutils literal"><span class="pre">footer</span></tt> block is only defined in <tt class="docutils literal"><span class="pre">base.html</span></tt>, so being
+the topmost definition of <tt class="docutils literal"><span class="pre">footer</span></tt>, it’s the one that
+executes. If <tt class="docutils literal"><span class="pre">index.html</span></tt> also specified <tt class="docutils literal"><span class="pre">footer</span></tt>, then
+its version would <strong>override</strong> that of the base.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">base.html</span></tt> finishes up rendering its HTML and the template
+is complete, producing:</p>
+<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span>
+    <span class="nt"><body></span>
+        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"header"</span><span class="nt">></span>
+            this is some header content
+        <span class="nt"></div></span>
+
+        this is the body content.
+
+        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"footer"</span><span class="nt">></span>
+            this is the footer
+        <span class="nt"></div></span>
+    <span class="nt"></body></span>
+<span class="nt"></html></span>
+</pre></div>
+</div>
+</li>
+</ol>
+<p>...and that is template inheritance in a nutshell. The main idea
+is that the methods that you call upon <tt class="docutils literal"><span class="pre">self</span></tt> always
+correspond to the topmost definition of that method. Very much
+the way <tt class="docutils literal"><span class="pre">self</span></tt> works in a Python class, even though Mako is
+not actually using Python class inheritance to implement this
+functionality. (Mako doesn’t take the “inheritance” metaphor too
+seriously; while useful to setup some commonly recognized
+semantics, a textual template is not very much like an
+object-oriented class construct in practice).</p>
+<div class="section" id="nesting-blocks">
+<h2>Nesting Blocks<a class="headerlink" href="#nesting-blocks" title="Permalink to this headline">¶</a></h2>
+<p>The named blocks defined in an inherited template can also be nested within
+other blocks.  The name given to each block is globally accessible via any inheriting
+template.  We can add a new block <tt class="docutils literal"><span class="pre">title</span></tt> to our <tt class="docutils literal"><span class="pre">header</span></tt> block:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## base.html</span><span class="x"></span>
+<span class="x"><html></span>
+<span class="x">    <body></span>
+<span class="x">        <div class="header"></span>
+<span class="x">            </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
+<span class="x">                <h2></span>
+<span class="x">                    </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"title"</span><span class="cp">/></span><span class="x"></span>
+<span class="x">                </h2></span>
+<span class="x">            </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="x">        </div></span>
+
+<span class="x">        </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+
+<span class="x">        <div class="footer"></span>
+<span class="x">            </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"footer"</span><span class="cp">></span><span class="x"></span>
+<span class="x">                this is the footer</span>
+<span class="x">            </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="x">        </div></span>
+<span class="x">    </body></span>
+<span class="x"></html></span>
+</pre></div>
+</div>
+<p>The inheriting template can name either or both of <tt class="docutils literal"><span class="pre">header</span></tt> and <tt class="docutils literal"><span class="pre">title</span></tt>, separately
+or nested themselves:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## index.html</span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"base.html"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    this is some header content</span>
+<span class="x">    </span><span class="cp">${</span><span class="n">parent</span><span class="o">.</span><span class="n">header</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"title"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    this is the title</span>
+<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+
+<span class="x">this is the body content.</span>
+</pre></div>
+</div>
+<p>Note when we overrode <tt class="docutils literal"><span class="pre">header</span></tt>, we added an extra call <tt class="docutils literal"><span class="pre">${parent.header()}</span></tt> in order to invoke
+the parent’s <tt class="docutils literal"><span class="pre">header</span></tt> block in addition to our own.  That’s described in more detail below,
+in <a class="reference internal" href="#parent-namespace"><em>Using the parent Namespace to Augment Defs</em></a>.</p>
+</div>
+<div class="section" id="rendering-a-named-block-multiple-times">
+<h2>Rendering a Named Block Multiple Times<a class="headerlink" href="#rendering-a-named-block-multiple-times" title="Permalink to this headline">¶</a></h2>
+<p>Recall from the section <a class="reference internal" href="defs.html#blocks"><em>Using Blocks</em></a> that a named block is just like a <tt class="docutils literal"><span class="pre"><%def></span></tt>,
+with some different usage rules.  We can call one of our named sections distinctly, for example
+a section that is used more than once, such as the title of a page:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><html></span>
+<span class="x">    <head></span>
+<span class="x">        <title></span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">title</span><span class="p">()</span><span class="cp">}</span><span class="x"></title></span>
+<span class="x">    </head></span>
+<span class="x">    <body></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
+<span class="x">        <h2></span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"title"</span><span class="cp">/></span><span class="x"></h2></span>
+<span class="x">    </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="x">    </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x">    </body></span>
+<span class="x"></html></span>
+</pre></div>
+</div>
+<p>Where above an inheriting template can define <tt class="docutils literal"><span class="pre"><%block</span> <span class="pre">name="title"></span></tt> just once, and it will be
+used in the base template both in the <tt class="docutils literal"><span class="pre"><title></span></tt> section as well as the <tt class="docutils literal"><span class="pre"><h2></span></tt>.</p>
+</div>
+<div class="section" id="but-what-about-defs">
+<h2>But what about Defs?<a class="headerlink" href="#but-what-about-defs" title="Permalink to this headline">¶</a></h2>
+<p>The previous example used the <tt class="docutils literal"><span class="pre"><%block></span></tt> tag to produce areas of content
+to be overridden.  Before Mako 0.4.1, there wasn’t any such tag – instead
+there was only the <tt class="docutils literal"><span class="pre"><%def></span></tt> tag.   As it turns out, named blocks and defs are
+largely interchangeable.  The def simply doesn’t call itself automatically,
+and has more open-ended naming and scoping rules that are more flexible and similar
+to Python itself, but less suited towards layout.  The first example from
+this chapter using defs would look like:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## index.html</span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"base.html"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"header()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    this is some header content</span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+
+<span class="x">this is the body content.</span>
+</pre></div>
+</div>
+<p>And <tt class="docutils literal"><span class="pre">base.html</span></tt>, the inherited template:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## base.html</span><span class="x"></span>
+<span class="x"><html></span>
+<span class="x">    <body></span>
+<span class="x">        <div class="header"></span>
+<span class="x">            </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">header</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x">        </div></span>
+
+<span class="x">        </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+
+<span class="x">        <div class="footer"></span>
+<span class="x">            </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">footer</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x">        </div></span>
+<span class="x">    </body></span>
+<span class="x"></html></span>
+
+<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"header()"</span><span class="cp">/></span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"footer()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    this is the footer</span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>Above, we illustrate that defs differ from blocks in that their definition
+and invocation are defined in two separate places, instead of at once. You can <em>almost</em> do exactly what a
+block does if you put the two together:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><div class="header"></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"header()"</span><span class="cp">></%</span><span class="nb">def</span><span class="cp">>${</span><span class="bp">self</span><span class="o">.</span><span class="n">header</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x"></div></span>
+</pre></div>
+</div>
+<p>The <tt class="docutils literal"><span class="pre"><%block></span></tt> is obviously more streamlined than the <tt class="docutils literal"><span class="pre"><%def></span></tt> for this kind
+of usage.  In addition,
+the above “inline” approach with <tt class="docutils literal"><span class="pre"><%def></span></tt> does not work with nesting:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><head></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"header()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">        <title></span>
+<span class="x">        ## this won't work !</span>
+<span class="x">        </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"title()"</span><span class="cp">></span><span class="x">default title</span><span class="cp"></%</span><span class="nb">def</span><span class="cp">>${</span><span class="bp">self</span><span class="o">.</span><span class="n">title</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x">        </title></span>
+<span class="x">    </span><span class="cp"></%</span><span class="nb">def</span><span class="cp">>${</span><span class="bp">self</span><span class="o">.</span><span class="n">header</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x"></head></span>
+</pre></div>
+</div>
+<p>Where above, the <tt class="docutils literal"><span class="pre">title()</span></tt> def, because it’s a def within a def, is not part of the
+template’s exported namespace and will not be part of <tt class="docutils literal"><span class="pre">self</span></tt>.  If the inherited template
+did define its own <tt class="docutils literal"><span class="pre">title</span></tt> def at the top level, it would be called, but the “default title”
+above is not present at all on <tt class="docutils literal"><span class="pre">self</span></tt> no matter what.  For this to work as expected
+you’d instead need to say:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><head></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"header()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">        <title></span>
+<span class="x">        </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">title</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x">        </title></span>
+<span class="x">    </span><span class="cp"></%</span><span class="nb">def</span><span class="cp">>${</span><span class="bp">self</span><span class="o">.</span><span class="n">header</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+
+<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"title()"</span><span class="cp">/></span><span class="x"></span>
+<span class="x"></head></span>
+</pre></div>
+</div>
+<p>That is, <tt class="docutils literal"><span class="pre">title</span></tt> is defined outside of any other defs so that it is in the <tt class="docutils literal"><span class="pre">self</span></tt> namespace.
+It works, but the definition needs to be potentially far away from the point of render.</p>
+<p>A named block is always placed in the <tt class="docutils literal"><span class="pre">self</span></tt> namespace, regardless of nesting,
+so this restriction is lifted:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## base.html</span><span class="x"></span>
+<span class="x"><head></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
+<span class="x">        <title></span>
+<span class="x">        </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"title"</span><span class="cp">/></span><span class="x"></span>
+<span class="x">        </title></span>
+<span class="x">    </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="x"></head></span>
+</pre></div>
+</div>
+<p>The above template defines <tt class="docutils literal"><span class="pre">title</span></tt> inside of <tt class="docutils literal"><span class="pre">header</span></tt>, and an inheriting template can define
+one or both in <strong>any</strong> configuration, nested inside each other or not, in order for them to be used:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## index.html</span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"base.html"</span><span class="cp">/></span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"title"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    the title</span>
+<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    the header</span>
+<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>So while the <tt class="docutils literal"><span class="pre"><%block></span></tt> tag lifts the restriction of nested blocks not being available externally,
+in order to achieve this it <em>adds</em> the restriction that all block names in a single template need
+to be globally unique within the template, and additionally that a <tt class="docutils literal"><span class="pre"><%block></span></tt> can’t be defined
+inside of a <tt class="docutils literal"><span class="pre"><%def></span></tt>. It’s a more restricted tag suited towards a more specific use case than <tt class="docutils literal"><span class="pre"><%def></span></tt>.</p>
+</div>
+<div class="section" id="using-the-next-namespace-to-produce-content-wrapping">
+<h2>Using the <tt class="docutils literal"><span class="pre">next</span></tt> Namespace to Produce Content Wrapping<a class="headerlink" href="#using-the-next-namespace-to-produce-content-wrapping" title="Permalink to this headline">¶</a></h2>
+<p>Sometimes you have an inheritance chain that spans more than two
+templates. Or maybe you don’t, but you’d like to build your
+system such that extra inherited templates can be inserted in
+the middle of a chain where they would be smoothly integrated.
+If each template wants to define its layout just within its main
+body, you can’t just call <tt class="docutils literal"><span class="pre">self.body()</span></tt> to get at the
+inheriting template’s body, since that is only the topmost body.
+To get at the body of the <em>next</em> template, you call upon the
+namespace <tt class="docutils literal"><span class="pre">next</span></tt>, which is the namespace of the template
+<strong>immediately following</strong> the current template.</p>
+<p>Lets change the line in <tt class="docutils literal"><span class="pre">base.html</span></tt> which calls upon
+<tt class="docutils literal"><span class="pre">self.body()</span></tt> to instead call upon <tt class="docutils literal"><span class="pre">next.body()</span></tt>:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## base.html</span><span class="x"></span>
+<span class="x"><html></span>
+<span class="x">    <body></span>
+<span class="x">        <div class="header"></span>
+<span class="x">            </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">/></span><span class="x"></span>
+<span class="x">        </div></span>
+
+<span class="x">        </span><span class="cp">${</span><span class="nb">next</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+
+<span class="x">        <div class="footer"></span>
+<span class="x">            </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"footer"</span><span class="cp">></span><span class="x"></span>
+<span class="x">                this is the footer</span>
+<span class="x">            </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="x">        </div></span>
+<span class="x">    </body></span>
+<span class="x"></html></span>
+</pre></div>
+</div>
+<p>Lets also add an intermediate template called <tt class="docutils literal"><span class="pre">layout.html</span></tt>,
+which inherits from <tt class="docutils literal"><span class="pre">base.html</span></tt>:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## layout.html</span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"base.html"</span><span class="cp">/></span><span class="x"></span>
+<span class="x"><ul></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"toolbar"</span><span class="cp">></span><span class="x"></span>
+<span class="x">        <li>selection 1</li></span>
+<span class="x">        <li>selection 2</li></span>
+<span class="x">        <li>selection 3</li></span>
+<span class="x">    </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="x"></ul></span>
+<span class="x"><div class="mainlayout"></span>
+<span class="x">    </span><span class="cp">${</span><span class="nb">next</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x"></div></span>
+</pre></div>
+</div>
+<p>And finally change <tt class="docutils literal"><span class="pre">index.html</span></tt> to inherit from
+<tt class="docutils literal"><span class="pre">layout.html</span></tt> instead:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## index.html</span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"layout.html"</span><span class="cp">/></span>
+
+<span class="cp">## .. rest of template</span><span class="x"></span>
+</pre></div>
+</div>
+<p>In this setup, each call to <tt class="docutils literal"><span class="pre">next.body()</span></tt> will render the body
+of the next template in the inheritance chain (which can be
+written as <tt class="docutils literal"><span class="pre">base.html</span> <span class="pre">-></span> <span class="pre">layout.html</span> <span class="pre">-></span> <span class="pre">index.html</span></tt>). Control
+is still first passed to the bottommost template <tt class="docutils literal"><span class="pre">base.html</span></tt>,
+and <tt class="docutils literal"><span class="pre">self</span></tt> still references the topmost definition of any
+particular def.</p>
+<p>The output we get would be:</p>
+<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span>
+    <span class="nt"><body></span>
+        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"header"</span><span class="nt">></span>
+            this is some header content
+        <span class="nt"></div></span>
+
+        <span class="nt"><ul></span>
+            <span class="nt"><li></span>selection 1<span class="nt"></li></span>
+            <span class="nt"><li></span>selection 2<span class="nt"></li></span>
+            <span class="nt"><li></span>selection 3<span class="nt"></li></span>
+        <span class="nt"></ul></span>
+
+        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"mainlayout"</span><span class="nt">></span>
+        this is the body content.
+        <span class="nt"></div></span>
+
+        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"footer"</span><span class="nt">></span>
+            this is the footer
+        <span class="nt"></div></span>
+    <span class="nt"></body></span>
+<span class="nt"></html></span>
+</pre></div>
+</div>
+<p>So above, we have the <tt class="docutils literal"><span class="pre"><html></span></tt>, <tt class="docutils literal"><span class="pre"><body></span></tt> and
+<tt class="docutils literal"><span class="pre">header</span></tt>/<tt class="docutils literal"><span class="pre">footer</span></tt> layout of <tt class="docutils literal"><span class="pre">base.html</span></tt>, we have the
+<tt class="docutils literal"><span class="pre"><ul></span></tt> and <tt class="docutils literal"><span class="pre">mainlayout</span></tt> section of <tt class="docutils literal"><span class="pre">layout.html</span></tt>, and the
+main body of <tt class="docutils literal"><span class="pre">index.html</span></tt> as well as its overridden <tt class="docutils literal"><span class="pre">header</span></tt>
+def. The <tt class="docutils literal"><span class="pre">layout.html</span></tt> template is inserted into the middle of
+the chain without <tt class="docutils literal"><span class="pre">base.html</span></tt> having to change anything.
+Without the <tt class="docutils literal"><span class="pre">next</span></tt> namespace, only the main body of
+<tt class="docutils literal"><span class="pre">index.html</span></tt> could be used; there would be no way to call
+<tt class="docutils literal"><span class="pre">layout.html</span></tt>‘s body content.</p>
+</div>
+<div class="section" id="using-the-parent-namespace-to-augment-defs">
+<span id="parent-namespace"></span><h2>Using the <tt class="docutils literal"><span class="pre">parent</span></tt> Namespace to Augment Defs<a class="headerlink" href="#using-the-parent-namespace-to-augment-defs" title="Permalink to this headline">¶</a></h2>
+<p>Lets now look at the other inheritance-specific namespace, the
+opposite of <tt class="docutils literal"><span class="pre">next</span></tt> called <tt class="docutils literal"><span class="pre">parent</span></tt>. <tt class="docutils literal"><span class="pre">parent</span></tt> is the
+namespace of the template <strong>immediately preceding</strong> the current
+template. What’s useful about this namespace is that
+defs or blocks can call upon their overridden versions.
+This is not as hard as it sounds and
+is very much like using the <tt class="docutils literal"><span class="pre">super</span></tt> keyword in Python. Lets
+modify <tt class="docutils literal"><span class="pre">index.html</span></tt> to augment the list of selections provided
+by the <tt class="docutils literal"><span class="pre">toolbar</span></tt> function in <tt class="docutils literal"><span class="pre">layout.html</span></tt>:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## index.html</span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"layout.html"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    this is some header content</span>
+<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"toolbar"</span><span class="cp">></span>
+    <span class="cp">## call the parent's toolbar first</span><span class="x"></span>
+<span class="x">    </span><span class="cp">${</span><span class="n">parent</span><span class="o">.</span><span class="n">toolbar</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x">    <li>selection 4</li></span>
+<span class="x">    <li>selection 5</li></span>
+<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+
+<span class="x">this is the body content.</span>
+</pre></div>
+</div>
+<p>Above, we implemented a <tt class="docutils literal"><span class="pre">toolbar()</span></tt> function, which is meant
+to override the definition of <tt class="docutils literal"><span class="pre">toolbar</span></tt> within the inherited
+template <tt class="docutils literal"><span class="pre">layout.html</span></tt>. However, since we want the content
+from that of <tt class="docutils literal"><span class="pre">layout.html</span></tt> as well, we call it via the
+<tt class="docutils literal"><span class="pre">parent</span></tt> namespace whenever we want it’s content, in this case
+before we add our own selections. So the output for the whole
+thing is now:</p>
+<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span>
+    <span class="nt"><body></span>
+        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"header"</span><span class="nt">></span>
+            this is some header content
+        <span class="nt"></div></span>
+
+        <span class="nt"><ul></span>
+            <span class="nt"><li></span>selection 1<span class="nt"></li></span>
+            <span class="nt"><li></span>selection 2<span class="nt"></li></span>
+            <span class="nt"><li></span>selection 3<span class="nt"></li></span>
+            <span class="nt"><li></span>selection 4<span class="nt"></li></span>
+            <span class="nt"><li></span>selection 5<span class="nt"></li></span>
+        <span class="nt"></ul></span>
+
+        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"mainlayout"</span><span class="nt">></span>
+        this is the body content.
+        <span class="nt"></div></span>
+
+        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"footer"</span><span class="nt">></span>
+            this is the footer
+        <span class="nt"></div></span>
+    <span class="nt"></body></span>
+<span class="nt"></html></span>
+</pre></div>
+</div>
+<p>and you’re now a template inheritance ninja!</p>
+</div>
+<div class="section" id="inheritable-attributes">
+<h2>Inheritable Attributes<a class="headerlink" href="#inheritable-attributes" title="Permalink to this headline">¶</a></h2>
+<p>The <a class="reference internal" href="namespaces.html#mako.runtime.Namespace.attr" title="mako.runtime.Namespace.attr"><tt class="xref py py-attr docutils literal"><span class="pre">attr</span></tt></a> accessor of the <a class="reference internal" href="namespaces.html#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> object
+allows access to module level variables declared in a template. By accessing
+<tt class="docutils literal"><span class="pre">self.attr</span></tt>, you can access regular attributes from the
+inheritance chain as declared in <tt class="docutils literal"><span class="pre"><%!</span> <span class="pre">%></span></tt> sections. Such as:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%!</span>
+    <span class="n">class_</span> <span class="o">=</span> <span class="s">"grey"</span>
+<span class="cp">%></span><span class="x"></span>
+
+<span class="x"><div class="</span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">attr</span><span class="o">.</span><span class="n">class_</span><span class="cp">}</span><span class="x">"></span>
+<span class="x">    </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x"></div></span>
+</pre></div>
+</div>
+<p>If an inheriting template overrides <tt class="docutils literal"><span class="pre">class_</span></tt> to be
+<tt class="docutils literal"><span class="pre">"white"</span></tt>, as in:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%!</span>
+    <span class="n">class_</span> <span class="o">=</span> <span class="s">"white"</span>
+<span class="cp">%></span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"parent.html"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="x">This is the body</span>
+</pre></div>
+</div>
+<p>you’ll get output like:</p>
+<div class="highlight-html"><div class="highlight"><pre><span class="nt"><div</span> <span class="na">class=</span><span class="s">"white"</span><span class="nt">></span>
+    This is the body
+<span class="nt"></div></span>
+</pre></div>
+</div>
+</div>
+</div>
+
+    </div>
+
+</div>
+
+<div id="docs-bottom-navigation" class="docs-navigation-links">
+        Previous:
+        <a href="namespaces.html" title="previous chapter">Namespaces</a>
+        Next:
+        <a href="filtering.html" title="next chapter">Filtering and Buffering</a>
+
+    <div id="docs-copyright">
+        © Copyright the Mako authors and contributors.
+        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
+        with Mako templates.
+    </div>
+</div>
+
+</div>
+
+<div class="clearfix">
+
+<hr/>
+
+<div class="copyright">Website content copyright © by Michael Bayer.
+    All rights reserved.  Mako and its documentation are licensed
+    under the MIT license.  mike(&)zzzcomputing.com</div>
+
+</div>
+</div>
+</body>
+</html>
diff --git a/lib/Mako-0.7.3/doc/namespaces.html b/lib/Mako-0.7.3/doc/namespaces.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/namespaces.html
@@ -0,0 +1,649 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<head>
+<title>
+    
+                Namespaces
+             — 
+    Mako 0.7.3 Documentation
+</title>
+
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
+
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+          URL_ROOT:    '#',
+          VERSION:     '0.7.3',
+          COLLAPSE_MODINDEX: false,
+          FILE_SUFFIX: '.html'
+      };
+    </script>
+        <script type="text/javascript" src="_static/jquery.js"></script>
+        <script type="text/javascript" src="_static/underscore.js"></script>
+        <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="top" title="Mako 0.7.3 Documentation" href="index.html" />
+        <link rel="next" title="Inheritance" href="inheritance.html" />
+        <link rel="prev" title="The Mako Runtime Environment" href="runtime.html" />
+
+<link rel="stylesheet" href="_static/site.css"></link>
+
+
+</head>
+<body>
+    <div id="wrap">
+    <div class="rightbar">
+
+
+    <div class="slogan">
+    Hyperfast and lightweight templating for the Python platform.
+    </div>
+
+
+    </div>
+
+    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
+
+    <hr/>
+
+    
+
+
+
+
+
+
+
+
+
+<div id="docs-container">
+
+
+
+<div id="docs-header">
+    <h1>Mako 0.7.3 Documentation</h1>
+
+    <div id="docs-search">
+    Search:
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </div>
+
+    <div id="docs-version-header">
+        Release: <span class="version-num">0.7.3</span>
+
+    </div>
+
+</div>
+
+<div id="docs-top-navigation">
+    <div id="docs-top-page-control" class="docs-navigation-links">
+        <ul>
+            <li>Prev:
+            <a href="runtime.html" title="previous chapter">The Mako Runtime Environment</a>
+            </li>
+            <li>Next:
+            <a href="inheritance.html" title="next chapter">Inheritance</a>
+            </li>
+
+        <li>
+            <a href="index.html">Table of Contents</a> |
+            <a href="genindex.html">Index</a>
+            | <a href="_sources/namespaces.txt">view source
+        </li>
+        </ul>
+    </div>
+
+    <div id="docs-navigation-banner">
+        <a href="index.html">Mako 0.7.3 Documentation</a>
+        » 
+                Namespaces
+             
+
+        <h2>
+            
+                Namespaces
+            
+        </h2>
+    </div>
+
+</div>
+
+<div id="docs-body-container">
+
+    <div id="docs-sidebar">
+    <h3><a href="index.html">Table of Contents</a></h3>
+    <ul>
+<li><a class="reference internal" href="#">Namespaces</a><ul>
+<li><a class="reference internal" href="#ways-to-call-namespaces">Ways to Call Namespaces</a></li>
+<li><a class="reference internal" href="#namespaces-from-regular-python-modules">Namespaces from Regular Python Modules</a></li>
+<li><a class="reference internal" href="#declaring-defs-in-namespaces">Declaring Defs in Namespaces</a></li>
+<li><a class="reference internal" href="#the-body-method">The <tt class="docutils literal"><span class="pre">body()</span></tt> Method</a></li>
+<li><a class="reference internal" href="#built-in-namespaces">Built-in Namespaces</a><ul>
+<li><a class="reference internal" href="#local"><tt class="docutils literal"><span class="pre">local</span></tt></a></li>
+<li><a class="reference internal" href="#self"><tt class="docutils literal"><span class="pre">self</span></tt></a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#inheritable-namespaces">Inheritable Namespaces</a></li>
+<li><a class="reference internal" href="#api-reference">API Reference</a></li>
+</ul>
+</li>
+</ul>
+
+
+    <h4>Previous Topic</h4>
+    <p>
+    <a href="runtime.html" title="previous chapter">The Mako Runtime Environment</a>
+    </p>
+    <h4>Next Topic</h4>
+    <p>
+    <a href="inheritance.html" title="next chapter">Inheritance</a>
+    </p>
+
+    <h4>Quick Search</h4>
+    <p>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </p>
+
+    </div>
+
+    <div id="docs-body" class="withsidebar" >
+        
+<div class="section" id="namespaces">
+<span id="namespaces-toplevel"></span><h1>Namespaces<a class="headerlink" href="#namespaces" title="Permalink to this headline">¶</a></h1>
+<p>Namespaces are used to organize groups of defs into
+categories, and also to “import” defs from other files.</p>
+<p>If the file <tt class="docutils literal"><span class="pre">components.html</span></tt> defines these two defs:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## components.html</span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"comp1()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    this is comp1</span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"comp2(x)"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    this is comp2, x is </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x"></span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>you can make another file, for example <tt class="docutils literal"><span class="pre">index.html</span></tt>, that
+pulls those two defs into a namespace called <tt class="docutils literal"><span class="pre">comp</span></tt>:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## index.html</span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">namespace</span> <span class="na">name=</span><span class="s">"comp"</span> <span class="na">file=</span><span class="s">"components.html"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="x">Here's comp1:  </span><span class="cp">${</span><span class="n">comp</span><span class="o">.</span><span class="n">comp1</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x">Here's comp2:  </span><span class="cp">${</span><span class="n">comp</span><span class="o">.</span><span class="n">comp2</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>The <tt class="docutils literal"><span class="pre">comp</span></tt> variable above is an instance of
+<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>, a <strong>proxy object</strong> which delivers
+method calls to the underlying template callable using the
+current context.</p>
+<p><tt class="docutils literal"><span class="pre"><%namespace></span></tt> also provides an <tt class="docutils literal"><span class="pre">import</span></tt> attribute which can
+be used to pull the names into the local namespace, removing the
+need to call it via the “<tt class="docutils literal"><span class="pre">.</span></tt>” operator. When <tt class="docutils literal"><span class="pre">import</span></tt> is used, the
+<tt class="docutils literal"><span class="pre">name</span></tt> attribute is optional.</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">namespace</span> <span class="na">file=</span><span class="s">"components.html"</span> <span class="na">import=</span><span class="s">"comp1, comp2"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="x">Heres comp1:  </span><span class="cp">${</span><span class="n">comp1</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x">Heres comp2:  </span><span class="cp">${</span><span class="n">comp2</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p><tt class="docutils literal"><span class="pre">import</span></tt> also supports the “<tt class="docutils literal"><span class="pre">*</span></tt>” operator:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">namespace</span> <span class="na">file=</span><span class="s">"components.html"</span> <span class="na">import=</span><span class="s">"*"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="x">Heres comp1:  </span><span class="cp">${</span><span class="n">comp1</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x">Heres comp2:  </span><span class="cp">${</span><span class="n">comp2</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>The names imported by the <tt class="docutils literal"><span class="pre">import</span></tt> attribute take precedence
+over any names that exist within the current context.</p>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">In current versions of Mako, usage of <tt class="docutils literal"><span class="pre">import='*'</span></tt> is
+known to decrease performance of the template. This will be
+fixed in a future release.</p>
+</div>
+<p>The <tt class="docutils literal"><span class="pre">file</span></tt> argument allows expressions – if looking for
+context variables, the <tt class="docutils literal"><span class="pre">context</span></tt> must be named explicitly:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">namespace</span> <span class="na">name=</span><span class="s">"dyn"</span> <span class="na">file=</span><span class="s">"${context['namespace_name']}"</span><span class="cp">/></span><span class="x"></span>
+</pre></div>
+</div>
+<div class="section" id="ways-to-call-namespaces">
+<h2>Ways to Call Namespaces<a class="headerlink" href="#ways-to-call-namespaces" title="Permalink to this headline">¶</a></h2>
+<p>There are essentially four ways to call a function from a
+namespace.</p>
+<p>The “expression” format, as described previously. Namespaces are
+just Python objects with functions on them, and can be used in
+expressions like any other function:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="n">mynamespace</span><span class="o">.</span><span class="n">somefunction</span><span class="p">(</span><span class="s">'some arg1'</span><span class="p">,</span> <span class="s">'some arg2'</span><span class="p">,</span> <span class="n">arg3</span><span class="o">=</span><span class="s">'some arg3'</span><span class="p">,</span> <span class="n">arg4</span><span class="o">=</span><span class="s">'some arg4'</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>Synonymous with the “expression” format is the “custom tag”
+format, when a “closed” tag is used. This format, introduced in
+Mako 0.2.3, allows the usage of a “custom” Mako tag, with the
+function arguments passed in using named attributes:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">mynamespace:somefunction</span> <span class="na">arg1=</span><span class="s">"some arg1"</span> <span class="na">arg2=</span><span class="s">"some arg2"</span> <span class="na">arg3=</span><span class="s">"some arg3"</span> <span class="na">arg4=</span><span class="s">"some arg4"</span><span class="cp">/></span><span class="x"></span>
+</pre></div>
+</div>
+<p>When using tags, the values of the arguments are taken as
+literal strings by default. To embed Python expressions as
+arguments, use the embedded expression format:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">mynamespace:somefunction</span> <span class="na">arg1=</span><span class="s">"${someobject.format()}"</span> <span class="na">arg2=</span><span class="s">"${somedef(5, 12)}"</span><span class="cp">/></span><span class="x"></span>
+</pre></div>
+</div>
+<p>The “custom tag” format is intended mainly for namespace
+functions which recognize body content, which in Mako is known
+as a “def with embedded content”:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">mynamespace:somefunction</span> <span class="na">arg1=</span><span class="s">"some argument"</span> <span class="na">args=</span><span class="s">"x, y"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    Some record: </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x">, </span><span class="cp">${</span><span class="n">y</span><span class="cp">}</span><span class="x"></span>
+<span class="cp"></%</span><span class="nb">mynamespace:somefunction</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>The “classic” way to call defs with embedded content is the <tt class="docutils literal"><span class="pre"><%call></span></tt> tag:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">call</span> <span class="na">expr=</span><span class="s">"mynamespace.somefunction(arg1='some argument')"</span> <span class="na">args=</span><span class="s">"x, y"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    Some record: </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x">, </span><span class="cp">${</span><span class="n">y</span><span class="cp">}</span><span class="x"></span>
+<span class="cp"></%</span><span class="nb">call</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>For information on how to construct defs that embed content from
+the caller, see <a class="reference internal" href="defs.html#defs-with-content"><em>Calling a Def with Embedded Content and/or Other Defs</em></a>.</p>
+</div>
+<div class="section" id="namespaces-from-regular-python-modules">
+<span id="namespaces-python-modules"></span><h2>Namespaces from Regular Python Modules<a class="headerlink" href="#namespaces-from-regular-python-modules" title="Permalink to this headline">¶</a></h2>
+<p>Namespaces can also import regular Python functions from
+modules. These callables need to take at least one argument,
+<tt class="docutils literal"><span class="pre">context</span></tt>, an instance of <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>. A module file
+<tt class="docutils literal"><span class="pre">some/module.py</span></tt> might contain the callable:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">my_tag</span><span class="p">(</span><span class="n">context</span><span class="p">):</span>
+    <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"hello world"</span><span class="p">)</span>
+    <span class="k">return</span> <span class="s">''</span>
+</pre></div>
+</div>
+<p>A template can use this module via:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">namespace</span> <span class="na">name=</span><span class="s">"hw"</span> <span class="na">module=</span><span class="s">"some.module"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="cp">${</span><span class="n">hw</span><span class="o">.</span><span class="n">my_tag</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>Note that the <tt class="docutils literal"><span class="pre">context</span></tt> argument is not needed in the call;
+the <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> tag creates a locally-scoped callable which
+takes care of it. The <tt class="docutils literal"><span class="pre">return</span> <span class="pre">''</span></tt> is so that the def does not
+dump a <tt class="docutils literal"><span class="pre">None</span></tt> into the output stream – the return value of any
+def is rendered after the def completes, in addition to whatever
+was passed to <a class="reference internal" href="runtime.html#mako.runtime.Context.write" title="mako.runtime.Context.write"><tt class="xref py py-meth docutils literal"><span class="pre">Context.write()</span></tt></a> within its body.</p>
+<p>If your def is to be called in an “embedded content” context,
+that is as described in <a class="reference internal" href="defs.html#defs-with-content"><em>Calling a Def with Embedded Content and/or Other Defs</em></a>, you should use
+the <a class="reference internal" href="#mako.runtime.supports_caller" title="mako.runtime.supports_caller"><tt class="xref py py-func docutils literal"><span class="pre">supports_caller()</span></tt></a> decorator, which will ensure that Mako
+will ensure the correct “caller” variable is available when your
+def is called, supporting embedded content:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.runtime</span> <span class="kn">import</span> <span class="n">supports_caller</span>
+
+<span class="nd">@supports_caller</span>
+<span class="k">def</span> <span class="nf">my_tag</span><span class="p">(</span><span class="n">context</span><span class="p">):</span>
+    <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"<div>"</span><span class="p">)</span>
+    <span class="n">context</span><span class="p">[</span><span class="s">'caller'</span><span class="p">]</span><span class="o">.</span><span class="n">body</span><span class="p">()</span>
+    <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"</div>"</span><span class="p">)</span>
+    <span class="k">return</span> <span class="s">''</span>
+</pre></div>
+</div>
+<p>Capturing of output is available as well, using the
+outside-of-templates version of the <a class="reference internal" href="#mako.runtime.capture" title="mako.runtime.capture"><tt class="xref py py-func docutils literal"><span class="pre">capture()</span></tt></a> function,
+which accepts the “context” as its first argument:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.runtime</span> <span class="kn">import</span> <span class="n">supports_caller</span><span class="p">,</span> <span class="n">capture</span>
+
+<span class="nd">@supports_caller</span>
+<span class="k">def</span> <span class="nf">my_tag</span><span class="p">(</span><span class="n">context</span><span class="p">):</span>
+    <span class="k">return</span> <span class="s">"<div></span><span class="si">%s</span><span class="s"></div>"</span> <span class="o">%</span> \
+            <span class="n">capture</span><span class="p">(</span><span class="n">context</span><span class="p">,</span> <span class="n">context</span><span class="p">[</span><span class="s">'caller'</span><span class="p">]</span><span class="o">.</span><span class="n">body</span><span class="p">,</span> <span class="n">x</span><span class="o">=</span><span class="s">"foo"</span><span class="p">,</span> <span class="n">y</span><span class="o">=</span><span class="s">"bar"</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="declaring-defs-in-namespaces">
+<h2>Declaring Defs in Namespaces<a class="headerlink" href="#declaring-defs-in-namespaces" title="Permalink to this headline">¶</a></h2>
+<p>The <tt class="docutils literal"><span class="pre"><%namespace></span></tt> tag supports the definition of <tt class="docutils literal"><span class="pre"><%def></span></tt>s
+directly inside the tag. These defs become part of the namespace
+like any other function, and will override the definitions
+pulled in from a remote template or module:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## define a namespace</span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">namespace</span> <span class="na">name=</span><span class="s">"stuff"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"comp1()"</span><span class="cp">></span><span class="x"></span>
+<span class="x">        comp1</span>
+<span class="x">    </span><span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+<span class="cp"></%</span><span class="nb">namespace</span><span class="cp">></span>
+
+<span class="cp">## then call it</span><span class="x"></span>
+<span class="cp">${</span><span class="n">stuff</span><span class="o">.</span><span class="n">comp1</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="the-body-method">
+<span id="namespaces-body"></span><h2>The <tt class="docutils literal"><span class="pre">body()</span></tt> Method<a class="headerlink" href="#the-body-method" title="Permalink to this headline">¶</a></h2>
+<p>Every namespace that is generated from a template contains a
+method called <tt class="docutils literal"><span class="pre">body()</span></tt>. This method corresponds to the main
+body of the template, and plays its most important roles when
+using inheritance relationships as well as
+def-calls-with-content.</p>
+<p>Since the <tt class="docutils literal"><span class="pre">body()</span></tt> method is available from a namespace just
+like all the other defs defined in a template, what happens if
+you send arguments to it? By default, the <tt class="docutils literal"><span class="pre">body()</span></tt> method
+accepts no positional arguments, and for usefulness in
+inheritance scenarios will by default dump all keyword arguments
+into a dictionary called <tt class="docutils literal"><span class="pre">pageargs</span></tt>. But if you actually want
+to get at the keyword arguments, Mako recommends you define your
+own argument signature explicitly. You do this via using the
+<tt class="docutils literal"><span class="pre"><%page></span></tt> tag:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">args=</span><span class="s">"x, y, someval=8, scope='foo', **kwargs"</span><span class="cp">/></span><span class="x"></span>
+</pre></div>
+</div>
+<p>A template which defines the above signature requires that the
+variables <tt class="docutils literal"><span class="pre">x</span></tt> and <tt class="docutils literal"><span class="pre">y</span></tt> are defined, defines default values
+for <tt class="docutils literal"><span class="pre">someval</span></tt> and <tt class="docutils literal"><span class="pre">scope</span></tt>, and sets up <tt class="docutils literal"><span class="pre">**kwargs</span></tt> to
+receive all other keyword arguments. If <tt class="docutils literal"><span class="pre">**kwargs</span></tt> or similar
+is not present, the argument <tt class="docutils literal"><span class="pre">**pageargs</span></tt> gets tacked on by
+Mako. When the template is called as a top-level template (i.e.
+via <a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a>) or via the <tt class="docutils literal"><span class="pre"><%include></span></tt> tag, the
+values for these arguments will be pulled from the <tt class="docutils literal"><span class="pre">Context</span></tt>.
+In all other cases, i.e. via calling the <tt class="docutils literal"><span class="pre">body()</span></tt> method, the
+arguments are taken as ordinary arguments from the method call.
+So above, the body might be called as:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">body</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="n">y</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">someval</span><span class="o">=</span><span class="mi">15</span><span class="p">,</span> <span class="n">delta</span><span class="o">=</span><span class="mi">7</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>The <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object also supplies a <a class="reference internal" href="runtime.html#mako.runtime.Context.kwargs" title="mako.runtime.Context.kwargs"><tt class="xref py py-attr docutils literal"><span class="pre">kwargs</span></tt></a> accessor, for
+cases when you’d like to pass along whatever is in the context to
+a <tt class="docutils literal"><span class="pre">body()</span></tt> callable:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="nb">next</span><span class="o">.</span><span class="n">body</span><span class="p">(</span><span class="o">**</span><span class="n">context</span><span class="o">.</span><span class="n">kwargs</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>The usefulness of calls like the above become more apparent when
+one works with inheriting templates. For more information on
+this, as well as the meanings of the names <tt class="docutils literal"><span class="pre">self</span></tt> and
+<tt class="docutils literal"><span class="pre">next</span></tt>, see <a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</p>
+</div>
+<div class="section" id="built-in-namespaces">
+<span id="namespaces-builtin"></span><h2>Built-in Namespaces<a class="headerlink" href="#built-in-namespaces" title="Permalink to this headline">¶</a></h2>
+<p>The namespace is so great that Mako gives your template one (or
+two) for free. The names of these namespaces are <tt class="docutils literal"><span class="pre">local</span></tt> and
+<tt class="docutils literal"><span class="pre">self</span></tt>. Other built-in namespaces include <tt class="docutils literal"><span class="pre">parent</span></tt> and
+<tt class="docutils literal"><span class="pre">next</span></tt>, which are optional and are described in
+<a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</p>
+<div class="section" id="local">
+<span id="namespace-local"></span><h3><tt class="docutils literal"><span class="pre">local</span></tt><a class="headerlink" href="#local" title="Permalink to this headline">¶</a></h3>
+<p>The <tt class="docutils literal"><span class="pre">local</span></tt> namespace is basically the namespace for the
+currently executing template. This means that all of the top
+level defs defined in your template, as well as your template’s
+<tt class="docutils literal"><span class="pre">body()</span></tt> function, are also available off of the <tt class="docutils literal"><span class="pre">local</span></tt>
+namespace.</p>
+<p>The <tt class="docutils literal"><span class="pre">local</span></tt> namespace is also where properties like <tt class="docutils literal"><span class="pre">uri</span></tt>,
+<tt class="docutils literal"><span class="pre">filename</span></tt>, and <tt class="docutils literal"><span class="pre">module</span></tt> and the <tt class="docutils literal"><span class="pre">get_namespace</span></tt> method
+can be particularly useful.</p>
+</div>
+<div class="section" id="self">
+<span id="namespace-self"></span><h3><tt class="docutils literal"><span class="pre">self</span></tt><a class="headerlink" href="#self" title="Permalink to this headline">¶</a></h3>
+<p>The <tt class="docutils literal"><span class="pre">self</span></tt> namespace, in the case of a template that does not
+use inheritance, is synonymous with <tt class="docutils literal"><span class="pre">local</span></tt>. If inheritance is
+used, then <tt class="docutils literal"><span class="pre">self</span></tt> references the topmost template in the
+inheritance chain, where it is most useful for providing the
+ultimate form of various “method” calls which may have been
+overridden at various points in an inheritance chain. See
+<a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</p>
+</div>
+</div>
+<div class="section" id="inheritable-namespaces">
+<h2>Inheritable Namespaces<a class="headerlink" href="#inheritable-namespaces" title="Permalink to this headline">¶</a></h2>
+<p>The <tt class="docutils literal"><span class="pre"><%namespace></span></tt> tag includes an optional attribute
+<tt class="docutils literal"><span class="pre">inheritable="True"</span></tt>, which will cause the namespace to be
+attached to the <tt class="docutils literal"><span class="pre">self</span></tt> namespace. Since <tt class="docutils literal"><span class="pre">self</span></tt> is globally
+available throughout an inheritance chain (described in the next
+section), all the templates in an inheritance chain can get at
+the namespace imported in a super-template via <tt class="docutils literal"><span class="pre">self</span></tt>.</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## base.html</span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">namespace</span> <span class="na">name=</span><span class="s">"foo"</span> <span class="na">file=</span><span class="s">"foo.html"</span> <span class="na">inheritable=</span><span class="s">"True"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="cp">${</span><span class="nb">next</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span>
+
+<span class="cp">## somefile.html</span><span class="x"></span>
+<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"base.html"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">foo</span><span class="o">.</span><span class="n">bar</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>This allows a super-template to load a whole bunch of namespaces
+that its inheriting templates can get to, without them having to
+explicitly load those namespaces themselves.</p>
+<p>The <tt class="docutils literal"><span class="pre">import="*"</span></tt> part of the <tt class="docutils literal"><span class="pre"><%namespace></span></tt> tag doesn’t yet
+interact with the <tt class="docutils literal"><span class="pre">inheritable</span></tt> flag, so currently you have to
+use the explicit namespace name off of <tt class="docutils literal"><span class="pre">self</span></tt>, followed by the
+desired function name. But more on this in a future release.</p>
+</div>
+<div class="section" id="api-reference">
+<h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="mako.runtime.Namespace">
+<em class="property">class </em><tt class="descclassname">mako.runtime.</tt><tt class="descname">Namespace</tt><big>(</big><em>name</em>, <em>context</em>, <em>callables=None</em>, <em>inherits=None</em>, <em>populate_self=True</em>, <em>calling_uri=None</em><big>)</big><a class="headerlink" href="#mako.runtime.Namespace" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
+<p>Provides access to collections of rendering methods, which
+can be local, from other templates, or from imported modules.</p>
+<p>To access a particular rendering method referenced by a
+<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>, use plain attribute access:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="n">some_namespace</span><span class="o">.</span><span class="n">foo</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p><a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> also contains several built-in attributes
+described here.</p>
+<dl class="attribute">
+<dt id="mako.runtime.Namespace.attr">
+<tt class="descname">attr</tt><a class="headerlink" href="#mako.runtime.Namespace.attr" title="Permalink to this definition">¶</a></dt>
+<dd><p>Access module level attributes by name.</p>
+<p>This accessor allows templates to supply “scalar”
+attributes which are particularly handy in inheritance
+relationships. See the example in
+<a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="mako.runtime.Namespace.cache">
+<tt class="descname">cache</tt><a class="headerlink" href="#mako.runtime.Namespace.cache" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return the <a class="reference internal" href="caching.html#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> object referenced
+by this <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> object’s
+<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="mako.runtime.Namespace.context">
+<tt class="descname">context</tt><em class="property"> = None</em><a class="headerlink" href="#mako.runtime.Namespace.context" title="Permalink to this definition">¶</a></dt>
+<dd><p>The <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object for this <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>.</p>
+<p>Namespaces are often created with copies of contexts that
+contain slightly different data, particularly in inheritance
+scenarios. Using the <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> off of a <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> one
+can traverse an entire chain of templates that inherit from
+one-another.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="mako.runtime.Namespace.filename">
+<tt class="descname">filename</tt><em class="property"> = None</em><a class="headerlink" href="#mako.runtime.Namespace.filename" title="Permalink to this definition">¶</a></dt>
+<dd><p>The path of the filesystem file used for this
+<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>‘s module or template.</p>
+<p>If this is a pure module-based
+<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>, this evaluates to <tt class="docutils literal"><span class="pre">module.__file__</span></tt>. If a
+template-based namespace, it evaluates to the original
+template file location.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.runtime.Namespace.get_cached">
+<tt class="descname">get_cached</tt><big>(</big><em>key</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mako.runtime.Namespace.get_cached" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a value from the <a class="reference internal" href="caching.html#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> referenced by this
+<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> object’s <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>.</p>
+<p>The advantage to this method versus direct access to the
+<a class="reference internal" href="caching.html#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> is that the configuration parameters
+declared in <tt class="docutils literal"><span class="pre"><%page></span></tt> take effect here, thereby calling
+up the same configured backend as that configured
+by <tt class="docutils literal"><span class="pre"><%page></span></tt>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.runtime.Namespace.get_namespace">
+<tt class="descname">get_namespace</tt><big>(</big><em>uri</em><big>)</big><a class="headerlink" href="#mako.runtime.Namespace.get_namespace" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> corresponding to the given <tt class="docutils literal"><span class="pre">uri</span></tt>.</p>
+<p>If the given <tt class="docutils literal"><span class="pre">uri</span></tt> is a relative URI (i.e. it does not
+contain a leading slash <tt class="docutils literal"><span class="pre">/</span></tt>), the <tt class="docutils literal"><span class="pre">uri</span></tt> is adjusted to
+be relative to the <tt class="docutils literal"><span class="pre">uri</span></tt> of the namespace itself. This
+method is therefore mostly useful off of the built-in
+<tt class="docutils literal"><span class="pre">local</span></tt> namespace, described in <a class="reference internal" href="#namespace-local"><em>local</em></a>.</p>
+<p>In
+most cases, a template wouldn’t need this function, and
+should instead use the <tt class="docutils literal"><span class="pre"><%namespace></span></tt> tag to load
+namespaces. However, since all <tt class="docutils literal"><span class="pre"><%namespace></span></tt> tags are
+evaluated before the body of a template ever runs,
+this method can be used to locate namespaces using
+expressions that were generated within the body code of
+the template, or to conditionally use a particular
+namespace.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.runtime.Namespace.get_template">
+<tt class="descname">get_template</tt><big>(</big><em>uri</em><big>)</big><a class="headerlink" href="#mako.runtime.Namespace.get_template" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> from the given <tt class="docutils literal"><span class="pre">uri</span></tt>.</p>
+<p>The <tt class="docutils literal"><span class="pre">uri</span></tt> resolution is relative to the <tt class="docutils literal"><span class="pre">uri</span></tt> of this <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>
+object’s <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.runtime.Namespace.include_file">
+<tt class="descname">include_file</tt><big>(</big><em>uri</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mako.runtime.Namespace.include_file" title="Permalink to this definition">¶</a></dt>
+<dd><p>Include a file at the given <tt class="docutils literal"><span class="pre">uri</span></tt>.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="mako.runtime.Namespace.module">
+<tt class="descname">module</tt><em class="property"> = None</em><a class="headerlink" href="#mako.runtime.Namespace.module" title="Permalink to this definition">¶</a></dt>
+<dd><p>The Python module referenced by this <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>.</p>
+<p>If the namespace references a <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>, then
+this module is the equivalent of <tt class="docutils literal"><span class="pre">template.module</span></tt>,
+i.e. the generated module for the template.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="mako.runtime.Namespace.template">
+<tt class="descname">template</tt><em class="property"> = None</em><a class="headerlink" href="#mako.runtime.Namespace.template" title="Permalink to this definition">¶</a></dt>
+<dd><p>The <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object referenced by this
+<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>, if any.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="mako.runtime.Namespace.uri">
+<tt class="descname">uri</tt><em class="property"> = None</em><a class="headerlink" href="#mako.runtime.Namespace.uri" title="Permalink to this definition">¶</a></dt>
+<dd><p>The URI for this <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>‘s template.</p>
+<p>I.e. whatever was sent to <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup.get_template" title="mako.lookup.TemplateLookup.get_template"><tt class="xref py py-meth docutils literal"><span class="pre">TemplateLookup.get_template()</span></tt></a>.</p>
+<p>This is the equivalent of <tt class="xref py py-attr docutils literal"><span class="pre">Template.uri</span></tt>.</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="mako.runtime.TemplateNamespace">
+<em class="property">class </em><tt class="descclassname">mako.runtime.</tt><tt class="descname">TemplateNamespace</tt><big>(</big><em>name</em>, <em>context</em>, <em>template=None</em>, <em>templateuri=None</em>, <em>callables=None</em>, <em>inherits=None</em>, <em>populate_self=True</em>, <em>calling_uri=None</em><big>)</big><a class="headerlink" href="#mako.runtime.TemplateNamespace" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bases: <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">mako.runtime.Namespace</span></tt></a></p>
+<p>A <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> specific to a <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> instance.</p>
+<dl class="attribute">
+<dt id="mako.runtime.TemplateNamespace.filename">
+<tt class="descname">filename</tt><a class="headerlink" href="#mako.runtime.TemplateNamespace.filename" title="Permalink to this definition">¶</a></dt>
+<dd><p>The path of the filesystem file used for this
+<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>‘s module or template.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="mako.runtime.TemplateNamespace.module">
+<tt class="descname">module</tt><a class="headerlink" href="#mako.runtime.TemplateNamespace.module" title="Permalink to this definition">¶</a></dt>
+<dd><p>The Python module referenced by this <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>.</p>
+<p>If the namespace references a <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>, then
+this module is the equivalent of <tt class="docutils literal"><span class="pre">template.module</span></tt>,
+i.e. the generated module for the template.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="mako.runtime.TemplateNamespace.uri">
+<tt class="descname">uri</tt><a class="headerlink" href="#mako.runtime.TemplateNamespace.uri" title="Permalink to this definition">¶</a></dt>
+<dd><p>The URI for this <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>‘s template.</p>
+<p>I.e. whatever was sent to <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup.get_template" title="mako.lookup.TemplateLookup.get_template"><tt class="xref py py-meth docutils literal"><span class="pre">TemplateLookup.get_template()</span></tt></a>.</p>
+<p>This is the equivalent of <tt class="xref py py-attr docutils literal"><span class="pre">Template.uri</span></tt>.</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="mako.runtime.ModuleNamespace">
+<em class="property">class </em><tt class="descclassname">mako.runtime.</tt><tt class="descname">ModuleNamespace</tt><big>(</big><em>name</em>, <em>context</em>, <em>module</em>, <em>callables=None</em>, <em>inherits=None</em>, <em>populate_self=True</em>, <em>calling_uri=None</em><big>)</big><a class="headerlink" href="#mako.runtime.ModuleNamespace" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bases: <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">mako.runtime.Namespace</span></tt></a></p>
+<p>A <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> specific to a Python module instance.</p>
+<dl class="attribute">
+<dt id="mako.runtime.ModuleNamespace.filename">
+<tt class="descname">filename</tt><a class="headerlink" href="#mako.runtime.ModuleNamespace.filename" title="Permalink to this definition">¶</a></dt>
+<dd><p>The path of the filesystem file used for this
+<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>‘s module or template.</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="mako.runtime.supports_caller">
+<tt class="descclassname">mako.runtime.</tt><tt class="descname">supports_caller</tt><big>(</big><em>func</em><big>)</big><a class="headerlink" href="#mako.runtime.supports_caller" title="Permalink to this definition">¶</a></dt>
+<dd><p>Apply a caller_stack compatibility decorator to a plain
+Python function.</p>
+<p>See the example in <a class="reference internal" href="#namespaces-python-modules"><em>Namespaces from Regular Python Modules</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="mako.runtime.capture">
+<tt class="descclassname">mako.runtime.</tt><tt class="descname">capture</tt><big>(</big><em>context</em>, <em>callable_</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mako.runtime.capture" title="Permalink to this definition">¶</a></dt>
+<dd><p>Execute the given template def, capturing the output into
+a buffer.</p>
+<p>See the example in <a class="reference internal" href="#namespaces-python-modules"><em>Namespaces from Regular Python Modules</em></a>.</p>
+</dd></dl>
+
+</div>
+</div>
+
+    </div>
+
+</div>
+
+<div id="docs-bottom-navigation" class="docs-navigation-links">
+        Previous:
+        <a href="runtime.html" title="previous chapter">The Mako Runtime Environment</a>
+        Next:
+        <a href="inheritance.html" title="next chapter">Inheritance</a>
+
+    <div id="docs-copyright">
+        © Copyright the Mako authors and contributors.
+        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
+        with Mako templates.
+    </div>
+</div>
+
+</div>
+
+<div class="clearfix">
+
+<hr/>
+
+<div class="copyright">Website content copyright © by Michael Bayer.
+    All rights reserved.  Mako and its documentation are licensed
+    under the MIT license.  mike(&)zzzcomputing.com</div>
+
+</div>
+</div>
+</body>
+</html>
diff --git a/lib/Mako-0.7.3/doc/runtime.html b/lib/Mako-0.7.3/doc/runtime.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/runtime.html
@@ -0,0 +1,710 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<head>
+<title>
+    
+                The Mako Runtime Environment
+             — 
+    Mako 0.7.3 Documentation
+</title>
+
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
+
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+          URL_ROOT:    '#',
+          VERSION:     '0.7.3',
+          COLLAPSE_MODINDEX: false,
+          FILE_SUFFIX: '.html'
+      };
+    </script>
+        <script type="text/javascript" src="_static/jquery.js"></script>
+        <script type="text/javascript" src="_static/underscore.js"></script>
+        <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="top" title="Mako 0.7.3 Documentation" href="index.html" />
+        <link rel="next" title="Namespaces" href="namespaces.html" />
+        <link rel="prev" title="Defs and Blocks" href="defs.html" />
+
+<link rel="stylesheet" href="_static/site.css"></link>
+
+
+</head>
+<body>
+    <div id="wrap">
+    <div class="rightbar">
+
+
+    <div class="slogan">
+    Hyperfast and lightweight templating for the Python platform.
+    </div>
+
+
+    </div>
+
+    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
+
+    <hr/>
+
+    
+
+
+
+
+
+
+
+
+
+<div id="docs-container">
+
+
+
+<div id="docs-header">
+    <h1>Mako 0.7.3 Documentation</h1>
+
+    <div id="docs-search">
+    Search:
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </div>
+
+    <div id="docs-version-header">
+        Release: <span class="version-num">0.7.3</span>
+
+    </div>
+
+</div>
+
+<div id="docs-top-navigation">
+    <div id="docs-top-page-control" class="docs-navigation-links">
+        <ul>
+            <li>Prev:
+            <a href="defs.html" title="previous chapter">Defs and Blocks</a>
+            </li>
+            <li>Next:
+            <a href="namespaces.html" title="next chapter">Namespaces</a>
+            </li>
+
+        <li>
+            <a href="index.html">Table of Contents</a> |
+            <a href="genindex.html">Index</a>
+            | <a href="_sources/runtime.txt">view source
+        </li>
+        </ul>
+    </div>
+
+    <div id="docs-navigation-banner">
+        <a href="index.html">Mako 0.7.3 Documentation</a>
+        » 
+                The Mako Runtime Environment
+             
+
+        <h2>
+            
+                The Mako Runtime Environment
+            
+        </h2>
+    </div>
+
+</div>
+
+<div id="docs-body-container">
+
+    <div id="docs-sidebar">
+    <h3><a href="index.html">Table of Contents</a></h3>
+    <ul>
+<li><a class="reference internal" href="#">The Mako Runtime Environment</a><ul>
+<li><a class="reference internal" href="#context">Context</a><ul>
+<li><a class="reference internal" href="#the-buffer">The Buffer</a></li>
+<li><a class="reference internal" href="#context-variables">Context Variables</a></li>
+<li><a class="reference internal" href="#context-methods-and-accessors">Context Methods and Accessors</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#the-loop-context">The Loop Context</a><ul>
+<li><a class="reference internal" href="#iterations">Iterations</a></li>
+<li><a class="reference internal" href="#cycling">Cycling</a></li>
+<li><a class="reference internal" href="#parent-loops">Parent Loops</a></li>
+<li><a class="reference internal" href="#migrating-legacy-templates-that-use-the-word-loop">Migrating Legacy Templates that Use the Word “loop”</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#all-the-built-in-names">All the Built-in Names</a><ul>
+<li><a class="reference internal" href="#reserved-names">Reserved Names</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#api-reference">API Reference</a></li>
+</ul>
+</li>
+</ul>
+
+
+    <h4>Previous Topic</h4>
+    <p>
+    <a href="defs.html" title="previous chapter">Defs and Blocks</a>
+    </p>
+    <h4>Next Topic</h4>
+    <p>
+    <a href="namespaces.html" title="next chapter">Namespaces</a>
+    </p>
+
+    <h4>Quick Search</h4>
+    <p>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </p>
+
+    </div>
+
+    <div id="docs-body" class="withsidebar" >
+        
+<div class="section" id="the-mako-runtime-environment">
+<span id="runtime-toplevel"></span><h1>The Mako Runtime Environment<a class="headerlink" href="#the-mako-runtime-environment" title="Permalink to this headline">¶</a></h1>
+<p>This section describes a little bit about the objects and
+built-in functions that are available in templates.</p>
+<div class="section" id="context">
+<span id="id1"></span><h2>Context<a class="headerlink" href="#context" title="Permalink to this headline">¶</a></h2>
+<p>The <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> is the central object that is created when
+a template is first executed, and is responsible for handling
+all communication with the outside world.  Within the template
+environment, it is available via the <a class="reference internal" href="#reserved-names"><em>reserved name</em></a>
+<tt class="docutils literal"><span class="pre">context</span></tt>.  The <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> includes two
+major components, one of which is the output buffer, which is a
+file-like object such as Python’s <tt class="docutils literal"><span class="pre">StringIO</span></tt> or similar, and
+the other a dictionary of variables that can be freely
+referenced within a template; this dictionary is a combination
+of the arguments sent to the <a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> function and
+some built-in variables provided by Mako’s runtime environment.</p>
+<div class="section" id="the-buffer">
+<h3>The Buffer<a class="headerlink" href="#the-buffer" title="Permalink to this headline">¶</a></h3>
+<p>The buffer is stored within the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>, and writing
+to it is achieved by calling the <a class="reference internal" href="#mako.runtime.Context.write" title="mako.runtime.Context.write"><tt class="xref py py-meth docutils literal"><span class="pre">write()</span></tt></a> method
+– in a template this looks like <tt class="docutils literal"><span class="pre">context.write('some</span> <span class="pre">string')</span></tt>.
+You usually don’t need to care about this, as all text within a template, as
+well as all expressions provided by <tt class="docutils literal"><span class="pre">${}</span></tt>, automatically send
+everything to this method. The cases you might want to be aware
+of its existence are if you are dealing with various
+filtering/buffering scenarios, which are described in
+<a class="reference internal" href="filtering.html"><em>Filtering and Buffering</em></a>, or if you want to programmatically
+send content to the output stream, such as within a <tt class="docutils literal"><span class="pre"><%</span> <span class="pre">%></span></tt>
+block.</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span>
+    <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"some programmatic text"</span><span class="p">)</span>
+<span class="cp">%></span><span class="x"></span>
+</pre></div>
+</div>
+<p>The actual buffer may or may not be the original buffer sent to
+the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object, as various filtering/caching
+scenarios may “push” a new buffer onto the context’s underlying
+buffer stack. For this reason, just stick with
+<tt class="docutils literal"><span class="pre">context.write()</span></tt> and content will always go to the topmost
+buffer.</p>
+</div>
+<div class="section" id="context-variables">
+<span id="context-vars"></span><h3>Context Variables<a class="headerlink" href="#context-variables" title="Permalink to this headline">¶</a></h3>
+<p>When your template is compiled into a Python module, the body
+content is enclosed within a Python function called
+<tt class="docutils literal"><span class="pre">render_body</span></tt>. Other top-level defs defined in the template are
+defined within their own function bodies which are named after
+the def’s name with the prefix <tt class="docutils literal"><span class="pre">render_</span></tt> (i.e. <tt class="docutils literal"><span class="pre">render_mydef</span></tt>).
+One of the first things that happens within these functions is
+that all variable names that are referenced within the function
+which are not defined in some other way (i.e. such as via
+assignment, module level imports, etc.) are pulled from the
+<a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object’s dictionary of variables. This is how you’re
+able to freely reference variable names in a template which
+automatically correspond to what was passed into the current
+<a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
+<ul>
+<li><p class="first"><strong>What happens if I reference a variable name that is not in
+the current context?</strong> - The value you get back is a special
+value called <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt>, or if the <tt class="docutils literal"><span class="pre">strict_undefined=True</span></tt> flag
+is used a <tt class="docutils literal"><span class="pre">NameError</span></tt> is raised. <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> is just a simple global
+variable with the class <a class="reference internal" href="#mako.runtime.Undefined" title="mako.runtime.Undefined"><tt class="xref py py-class docutils literal"><span class="pre">mako.runtime.Undefined</span></tt></a>. The
+<tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> object throws an error when you call <tt class="docutils literal"><span class="pre">str()</span></tt> on
+it, which is what happens if you try to use it in an
+expression.</p>
+</li>
+<li><p class="first"><strong>UNDEFINED makes it hard for me to find what name is missing</strong> - An alternative
+is to specify the option <tt class="docutils literal"><span class="pre">strict_undefined=True</span></tt>
+to the <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> or <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>.  This will cause
+any non-present variables to raise an immediate <tt class="docutils literal"><span class="pre">NameError</span></tt>
+which includes the name of the variable in its message
+when <a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> is called – <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> is not used.</p>
+<p class="versionadded">
+<span class="versionmodified">New in version 0.3.6.</span></p>
+</li>
+<li><p class="first"><strong>Why not just return None?</strong> Using <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt>, or
+raising a <tt class="docutils literal"><span class="pre">NameError</span></tt> is more
+explicit and allows differentiation between a value of <tt class="docutils literal"><span class="pre">None</span></tt>
+that was explicitly passed to the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> and a value that
+wasn’t present at all.</p>
+</li>
+<li><p class="first"><strong>Why raise an exception when you call str() on it ? Why not
+just return a blank string?</strong> - Mako tries to stick to the
+Python philosophy of “explicit is better than implicit”. In
+this case, it’s decided that the template author should be made
+to specifically handle a missing value rather than
+experiencing what may be a silent failure. Since <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt>
+is a singleton object just like Python’s <tt class="docutils literal"><span class="pre">True</span></tt> or <tt class="docutils literal"><span class="pre">False</span></tt>,
+you can use the <tt class="docutils literal"><span class="pre">is</span></tt> operator to check for it:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">%</span> <span class="k">if</span> <span class="n">someval</span> <span class="ow">is</span> <span class="n">UNDEFINED</span><span class="p">:</span><span class="x"></span>
+<span class="x">    someval is: no value</span>
+<span class="cp">%</span> <span class="k">else</span><span class="p">:</span><span class="x"></span>
+<span class="x">    someval is: </span><span class="cp">${</span><span class="n">someval</span><span class="cp">}</span>
+<span class="cp">%</span><span class="k"> endif</span><span class="x"></span>
+</pre></div>
+</div>
+</li>
+</ul>
+<p>Another facet of the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> is that its dictionary of
+variables is <strong>immutable</strong>. Whatever is set when
+<a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> is called is what stays. Of course, since
+its Python, you can hack around this and change values in the
+context’s internal dictionary, but this will probably will not
+work as well as you’d think. The reason for this is that Mako in
+many cases creates copies of the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object, which
+get sent to various elements of the template and inheriting
+templates used in an execution. So changing the value in your
+local <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> will not necessarily make that value
+available in other parts of the template’s execution. Examples
+of where Mako creates copies of the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> include
+within top-level def calls from the main body of the template
+(the context is used to propagate locally assigned variables
+into the scope of defs; since in the template’s body they appear
+as inlined functions, Mako tries to make them act that way), and
+within an inheritance chain (each template in an inheritance
+chain has a different notion of <tt class="docutils literal"><span class="pre">parent</span></tt> and <tt class="docutils literal"><span class="pre">next</span></tt>, which
+are all stored in unique <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> instances).</p>
+<ul>
+<li><p class="first"><strong>So what if I want to set values that are global to everyone
+within a template request?</strong> - All you have to do is provide a
+dictionary to your <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> when the template first
+runs, and everyone can just get/set variables from that. Lets
+say its called <tt class="docutils literal"><span class="pre">attributes</span></tt>.</p>
+<p>Running the template looks like:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">output</span> <span class="o">=</span> <span class="n">template</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="n">attributes</span><span class="o">=</span><span class="p">{})</span>
+</pre></div>
+</div>
+<p>Within a template, just reference the dictionary:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span>
+    <span class="n">attributes</span><span class="p">[</span><span class="s">'foo'</span><span class="p">]</span> <span class="o">=</span> <span class="s">'bar'</span>
+<span class="cp">%></span><span class="x"></span>
+<span class="x">'foo' attribute is: </span><span class="cp">${</span><span class="n">attributes</span><span class="p">[</span><span class="s">'foo'</span><span class="p">]</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+</li>
+<li><p class="first"><strong>Why can’t “attributes” be a built-in feature of the
+Context?</strong> - This is an area where Mako is trying to make as
+few decisions about your application as it possibly can.
+Perhaps you don’t want your templates to use this technique of
+assigning and sharing data, or perhaps you have a different
+notion of the names and kinds of data structures that should
+be passed around. Once again Mako would rather ask the user to
+be explicit.</p>
+</li>
+</ul>
+</div>
+<div class="section" id="context-methods-and-accessors">
+<h3>Context Methods and Accessors<a class="headerlink" href="#context-methods-and-accessors" title="Permalink to this headline">¶</a></h3>
+<p>Significant members of <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> include:</p>
+<ul>
+<li><p class="first"><tt class="docutils literal"><span class="pre">context[key]</span></tt> / <tt class="docutils literal"><span class="pre">context.get(key,</span> <span class="pre">default=None)</span></tt> -
+dictionary-like accessors for the context. Normally, any
+variable you use in your template is automatically pulled from
+the context if it isn’t defined somewhere already. Use the
+dictionary accessor and/or <tt class="docutils literal"><span class="pre">get</span></tt> method when you want a
+variable that <em>is</em> already defined somewhere else, such as in
+the local arguments sent to a <tt class="docutils literal"><span class="pre">%def</span></tt> call. If a key is not
+present, like a dictionary it raises <tt class="docutils literal"><span class="pre">KeyError</span></tt>.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">keys()</span></tt> - all the names defined within this context.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">kwargs</span></tt> - this returns a <strong>copy</strong> of the context’s
+dictionary of variables. This is useful when you want to
+propagate the variables in the current context to a function
+as keyword arguments, i.e.:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="nb">next</span><span class="o">.</span><span class="n">body</span><span class="p">(</span><span class="o">**</span><span class="n">context</span><span class="o">.</span><span class="n">kwargs</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">write(text)</span></tt> - write some text to the current output
+stream.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">lookup</span></tt> - returns the <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> instance that is
+used for all file-lookups within the current execution (even
+though individual <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> instances can conceivably have
+different instances of a <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>, only the
+<a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> of the originally-called <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> gets
+used in a particular execution).</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="section" id="the-loop-context">
+<span id="loop-context"></span><h2>The Loop Context<a class="headerlink" href="#the-loop-context" title="Permalink to this headline">¶</a></h2>
+<p>Within <tt class="docutils literal"><span class="pre">%</span> <span class="pre">for</span></tt> blocks, the <a class="reference internal" href="#reserved-names"><em>reserved name</em></a> <tt class="docutils literal"><span class="pre">loop</span></tt>
+is available.  <tt class="docutils literal"><span class="pre">loop</span></tt> tracks the progress of
+the <tt class="docutils literal"><span class="pre">for</span></tt> loop and makes it easy to use the iteration state to control
+template behavior:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><ul></span>
+<span class="cp">%</span> <span class="k">for</span> <span class="n">a</span> <span class="ow">in</span> <span class="p">(</span><span class="s">"one"</span><span class="p">,</span> <span class="s">"two"</span><span class="p">,</span> <span class="s">"three"</span><span class="p">):</span><span class="x"></span>
+<span class="x">    <li>Item </span><span class="cp">${</span><span class="n">loop</span><span class="o">.</span><span class="n">index</span><span class="cp">}</span><span class="x">: </span><span class="cp">${</span><span class="n">a</span><span class="cp">}</span><span class="x"></li></span>
+<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
+<span class="x"></ul></span>
+</pre></div>
+</div>
+<p class="versionadded">
+<span class="versionmodified">New in version 0.7.</span></p>
+<div class="section" id="iterations">
+<h3>Iterations<a class="headerlink" href="#iterations" title="Permalink to this headline">¶</a></h3>
+<p>Regardless of the type of iterable you’re looping over, <tt class="docutils literal"><span class="pre">loop</span></tt> always tracks
+the 0-indexed iteration count (available at <tt class="docutils literal"><span class="pre">loop.index</span></tt>), its parity
+(through the <tt class="docutils literal"><span class="pre">loop.even</span></tt> and <tt class="docutils literal"><span class="pre">loop.odd</span></tt> bools), and <tt class="docutils literal"><span class="pre">loop.first</span></tt>, a bool
+indicating whether the loop is on its first iteration.  If your iterable
+provides a <tt class="docutils literal"><span class="pre">__len__</span></tt> method, <tt class="docutils literal"><span class="pre">loop</span></tt> also provides access to
+a count of iterations remaining at <tt class="docutils literal"><span class="pre">loop.reverse_index</span></tt> and <tt class="docutils literal"><span class="pre">loop.last</span></tt>,
+a bool indicating whether the loop is on its last iteration; accessing these
+without <tt class="docutils literal"><span class="pre">__len__</span></tt> will raise a <tt class="docutils literal"><span class="pre">TypeError</span></tt>.</p>
+</div>
+<div class="section" id="cycling">
+<h3>Cycling<a class="headerlink" href="#cycling" title="Permalink to this headline">¶</a></h3>
+<p>Cycling is available regardless of whether the iterable you’re using provides
+a <tt class="docutils literal"><span class="pre">__len__</span></tt> method.  Prior to Mako 0.7, you might have generated a simple
+zebra striped list using <tt class="docutils literal"><span class="pre">enumerate</span></tt>:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><ul></span>
+<span class="cp">%</span> <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">item</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">((</span><span class="s">'spam'</span><span class="p">,</span> <span class="s">'ham'</span><span class="p">,</span> <span class="s">'eggs'</span><span class="p">)):</span><span class="x"></span>
+<span class="x">  <li class="</span><span class="cp">${</span><span class="s">'odd'</span> <span class="k">if</span> <span class="n">i</span> <span class="o">%</span> <span class="mi">2</span> <span class="k">else</span> <span class="s">'even'</span><span class="cp">}</span><span class="x">"></span><span class="cp">${</span><span class="n">item</span><span class="cp">}</span><span class="x"></li></span>
+<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
+<span class="x"></ul></span>
+</pre></div>
+</div>
+<p>With <tt class="docutils literal"><span class="pre">loop.cycle</span></tt>, you get the same results with cleaner code and less prep work:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><ul></span>
+<span class="cp">%</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="p">(</span><span class="s">'spam'</span><span class="p">,</span> <span class="s">'ham'</span><span class="p">,</span> <span class="s">'eggs'</span><span class="p">):</span><span class="x"></span>
+<span class="x">  <li class="</span><span class="cp">${</span><span class="n">loop</span><span class="o">.</span><span class="n">cycle</span><span class="p">(</span><span class="s">'even'</span><span class="p">,</span> <span class="s">'odd'</span><span class="p">)</span><span class="cp">}</span><span class="x">"></span><span class="cp">${</span><span class="n">item</span><span class="cp">}</span><span class="x"></li></span>
+<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
+<span class="x"></ul></span>
+</pre></div>
+</div>
+<p>Both approaches produce output like the following:</p>
+<div class="highlight-html"><div class="highlight"><pre><span class="nt"><ul></span>
+  <span class="nt"><li</span> <span class="na">class=</span><span class="s">"even"</span><span class="nt">></span>spam<span class="nt"></li></span>
+  <span class="nt"><li</span> <span class="na">class=</span><span class="s">"odd"</span><span class="nt">></span>ham<span class="nt"></li></span>
+  <span class="nt"><li</span> <span class="na">class=</span><span class="s">"even"</span><span class="nt">></span>eggs<span class="nt"></li></span>
+<span class="nt"></ul></span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="parent-loops">
+<h3>Parent Loops<a class="headerlink" href="#parent-loops" title="Permalink to this headline">¶</a></h3>
+<p>Loop contexts can also be transparently nested, and the Mako runtime will do
+the right thing and manage the scope for you.  You can access the parent loop
+context through <tt class="docutils literal"><span class="pre">loop.parent</span></tt>.</p>
+<p>This allows you to reach all the way back up through the loop stack by
+chaining <tt class="docutils literal"><span class="pre">parent</span></tt> attribute accesses, i.e. <tt class="docutils literal"><span class="pre">loop.parent.parent....</span></tt> as
+long as the stack depth isn’t exceeded.  For example, you can use the parent
+loop to make a checkered table:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><table></span>
+<span class="cp">%</span> <span class="k">for</span> <span class="n">consonant</span> <span class="ow">in</span> <span class="s">'pbj'</span><span class="p">:</span><span class="x"></span>
+<span class="x">  <tr></span>
+  <span class="cp">%</span> <span class="k">for</span> <span class="n">vowel</span> <span class="ow">in</span> <span class="s">'iou'</span><span class="p">:</span><span class="x"></span>
+<span class="x">    <td class="</span><span class="cp">${</span><span class="s">'black'</span> <span class="k">if</span> <span class="p">(</span><span class="n">loop</span><span class="o">.</span><span class="n">parent</span><span class="o">.</span><span class="n">even</span> <span class="o">==</span> <span class="n">loop</span><span class="o">.</span><span class="n">even</span><span class="p">)</span> <span class="k">else</span> <span class="s">'red'</span><span class="cp">}</span><span class="x">"></span>
+<span class="x">      </span><span class="cp">${</span><span class="n">consonant</span> <span class="o">+</span> <span class="n">vowel</span><span class="cp">}</span><span class="x">t</span>
+<span class="x">    </td></span>
+  <span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
+<span class="x">  </tr></span>
+<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
+<span class="x"></table></span>
+</pre></div>
+</div>
+<div class="highlight-html"><div class="highlight"><pre><span class="nt"><table></span>
+  <span class="nt"><tr></span>
+    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"black"</span><span class="nt">></span>
+      pit
+    <span class="nt"></td></span>
+    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"red"</span><span class="nt">></span>
+      pot
+    <span class="nt"></td></span>
+    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"black"</span><span class="nt">></span>
+      put
+    <span class="nt"></td></span>
+  <span class="nt"></tr></span>
+  <span class="nt"><tr></span>
+    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"red"</span><span class="nt">></span>
+      bit
+    <span class="nt"></td></span>
+    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"black"</span><span class="nt">></span>
+      bot
+    <span class="nt"></td></span>
+    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"red"</span><span class="nt">></span>
+      but
+    <span class="nt"></td></span>
+  <span class="nt"></tr></span>
+  <span class="nt"><tr></span>
+    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"black"</span><span class="nt">></span>
+      jit
+    <span class="nt"></td></span>
+    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"red"</span><span class="nt">></span>
+      jot
+    <span class="nt"></td></span>
+    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"black"</span><span class="nt">></span>
+      jut
+    <span class="nt"></td></span>
+  <span class="nt"></tr></span>
+<span class="nt"></table></span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="migrating-legacy-templates-that-use-the-word-loop">
+<span id="migrating-loop"></span><h3>Migrating Legacy Templates that Use the Word “loop”<a class="headerlink" href="#migrating-legacy-templates-that-use-the-word-loop" title="Permalink to this headline">¶</a></h3>
+<p class="versionchanged">
+<span class="versionmodified">Changed in version 0.7: </span>The <tt class="docutils literal"><span class="pre">loop</span></tt> name is now <a class="reference internal" href="#reserved-names"><em>reserved</em></a> in Mako,
+which means a template that refers to a variable named <tt class="docutils literal"><span class="pre">loop</span></tt>
+won’t function correctly when used in Mako 0.7.</p>
+<p>To ease the transition for such systems, the feature can be disabled across the board for
+all templates, then re-enabled on a per-template basis for those templates which wish
+to make use of the new system.</p>
+<p>First, the <tt class="docutils literal"><span class="pre">enable_loop=False</span></tt> flag is passed to either the <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>
+or <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object in use:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">lookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/docs'</span><span class="p">],</span> <span class="n">enable_loop</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>or:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">template</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"some template"</span><span class="p">,</span> <span class="n">enable_loop</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>An individual template can make usage of the feature when <tt class="docutils literal"><span class="pre">enable_loop</span></tt> is set to
+<tt class="docutils literal"><span class="pre">False</span></tt> by switching it back on within the <tt class="docutils literal"><span class="pre"><%page></span></tt> tag:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">enable_loop=</span><span class="s">"True"</span><span class="cp">/></span>
+
+<span class="cp">%</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">collection</span><span class="p">:</span><span class="x"></span>
+<span class="x">    </span><span class="cp">${</span><span class="n">i</span><span class="cp">}</span><span class="x"> </span><span class="cp">${</span><span class="n">loop</span><span class="o">.</span><span class="n">index</span><span class="cp">}</span>
+<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
+</pre></div>
+</div>
+<p>Using the above scheme, it’s safe to pass the name <tt class="docutils literal"><span class="pre">loop</span></tt> to the <a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">Template.render()</span></tt></a>
+method as well as to freely make usage of a variable named <tt class="docutils literal"><span class="pre">loop</span></tt> within a template, provided
+the <tt class="docutils literal"><span class="pre"><%page></span></tt> tag doesn’t override it.  New templates that want to use the <tt class="docutils literal"><span class="pre">loop</span></tt> context
+can then set up <tt class="docutils literal"><span class="pre"><%page</span> <span class="pre">enable_loop="True"/></span></tt> to use the new feature without affecting
+old templates.</p>
+</div>
+</div>
+<div class="section" id="all-the-built-in-names">
+<h2>All the Built-in Names<a class="headerlink" href="#all-the-built-in-names" title="Permalink to this headline">¶</a></h2>
+<p>A one-stop shop for all the names Mako defines. Most of these
+names are instances of <a class="reference internal" href="namespaces.html#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>, which are described
+in the next section, <a class="reference internal" href="namespaces.html"><em>Namespaces</em></a>. Also, most of
+these names other than <tt class="docutils literal"><span class="pre">context</span></tt>, <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt>, and <tt class="docutils literal"><span class="pre">loop</span></tt> are
+also present <em>within</em> the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> itself.   The names
+<tt class="docutils literal"><span class="pre">context</span></tt>, <tt class="docutils literal"><span class="pre">loop</span></tt> and <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> themselves can’t be passed
+to the context and can’t be substituted – see the section <a class="reference internal" href="#reserved-names"><em>Reserved Names</em></a>.</p>
+<ul class="simple">
+<li><tt class="docutils literal"><span class="pre">context</span></tt> - this is the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object, introduced
+at <a class="reference internal" href="#context"><em>Context</em></a>.</li>
+<li><tt class="docutils literal"><span class="pre">local</span></tt> - the namespace of the current template, described
+in <a class="reference internal" href="namespaces.html#namespaces-builtin"><em>Built-in Namespaces</em></a>.</li>
+<li><tt class="docutils literal"><span class="pre">self</span></tt> - the namespace of the topmost template in an
+inheritance chain (if any, otherwise the same as <tt class="docutils literal"><span class="pre">local</span></tt>),
+mostly described in <a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</li>
+<li><tt class="docutils literal"><span class="pre">parent</span></tt> - the namespace of the parent template in an
+inheritance chain (otherwise undefined); see
+<a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</li>
+<li><tt class="docutils literal"><span class="pre">next</span></tt> - the namespace of the next template in an
+inheritance chain (otherwise undefined); see
+<a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</li>
+<li><tt class="docutils literal"><span class="pre">caller</span></tt> - a “mini” namespace created when using the
+<tt class="docutils literal"><span class="pre"><%call></span></tt> tag to define a “def call with content”; described
+in <a class="reference internal" href="defs.html#defs-with-content"><em>Calling a Def with Embedded Content and/or Other Defs</em></a>.</li>
+<li><tt class="docutils literal"><span class="pre">loop</span></tt> - this provides access to <a class="reference internal" href="#mako.runtime.LoopContext" title="mako.runtime.LoopContext"><tt class="xref py py-class docutils literal"><span class="pre">LoopContext</span></tt></a> objects when
+they are requested within <tt class="docutils literal"><span class="pre">%</span> <span class="pre">for</span></tt> loops, introduced at <a class="reference internal" href="#loop-context"><em>The Loop Context</em></a>.</li>
+<li><tt class="docutils literal"><span class="pre">capture</span></tt> - a function that calls a given def and captures
+its resulting content into a string, which is returned. Usage
+is described in <a class="reference internal" href="filtering.html"><em>Filtering and Buffering</em></a>.</li>
+<li><tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> - a global singleton that is applied to all
+otherwise uninitialized template variables that were not
+located within the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> when rendering began,
+unless the <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> flag <tt class="docutils literal"><span class="pre">strict_undefined</span></tt>
+is set to <tt class="docutils literal"><span class="pre">True</span></tt>. <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> is
+an instance of <a class="reference internal" href="#mako.runtime.Undefined" title="mako.runtime.Undefined"><tt class="xref py py-class docutils literal"><span class="pre">Undefined</span></tt></a>, and raises an
+exception when its <tt class="docutils literal"><span class="pre">__str__()</span></tt> method is called.</li>
+<li><tt class="docutils literal"><span class="pre">pageargs</span></tt> - this is a dictionary which is present in a
+template which does not define any <tt class="docutils literal"><span class="pre">**kwargs</span></tt> section in its
+<tt class="docutils literal"><span class="pre"><%page></span></tt> tag. All keyword arguments sent to the <tt class="docutils literal"><span class="pre">body()</span></tt>
+function of a template (when used via namespaces) go here by
+default unless otherwise defined as a page argument. If this
+makes no sense, it shouldn’t; read the section
+<a class="reference internal" href="namespaces.html#namespaces-body"><em>The body() Method</em></a>.</li>
+</ul>
+<div class="section" id="reserved-names">
+<span id="id2"></span><h3>Reserved Names<a class="headerlink" href="#reserved-names" title="Permalink to this headline">¶</a></h3>
+<p>Mako has a few names that are considered to be “reserved” and can’t be used
+as variable names.</p>
+<p class="versionchanged">
+<span class="versionmodified">Changed in version 0.7: </span>Mako raises an error if these words are found passed to the template
+as context arguments, whereas in previous versions they’d be silently
+ignored or lead to other error messages.</p>
+<ul class="simple">
+<li><tt class="docutils literal"><span class="pre">context</span></tt> - see <a class="reference internal" href="#context"><em>Context</em></a>.</li>
+<li><tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> - see <a class="reference internal" href="#context-vars"><em>Context Variables</em></a>.</li>
+<li><tt class="docutils literal"><span class="pre">loop</span></tt> - see <a class="reference internal" href="#loop-context"><em>The Loop Context</em></a>.  Note this can be disabled for legacy templates
+via the <tt class="docutils literal"><span class="pre">enable_loop=False</span></tt> argument; see <a class="reference internal" href="#migrating-loop"><em>Migrating Legacy Templates that Use the Word “loop”</em></a>.</li>
+</ul>
+</div>
+</div>
+<div class="section" id="api-reference">
+<h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="mako.runtime.Context">
+<em class="property">class </em><tt class="descclassname">mako.runtime.</tt><tt class="descname">Context</tt><big>(</big><em>buffer</em>, <em>**data</em><big>)</big><a class="headerlink" href="#mako.runtime.Context" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
+<p>Provides runtime namespace, output buffer, and various
+callstacks for templates.</p>
+<p>See <a class="reference internal" href="#"><em>The Mako Runtime Environment</em></a> for detail on the usage of
+<a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
+<dl class="method">
+<dt id="mako.runtime.Context.get">
+<tt class="descname">get</tt><big>(</big><em>key</em>, <em>default=None</em><big>)</big><a class="headerlink" href="#mako.runtime.Context.get" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a value from this <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.runtime.Context.keys">
+<tt class="descname">keys</tt><big>(</big><big>)</big><a class="headerlink" href="#mako.runtime.Context.keys" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a list of all names established in this <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="mako.runtime.Context.kwargs">
+<tt class="descname">kwargs</tt><a class="headerlink" href="#mako.runtime.Context.kwargs" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return the dictionary of keyword arguments associated with this
+<a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.runtime.Context.locals_">
+<tt class="descname">locals_</tt><big>(</big><em>d</em><big>)</big><a class="headerlink" href="#mako.runtime.Context.locals_" title="Permalink to this definition">¶</a></dt>
+<dd><p>Create a new <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> with a copy of this
+<a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>‘s current state, updated with the given dictionary.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="mako.runtime.Context.lookup">
+<tt class="descname">lookup</tt><a class="headerlink" href="#mako.runtime.Context.lookup" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return the <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> associated
+with this <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.runtime.Context.pop_caller">
+<tt class="descname">pop_caller</tt><big>(</big><big>)</big><a class="headerlink" href="#mako.runtime.Context.pop_caller" title="Permalink to this definition">¶</a></dt>
+<dd><p>Pop a <tt class="docutils literal"><span class="pre">caller</span></tt> callable onto the callstack for this
+<a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.runtime.Context.push_caller">
+<tt class="descname">push_caller</tt><big>(</big><em>caller</em><big>)</big><a class="headerlink" href="#mako.runtime.Context.push_caller" title="Permalink to this definition">¶</a></dt>
+<dd><p>Push a <tt class="docutils literal"><span class="pre">caller</span></tt> callable onto the callstack for
+this <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.runtime.Context.write">
+<tt class="descname">write</tt><big>(</big><em>string</em><big>)</big><a class="headerlink" href="#mako.runtime.Context.write" title="Permalink to this definition">¶</a></dt>
+<dd><p>Write a string to this <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object’s
+underlying output buffer.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.runtime.Context.writer">
+<tt class="descname">writer</tt><big>(</big><big>)</big><a class="headerlink" href="#mako.runtime.Context.writer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return the current writer function.</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="mako.runtime.LoopContext">
+<em class="property">class </em><tt class="descclassname">mako.runtime.</tt><tt class="descname">LoopContext</tt><big>(</big><em>iterable</em><big>)</big><a class="headerlink" href="#mako.runtime.LoopContext" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
+<p>A magic loop variable.
+Automatically accessible in any <tt class="docutils literal"><span class="pre">%</span> <span class="pre">for</span></tt> block.</p>
+<p>See the section <a class="reference internal" href="#loop-context"><em>The Loop Context</em></a> for usage
+notes.</p>
+<dl class="docutils">
+<dt><tt class="xref py py-attr docutils literal"><span class="pre">parent</span></tt> -> <a class="reference internal" href="#mako.runtime.LoopContext" title="mako.runtime.LoopContext"><tt class="xref py py-class docutils literal"><span class="pre">LoopContext</span></tt></a> or <tt class="docutils literal"><span class="pre">None</span></tt></dt>
+<dd>The parent loop, if one exists.</dd>
+<dt><tt class="xref py py-attr docutils literal"><span class="pre">index</span></tt> -> <cite>int</cite></dt>
+<dd>The 0-based iteration count.</dd>
+<dt><tt class="xref py py-attr docutils literal"><span class="pre">reverse_index</span></tt> -> <cite>int</cite></dt>
+<dd>The number of iterations remaining.</dd>
+<dt><tt class="xref py py-attr docutils literal"><span class="pre">first</span></tt> -> <cite>bool</cite></dt>
+<dd><tt class="docutils literal"><span class="pre">True</span></tt> on the first iteration, <tt class="docutils literal"><span class="pre">False</span></tt> otherwise.</dd>
+<dt><tt class="xref py py-attr docutils literal"><span class="pre">last</span></tt> -> <cite>bool</cite></dt>
+<dd><tt class="docutils literal"><span class="pre">True</span></tt> on the last iteration, <tt class="docutils literal"><span class="pre">False</span></tt> otherwise.</dd>
+<dt><tt class="xref py py-attr docutils literal"><span class="pre">even</span></tt> -> <cite>bool</cite></dt>
+<dd><tt class="docutils literal"><span class="pre">True</span></tt> when <tt class="docutils literal"><span class="pre">index</span></tt> is even.</dd>
+<dt><tt class="xref py py-attr docutils literal"><span class="pre">odd</span></tt> -> <cite>bool</cite></dt>
+<dd><tt class="docutils literal"><span class="pre">True</span></tt> when <tt class="docutils literal"><span class="pre">index</span></tt> is odd.</dd>
+</dl>
+<dl class="method">
+<dt id="mako.runtime.LoopContext.cycle">
+<tt class="descname">cycle</tt><big>(</big><em>*values</em><big>)</big><a class="headerlink" href="#mako.runtime.LoopContext.cycle" title="Permalink to this definition">¶</a></dt>
+<dd><p>Cycle through values as the loop progresses.</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="mako.runtime.Undefined">
+<em class="property">class </em><tt class="descclassname">mako.runtime.</tt><tt class="descname">Undefined</tt><a class="headerlink" href="#mako.runtime.Undefined" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
+<p>Represents an undefined value in a template.</p>
+<p>All template modules have a constant value
+<tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> present which is an instance of this
+object.</p>
+</dd></dl>
+
+</div>
+</div>
+
+    </div>
+
+</div>
+
+<div id="docs-bottom-navigation" class="docs-navigation-links">
+        Previous:
+        <a href="defs.html" title="previous chapter">Defs and Blocks</a>
+        Next:
+        <a href="namespaces.html" title="next chapter">Namespaces</a>
+
+    <div id="docs-copyright">
+        © Copyright the Mako authors and contributors.
+        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
+        with Mako templates.
+    </div>
+</div>
+
+</div>
+
+<div class="clearfix">
+
+<hr/>
+
+<div class="copyright">Website content copyright © by Michael Bayer.
+    All rights reserved.  Mako and its documentation are licensed
+    under the MIT license.  mike(&)zzzcomputing.com</div>
+
+</div>
+</div>
+</body>
+</html>
diff --git a/lib/Mako-0.7.3/doc/search.html b/lib/Mako-0.7.3/doc/search.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/search.html
@@ -0,0 +1,162 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<head>
+<title>
+    
+    Search
+ — 
+    Mako 0.7.3 Documentation
+</title>
+
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
+
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+          URL_ROOT:    '#',
+          VERSION:     '0.7.3',
+          COLLAPSE_MODINDEX: false,
+          FILE_SUFFIX: '.html'
+      };
+    </script>
+        <script type="text/javascript" src="_static/jquery.js"></script>
+        <script type="text/javascript" src="_static/underscore.js"></script>
+        <script type="text/javascript" src="_static/doctools.js"></script>
+        <script type="text/javascript" src="_static/searchtools.js"></script>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="#" />
+    <link rel="top" title="Mako 0.7.3 Documentation" href="index.html" />
+
+<link rel="stylesheet" href="_static/site.css"></link>
+
+
+</head>
+<body>
+    <div id="wrap">
+    <div class="rightbar">
+
+
+    <div class="slogan">
+    Hyperfast and lightweight templating for the Python platform.
+    </div>
+
+
+    </div>
+
+    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
+
+    <hr/>
+
+    
+
+
+
+
+
+
+
+
+
+<div id="docs-container">
+
+
+
+<div id="docs-header">
+    <h1>Mako 0.7.3 Documentation</h1>
+
+    <div id="docs-search">
+    Search:
+    <form class="search" action="#" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </div>
+
+    <div id="docs-version-header">
+        Release: <span class="version-num">0.7.3</span>
+
+    </div>
+
+</div>
+
+<div id="docs-top-navigation">
+    <div id="docs-top-page-control" class="docs-navigation-links">
+        <ul>
+
+        <li>
+            <a href="index.html">Table of Contents</a> |
+            <a href="genindex.html">Index</a>
+        </li>
+        </ul>
+    </div>
+
+    <div id="docs-navigation-banner">
+        <a href="index.html">Mako 0.7.3 Documentation</a>
+        » 
+    Search
+ 
+
+        <h2>
+            
+    Search
+
+        </h2>
+    </div>
+
+</div>
+
+<div id="docs-body-container">
+
+
+    <div id="docs-body" class="" >
+        
+
+
+
+
+
+<div id="searchform">
+<h3>Enter Search Terms:</h3>
+<form class="search" action="#" method="get">
+  <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+  <input type="hidden" name="check_keywords" value="yes" />
+  <input type="hidden" name="area" value="default" />
+</form>
+</div>
+
+<div id="search-results"></div>
+
+
+
+    </div>
+
+</div>
+
+<div id="docs-bottom-navigation" class="docs-navigation-links">
+
+    <div id="docs-copyright">
+        © Copyright the Mako authors and contributors.
+        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
+        with Mako templates.
+    </div>
+</div>
+
+</div>
+
+<div class="clearfix">
+
+    
+<hr/>
+
+<div class="copyright">Website content copyright © by Michael Bayer.
+    All rights reserved.  Mako and its documentation are licensed
+    under the MIT license.  mike(&)zzzcomputing.com</div>
+
+    <script type="text/javascript" src="searchindex.js"></script>
+
+</div>
+</div>
+</body>
+</html>
diff --git a/lib/Mako-0.7.3/doc/searchindex.js b/lib/Mako-0.7.3/doc/searchindex.js
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/searchindex.js
@@ -0,0 +1,1 @@
+Search.setIndex({objects:{RichTraceback:{records:[8,0,1,""],reverse_traceback:[8,0,1,""],source:[8,0,1,""],lineno:[8,0,1,""],reverse_records:[8,0,1,""],error:[8,0,1,""],message:[8,0,1,""]},"mako.exceptions":{text_error_template:[8,3,1,""],RichTraceback:[8,2,1,""],html_error_template:[8,3,1,""]},"mako.lookup.TemplateLookup":{put_template:[8,1,1,""],get_template:[8,1,1,""],put_string:[8,1,1,""],adjust_uri:[8,1,1,""],filename_to_uri:[8,1,1,""]},"mako.runtime.Context":{write:[9,1,1,""],get:[9,1,1,""],keys:[9,1,1,""],push_caller:[9,1,1,""],writer:[9,1,1,""],pop_caller:[9,1,1,""],locals_:[9,1,1,""],lookup:[9,0,1,""],kwargs:[9,0,1,""]},"mako.lookup.TemplateCollection":{get_template:[8,1,1,""],adjust_uri:[8,1,1,""],has_template:[8,1,1,""],filename_to_uri:[8,1,1,""]},"mako.runtime.ModuleNamespace":{filename:[3,0,1,""]},"mako.cache.CacheImpl":{invalidate:[6,1,1,""],get_or_create:[6,1,1,""],pass_context:[6,0,1,""],set:[6,1,1,""],get:[6,1,1,""]},"mako.runtime.LoopContext":{cycle:[9,1,1,""]},"mako.cache":{register_plugin:[6,3,1,""],CacheImpl:[6,2,1,""],Cache:[6,2,1,""]},"mako.runtime.Namespace":{include_file:[3,1,1,""],template:[3,0,1,""],get_cached:[3,1,1,""],get_namespace:[3,1,1,""],cache:[3,0,1,""],uri:[3,0,1,""],module:[3,0,1,""],filename:[3,0,1,""],context:[3,0,1,""],get_template:[3,1,1,""],attr:[3,0,1,""]},"mako.lookup":{TemplateLookup:[8,2,1,""],TemplateCollection:[8,2,1,""]},"mako.runtime.TemplateNamespace":{uri:[3,0,1,""],module:[3,0,1,""],filename:[3,0,1,""]},"mako.runtime":{capture:[3,3,1,""],Undefined:[9,2,1,""],Namespace:[3,2,1,""],ModuleNamespace:[3,2,1,""],supports_caller:[3,3,1,""],Context:[9,2,1,""],LoopContext:[9,2,1,""],TemplateNamespace:[3,2,1,""]},"mako.ext.beaker_cache":{BeakerCacheImpl:[6,2,1,""]},"mako.cache.Cache":{invalidate:[6,1,1,""],set:[6,1,1,""],invalidate_body:[6,1,1,""],get:[6,1,1,""],invalidate_closure:[6,1,1,""],invalidate_def:[6,1,1,""],starttime:[6,0,1,""],put:[6,1,1,""],get_or_create:[6,1,1,""],id:[6,0,1,""],impl:[6,0,1,""]},"mako.template.Template":{render_context:[8,1,1,""],code:[8,0,1,""],render:[8,1,1,""],source:[8,0,1,""],render_unicode:[8,1,1,""],get_def:[8,1,1,""]},"mako.template":{DefTemplate:[8,2,1,""],Template:[8,2,1,""]}},terms:{interchang:4,four:[3,5],prefix:[6,9],dirnam:8,"_my_cache_work":6,typeerror:9,swap:6,under:[8,6,7],everi:[3,5],long_term:6,jack:8,voix:7,appar:[2,3],vast:7,pagearg:[0,9,3,7],get_templ:[8,6,3,7],buildtabl:0,cache_kei:6,direct:[0,8,6,3,5],batch:2,outputpath:8,second:[0,6,2],even:[5,9,7,4],"new":[0,8,9,6,4],ever:[3,7],metadata:5,widget:0,behavior:[8,2,9],here:[2,7,4,5,6,3,8,9],met:0,path:[8,6,3],interpret:[0,8,7],tagfilt:2,portabl:0,txt:[8,7,5],describ:[0,2,3,4,5,7,8,9],would:[0,2,4,6,7,8,9],call:[0,1,2,3,4,5,6,7,8,9],recommend:3,type:[0,5,6,7,8,9],until:8,relat:[8,6,7],notic:0,pkg_resourc:6,must:[0,8,6,3,7],join:7,setup:[8,6,4],work:[0,2,7,4,6,3,8,9],root:8,overrid:[7,4,6,3,8,9],give:[0,3],indic:[1,9,5],somefil:3,do_something_speci:6,want:[0,2,7,4,5,3,6,9],end:[5,2,4],quot:7,ordinari:3,output_encod:[8,7],how:[0,5,6,3,8,9],cheetah:7,updat:[8,9],module_filenam:8,recogn:[3,4],lai:0,after:[8,6,2,3,9],befor:[2,7,4,5,6,3,8],attempt:7,third:6,recompil:[8,6],maintain:[8,6],environ:[8,1,2,9,5],exclus:8,order:[8,6,5,7,4],origin:[2,7,6,3,8,9],somedata:0,over:[2,3,9],fall:6,becaus:[0,2,7,4],demarc:0,affect:9,flexibl:[5,2,4],myfil:5,streamlin:4,fix:[8,6,3],"__class__":8,better:[6,9],persist:6,easier:6,them:[0,2,4,3,8,9],thei:[0,2,4,5,7,8,9],safe:[9,7],default_filt:[8,2,7],jinja2:[0,5],html_error_templ:8,getvalu:[8,2],myghti:7,timeout:6,each:[0,4,5,6,7,8,9],side:[0,2,5],mean:[0,2,7,5,6,3,8,9],enorm:0,cacheimpl:[8,6],extract:8,expression_filt:2,unbound:8,goe:5,newli:6,content:[0,1,2,4,5,6,3,8,9],sane:0,mypackag:2,multilin:5,bottommost:4,free:3,standard:[6,7],argument:[0,1,2,3,5,6,7,8,9],traceback:8,moment:8,filter:[0,1,2,5,7,8,9],heck:[8,1,7],isn:9,text_error_templ:8,onto:[9,5],user:[8,6,9,7,5],rang:[0,5],render:[0,1,2,3,4,5,6,7,8,9],restrict:[0,4],unlik:7,alreadi:[8,9,4],wrapper:2,wasn:[9,4],agre:4,primari:8,lister:0,top:[0,2,4,3,6,9],sometim:[5,4],stack:[8,2,9],cache_region:6,too:[2,4],similarli:[0,7],john:0,consol:7,conson:9,namespac:[0,1,2,4,5,6,3,8,9],tool:6,setuptool:[8,6],somewhat:[0,2],some_namespac:3,myfilt:2,target:[0,2],keyword:[0,7,4,5,3,8,9],provid:[0,2,4,5,6,3,8,9],expr:[0,3],project:8,matter:4,minut:6,thu:8,mini:9,fashion:6,close:[0,8,3,5],runner:8,modern:6,htmlentityreplac:8,raw:[8,7],manner:2,templatelookup:[1,2,7,6,3,8,9],minu:6,latter:7,shall:4,usernam:[0,5],object:[0,2,3,4,5,6,7,8,9],regular:[0,1,2,3,4,5,7,8],phase:8,invalidate_closur:6,simplic:2,paradigm:4,don:[0,6,9,7,4],doc:[0,8,9,7,5],flow:5,doe:[0,7,4,5,3,9],declar:[0,1,2,4,5,3,8],tracelin:8,notion:9,opposit:4,"__str__":9,syntax:[0,1,2,8,5],get_resourc:5,involv:4,absolut:[0,7],layout:[0,8,4],acquir:[6,7],configur:[8,6,3,4],stop:[9,5],report:8,bar:[0,2,5,3,8,9],emb:[3,7,5],reload:8,short_term:6,black:9,elimin:7,result:[0,8,2,9,5],respons:[6,9,4],basemost:4,awar:[8,9,7],databas:0,urllib:2,implicit:[6,9],simplest:5,pybabel:8,awai:4,approach:[9,7,4],attribut:[0,1,2,4,5,6,3,8,9],preprocessor:8,easi:[2,9],howev:[0,6,3,7,4],against:[8,5],facet:9,logic:2,col:0,dogpil:6,guid:8,assum:[8,7],templatenamespac:3,three:[9,5],been:[8,6,2,3,7],accumul:5,much:[0,5,7,4],basic:[0,1,7,5,3,8],"__len__":9,quickli:7,disable_unicod:[8,2,7],ani:[0,2,3,4,5,6,7,8,9],multithread:6,lift:4,ident:8,servic:[6,7,5],properti:[8,3],calcul:8,printabl:7,kwarg:[8,6,9,3],somekei:6,sever:3,mako:[0,1,2,3,4,5,6,7,8,9],quand:7,perform:[8,2,3,7],make:[0,2,3,4,5,6,7,8,9],transpar:9,push_cal:9,complet:[8,3,4],rais:[0,8,9,7],caller_stack:[3,7],scenario:[0,8,9,3],get_cach:3,hypothet:4,inherit:[0,1,4,5,6,3,8,9],thi:[0,2,3,4,5,6,7,8,9],endif:[0,9,5],programm:7,everyth:9,pagecontrol:0,left:[8,2],identifi:[8,6],just:[0,2,3,4,5,7,8,9],invalidate_bodi:6,unbuff:2,yet:[6,3],languag:[0,7,5],previous:[8,3],enable_loop:[8,9],pygmentplugin:8,ham:9,ell:7,had:7,input_encod:[8,7],board:9,els:[8,6,9,5],gave:8,opt:[8,6],applic:[8,2,9,5],mayb:4,background:7,specif:[0,2,4,5,6,3,8,9],arbitrari:[6,5],manual:8,babelplugin:8,underli:[0,2,4,5,6,3,8,9],right:[0,2,9,7,5],old:9,deal:[9,7,5],excerpt:8,maxim:[6,7],percentag:8,intern:[8,6,2,7,9],subclass:[0,8,6],track:9,condit:[0,5,4],foo:[0,2,7,5,3,8,9],plu:8,bold:2,relationship:3,post:[0,8],"super":[6,3,7,4],plug:6,slightli:[3,7],surround:5,produc:[0,1,2,4,5,7,8,9],rudiment:[8,6],encod:[8,1,2,7],down:[6,7],lieu:8,wrap:[0,1,5,4],storag:7,accordingli:8,wai:[0,1,2,3,4,5,6,7,8,9],support:[0,7,5,6,3,8],transform:2,why:9,avail:[0,2,3,4,5,6,7,8,9],overhead:7,head:[0,8,4],form:[0,3,5],offer:[7,5],forc:8,get_def:[0,8,2],taken:[8,6,3],"true":[0,2,7,5,6,3,8,9],attr:[3,4],tell:5,emit:5,trim:[2,5],featur:[5,9,4],classic:[3,5],petit:7,"abstract":8,exist:[0,7,5,6,3,8,9],check:[8,5,9,7,4],when:[0,2,3,4,5,6,7,8,9],entrypoint:6,intend:[2,3],stringio:[8,9,7],intent:2,consid:[8,9],receiv:[0,2,3,5],faster:7,cache_en:[8,6],htdoc:8,ignor:[9,5],time:[0,1,2,4,6,8],push:9,serious:4,backward:6,concept:[0,8,5],chain:[5,9,3,4],skip:8,consum:[6,5],signific:[9,5],subcompon:0,row:0,decid:[9,5],middl:[5,2,4],depend:[8,5],mainlayout:[0,4],intermedi:4,decis:[9,7,4],sourc:[8,7,5],string:[2,7,5,6,3,8,9],word:[8,9,4],level:[0,1,2,3,4,5,6,7,8,9],did:4,iter:[0,9],item:[0,9,5],mycomp:6,quick:[0,5],lever:7,div:[0,8,3,4],dir:[8,6],slower:7,sign:5,namepacenam:0,appear:[2,9,5],current:[0,4,5,3,8,9],deriv:[6,2,7],gener:[0,2,3,4,5,6,7,8,9],address:[8,6],along:[6,3],toolbar:[5,4],bot:9,behav:0,commonli:[6,7,4],semant:[0,4],regardless:[0,9,4],extra:[5,4],modul:[0,1,2,3,4,5,6,7,8,9],prefer:7,render_bodi:[8,2,7,9],fake:5,marker:5,instal:6,callstack:9,memori:[8,6,5],sake:2,perl:5,live:6,handler:8,scope:[0,4,5,3,6,9],prep:9,chapter:[0,1,2,4,7,8],afford:8,accept:[2,7,5,6,3,8],render_:9,myexpress:2,mylookup:[8,7],fly:7,graphic:7,uniqu:[6,9,4],whatev:[8,9,3,7],purpos:[8,7],stream:[8,9,3,7,5],backslash:5,occur:[0,8,6],alwai:[0,9,7,4],differenti:9,multipl:[0,1,6,7,4],get:[2,7,4,5,6,3,8,9],modulenam:6,write:[2,7,5,6,3,8,9],pure:[3,7,5],cache_xyz:6,somevalu:6,map:8,product:8,usabl:0,mai:[2,7,5,6,3,8,9],data:[0,7,6,3,8,9],goal:2,practic:4,explicit:[0,7,5,3,6,9],format_except:8,inform:[8,3,7,5],"switch":9,preced:[8,5,3,7,4],combin:9,callabl:[0,2,5,6,3,8,9],extractor:8,still:[0,7,4],mainli:3,dynam:5,entiti:2,conjunct:8,group:[6,3],platform:8,jit:9,push_buff:2,main:[0,2,7,4,3,8,9],non:[8,9,7,5],recal:4,francoi:8,contriv:8,supersed:6,initi:0,underneath:6,therebi:3,now:[5,9,7,4],pop_fram:7,term:6,name:[0,1,2,3,4,5,6,7,8,9],drop:5,separ:[0,6,2,4],"__str":7,compil:[8,6,9,5],replac:[8,6,2,7],individu:[0,8,9,6],arg3:3,arg4:3,continu:[8,7,5],zebra:9,happen:[9,3,7],accomplish:[8,6],space:[0,6,5],intermix:4,correct:3,earlier:[6,7],migrat:[8,9],"byte":[8,7],care:[6,9,3,7],thing:[0,5,9,7,4],place:[0,8,5,6,4],think:9,first:[2,7,4,5,3,6,9],oper:[0,2,7,5,3,8,9],suspend:5,directli:[0,2,5,6,3,8],onc:[0,5,9,4],arrai:2,yourself:[8,7],walkthrough:0,textual:[8,2,4],custom:[0,2,7,5,6,3,8],open:[5,7,4],size:8,given:[0,2,4,6,3,8,9],silent:9,convent:0,caught:8,checker:9,necessarili:9,white:4,conveni:6,programat:8,copi:[9,3],specifi:[1,2,4,6,7,8,9],enclos:[0,9],mostli:[8,6,9,3],than:[2,4,5,7,6,9],serv:[8,7],"__m_local":7,were:[9,3,7],posit:3,seri:[8,6,7],pre:8,sai:[0,1,4,7,8,9],put_str:8,anywher:[0,5],deliv:[2,3],notimplementederror:8,techniqu:9,pop_cal:9,note:[0,2,7,4,6,3,8,9],take:[0,2,7,4,5,3],blunt:6,sure:5,trace:8,normal:[0,2,5,7,8,9],buffer:[1,2,7,5,3,8,9],subdef:0,synonym:[6,3],later:[6,5],highlight:8,templatenam:8,runtim:[1,2,4,5,6,3,8,9],preambl:8,shop:9,imaginez:7,delta:3,permiss:8,hack:9,xml:[8,2,5],onli:[0,2,4,5,6,7,8,9],explicitli:[8,9,3,7],state:[0,9,7],dict:7,overwritten:6,variou:[2,7,5,3,8,9],distinctli:4,dyn:3,tailor:0,requir:[0,6,3,7,5],where:[0,2,3,4,5,6,7,8,9],summari:5,wonder:5,nestabl:0,enumer:9,between:[0,9],"import":[0,2,7,5,6,3,8,9],across:[6,9],parent:[0,1,4,6,3,8,9],comp:3,cycl:9,my_dogpile_region:6,uncondition:7,come:[0,4,5,6,7,8],cache_url:[8,6],region:6,mani:[9,5],pow:5,pot:9,inspir:5,pop:[6,2,9],colon:[6,5],encoding_error:[8,7],ultim:[3,4],dessin:7,markedli:7,resolut:[8,3],those:[0,5,6,3,8,9],"case":[0,2,3,4,5,6,7,8,9],mouton:7,invok:[0,8,5,4],cannot:[0,8,7],invoc:4,advantag:[8,3,7,4],stdout:8,threadsaf:6,destin:8,shutil:8,ascii:7,"__init__":6,develop:7,author:9,same:[0,7,5,6,3,8,9],binari:7,epoch:6,html:[0,2,3,4,5,6,7,8],document:[8,6,5,7,4],breakdown:4,finish:4,utf8:[2,7],nest:[0,1,2,4,6,9],capabl:[8,6],vowel:9,improv:[8,7,5],extern:[0,6,4],moder:8,facad:6,without:[6,9,3,4],model:0,roughli:5,execut:[0,2,4,5,3,6,9],rest:[6,5,4],aspect:[7,5],speed:[2,7],versu:[8,3],except:[0,1,2,5,6,8,9],littl:[0,8,9],treatment:7,role:3,earli:[1,5],ream:7,around:[8,2,9],read:[9,7,5],moi:7,world:[0,7,5,3,8,9],use_pag:2,serve_templ:8,integ:[0,6,7],server:[8,6,5],either:[4,5,6,7,8,9],output:[0,1,2,3,4,5,7,8,9],manag:[6,9],somefunct:3,definit:[0,2,3,4],disait:7,inject:8,refer:[0,1,2,3,4,5,6,7,8,9],some_templ:8,power:5,garbag:6,pass_context:6,starttim:6,found:[0,9,5],"__name__":[8,6],"throw":[6,9],central:[0,2,9,5],act:[8,9],mytempl:[8,6,7],routin:8,overrod:4,strip:2,your:[0,2,4,5,3,9],msgstr:8,fast:8,her:7,area:[0,5,9,7,4],aren:[0,7],start:[0,6],compliant:7,interfac:6,lot:5,strictli:7,programmat:[0,1,2,7,6,9],tupl:8,regard:7,jut:9,illus:7,pull:[0,8,9,3],possibl:[0,6,2,9],"default":[0,2,3,4,5,6,7,8,9],unusu:8,embed:[0,8,9,3,5],creat:[0,7,5,6,3,8,9],multibyt:8,certain:[8,2,7],somedef:[0,6,2,3,5],intro:0,decreas:3,file:[0,1,3,4,5,6,7,8,9],again:[0,9],gettext:8,field:8,valid:5,you:[0,2,3,4,5,6,7,8,9],symbol:5,reduc:2,directori:[8,6,2,7,9],descript:8,mimic:8,potenti:4,escap:[0,1,2,7,5],represent:[8,5],all:[0,1,2,3,4,5,6,7,8,9],illustr:[8,2,4],scalar:3,abil:[8,6,7,5],follow:[0,4,5,3,8,9],program:[7,5],objnam:6,introduc:[0,5,9,3,4],sound:[5,4],"pla\u00eet":7,liter:[8,3,7],fals:[8,6,9],util:8,mechan:[6,5,4],failur:9,veri:[0,8,6,4],condition:3,list:[0,2,4,5,6,7,8,9],adjust:[8,3,5],small:8,pbj:9,aptli:8,design:2,nsname:5,pass:[0,7,4,5,6,3,8,9],further:5,what:[0,1,3,4,5,7,8,9],sub:[0,5],section:[0,4,6,3,8,9],advanc:8,abl:9,brief:8,version:[0,2,7,4,5,3,9],deepli:0,method:[0,1,2,3,4,5,6,7,8,9],contrast:[0,7,4],full:[8,5],themselv:[0,4,5,3,6,9],shouldn:9,inher:2,modifi:[0,8,7,4],valu:[0,2,7,5,6,3,8,9],search:[8,1],memcach:6,prior:[2,7,9],real:[8,5],render_mydef:9,via:[0,7,4,6,3,8,9],transit:9,ask:9,href:0,pythagorean:5,establish:[8,9],select:[7,4],mylib:5,distinct:8,regist:6,two:[0,2,3,4,5,6,7,8,9],push_fram:7,minor:8,more:[0,2,3,4,5,6,7,8,9],desir:[8,3,7],flag:[2,7,5,6,3,8,9],stick:[0,9,7,5],particular:[8,6,9,3,4],known:[0,3],cach:[0,1,2,5,6,3,8,9],none:[8,6,2,3,9],remain:[0,9],learn:7,def:[0,1,2,3,4,5,6,7,8,9],someobject:3,userbas:7,share:[0,9],templat:[0,1,2,3,4,5,6,7,8,9],sharp:0,wsgiutil:8,cours:9,newlin:[1,5],rather:9,anoth:[0,7,5,3,8,9],render_unicod:[8,7],simpl:[0,8,9,6,5],css:8,regener:8,resourc:[8,4],referenc:[0,9,3],variant:5,catalog:8,associ:[6,9],"short":6,footer:[5,4],confus:7,caus:[8,2,3,9],egg:9,help:[8,6,7],singleton:9,through:[8,9,7],paramet:[8,6,3,7],style:[0,7],might:[9,3,5],wouldn:[3,5],good:6,"return":[0,1,2,3,5,6,7,8,9],timestamp:6,framework:[8,1],ninja:4,achiev:[0,9,4],fulli:[8,2],unicod:[8,1,2,7],locals_:9,hard:[5,9,7,4],idea:[5,4],procedur:6,realli:7,expect:[0,5,7,4],beyond:[0,6],orient:[0,4],sometempl:6,lineno:8,print:[0,8,7],proxi:3,ast:7,guess:7,reason:[9,7],base:[1,2,4,5,6,3,8,9],put:[6,9,4],basi:[6,9],thrown:[8,6],thread:6,perhap:[0,9,5],assign:[0,8,9,5],major:[9,7],number:[0,8,9,6,5],done:[8,7],defnam:[0,5],blank:9,miss:[8,2,9],differ:[0,4,6,3,8,9],interact:[3,7],least:[8,3],calling_uri:3,statement:[0,8,5],natur:2,scheme:[0,8,9,7],store:[8,6,2,7,9],option:[7,5,6,3,8,9],modulenamespac:3,part:[6,9,3,4],pars:[8,7,5],kind:[2,4,5,6,7,8,9],whenev:[8,7,4],remot:[0,3],remov:[3,7],str:[8,2,7,9],arrang:5,toward:[0,4],grei:4,cleaner:9,mytmpl:8,get_namespac:3,comp2:3,packag:[6,5],comp1:3,expir:6,deftempl:[0,8],jour:7,built:[0,1,2,3,4,5,7,8,9],equival:[0,2,7,5,3,6],self:[0,4,5,6,3,8,9],undeclar:8,also:[0,2,3,4,5,6,7,8,9],build:[0,4],distribut:8,filesystem:[8,6,3],reach:[8,9],disgard:7,most:[0,7,4,5,6,3,8,9],plai:[3,7],jsp:5,ext:[8,6],fastencodingbuff:7,wsgi:8,particularli:3,find:[8,9,5],mydef:0,coerc:7,pretti:[7,5],writer:9,hit:[2,7],"__file__":3,express:[0,1,2,3,4,5,7,8,9],nativ:7,common:[8,1,7],set:[2,7,5,6,3,8,9],genshi:5,dump:[3,7],see:[0,7,5,6,3,8,9],dumb:7,arg:[0,2,5,6,3,8],reserv:9,whatsoev:7,someth:[0,2,7],topmost:[5,9,3,4],won:[8,9,4],altern:[8,9,7],signatur:[0,3],syntact:5,numer:5,popul:6,both:[0,2,4,7,8,9],last:[8,9],put_templ:8,alor:7,context:[0,1,2,3,5,6,7,8,9],whole:[0,2,3,4],load:[8,3,5],simpli:[2,4],bell:7,arbitrarili:0,header:[0,8,5,6,4],uniniti:9,param:5,suppli:[3,5],frobnizzl:5,throughout:3,backend:[6,3],empti:[2,7],accessor:[6,9,3,4],strategi:6,error_handl:8,imag:[8,7],great:[3,7],understand:7,func:3,xa9:7,look:[0,7,4,6,3,8,9],get_or_cr:6,straight:[8,7],histor:6,"while":[0,8,5,2,4],abov:[0,2,3,4,5,6,7,8,9],error:[0,8,9,7],anonym:[0,6,5],everyon:9,loop:[0,1,8,9,5],pylon:8,propag:[8,9,5],richtraceback:8,vou:7,itself:[0,2,3,4,5,6,7,8,9],decor:[1,2,3],minim:6,decod:[2,7],conflict:6,x80:7,wherea:[0,9,7,5],has_templ:8,stripe:9,pop_buff:2,typic:[8,6],recent:8,travers:3,task:6,older:0,cachemanag:6,entri:[8,6],somev:[9,3],elem:5,picki:7,endfor:[0,9,5],construct:[0,7,4,5,6,3,8],burden:7,sidebar:0,adjust_uri:8,msgid:8,theorem:5,input:[0,2,7],subsequ:6,format:[0,8,3,7,5],game:7,bit:[0,8,9],characterist:5,creation_funct:6,semi:6,whitespac:[0,2,5],resolv:8,collect:[8,6,9,3,7],"boolean":8,popular:8,encount:4,often:3,creation:[0,8,2,6],some:[0,2,3,4,5,6,7,8,9],back:[8,9,7,4],global:[0,6,9,3,4],understood:6,sampl:8,mirror:8,surpris:7,modulepath:6,though:[6,9,7,4],pep:7,per:[6,9,7,5],namespace_nam:3,substitut:[8,1,2,9,5],larg:4,slash:[3,5],leftmost:2,cgi:[2,7],buffer_filt:8,previou:[0,8,9,4],run:[8,9,3,7],namespacenam:[0,5],reverse_traceback:8,step:[0,8,7],loopcontext:9,from:[0,1,2,3,4,5,6,7,8,9],mynamespac:[3,5],exc_info:8,block:[0,1,2,4,5,6,9],within:[0,2,3,4,5,6,7,8,9],toplevelnotfound:8,ensur:[6,3,7],chang:[6,9,4],run_wsgi:8,span:[0,4],reverse_index:9,spam:9,bodi:[0,1,4,5,6,3,8,9],stylesheet:8,"long":[9,5],beaker_cach:6,includ:[0,5,6,3,8,9],suit:4,myfunc:5,properli:7,templatelookupexcept:8,link:8,translat:8,newer:[0,8],atom:8,line:[8,5,7,4],info:8,concaten:2,utf:[8,2,7],consist:5,caller:[0,2,3,9],my_tag:3,myescap:2,similar:[0,2,3,4,5,7,8,9],impl:6,constant:9,doesn:[0,9,3,4],repres:[0,5,6,7,8,9],modulename_cal:8,titl:[0,5,4],invalid:6,codec:[8,7],accountdata:0,draw:2,clean:[8,6],nightmar:7,bytestring_passthrough:8,xb4le:7,cache_typ:[8,6,5],depth:9,far:[8,5,7,4],hello:[0,8,3,7,5],code:[0,2,7,5,3,8,9],templatetext:[2,7],send:[2,7,4,3,8,9],sens:9,sent:[2,9,3,5],tri:[0,8,9],magic:[9,7],"try":[8,2,9,7,5],dealt:8,pleas:5,impli:8,cfg:8,odd:9,append:8,compat:[8,6,3],index:[1,4,5,3,8,9],compar:[8,7],xa9veil:7,access:[0,1,4,5,6,3,8,9],can:[0,2,3,4,5,6,7,8,9],len:5,closur:0,let:[0,8,9,4],becom:[8,3,7],sinc:[0,9,3,7,4],filesystem_check:8,convert:[8,6,7],convers:7,conceiv:9,ctx:8,implement:[0,8,6,4],appli:[0,2,7,5,3,8,9],approxim:8,mystuff:0,api:[1,2,6,3,8,9],immut:9,register_plugin:6,metaphor:4,commun:[0,9],next:[0,1,2,3,4,5,6,7,8,9],implic:7,few:9,trail:2,beakercacheimpl:6,account:0,retriev:6,augment:[0,1,4],obvious:4,control:[0,1,2,4,5,8,9],accountnam:0,process:[6,7,5],lock:6,slim:6,tag:[0,1,2,4,5,6,3,8,9],layoutdata:0,nari:7,instead:[0,2,7,4,3,8],templatecollect:8,overridden:[0,6,3,4],class_:4,tack:3,philosophi:9,callable_:[8,3],essenti:[6,3,7],correspond:[8,6,9,3,4],element:[0,8,9,7,5],issu:[0,8,7],allow:[0,2,3,4,5,6,7,8,9],elif:5,move:8,comma:[0,2],bunch:3,outer:0,chosen:6,myproj:8,bye:0,handl:[0,1,5,6,7,8,9],handi:3,"r\u00e9veill\u00e9":7,relativeto:8,somewher:[8,9,7],anyth:[0,7,4],nameerror:[8,9],mode:7,disregard:8,pygment:8,intellig:7,filehandl:7,our:[0,8,6,4],special:[8,6,2,9,5],out:[0,4,5,6,7,8],variabl:[0,4,5,3,8,9],contigu:5,categori:3,rel:[8,3],red:9,insid:[0,4,5,6,3,8],call_my_object:7,standalon:8,dictionari:[8,6,9,3],releas:[6,3,5],indent:5,xc3:7,could:4,lexer:[8,7,5],keep:0,outsid:[0,9,3,7,4],strict:8,system:[0,8,9,6,4],messag:[8,9],attach:3,"final":[2,7,4],cache_dir:[8,6],accompani:8,exactli:[0,4],filename_to_uri:8,structur:[1,9,5],charact:[8,7,5],simplecacheimpl:6,have:[0,2,3,4,5,6,7,8,9],tabl:[0,1,9],need:[0,7,4,6,3,8,9],turn:[2,7,4],babel:8,outward:8,builtin:7,best:5,which:[0,2,3,4,5,6,7,8,9],singl:[0,2,4,5,6,7,8],unless:[9,7],who:7,segment:7,"class":[0,7,4,6,3,8,9],url:[8,6,2,5],gather:7,request:[8,6,9],uri:[8,3,5],pipe:2,determin:[6,7],"_cach":6,fact:[0,7,4],render_context:8,dbm:6,text:[0,2,5,6,7,8,9],cache_timeout:[0,6],anywai:8,locat:[8,9,3,7],should:[8,6,9,3],suppos:[0,6],local:[0,2,5,6,3,8,9],meant:4,familiar:[0,5],bean:8,cache_:6,increas:8,cstringio:[8,7],enabl:[8,6,9,5],organ:[3,4],current_sect:5,stuff:[3,5],integr:[8,1,4],contain:[0,7,5,6,3,8],view:8,reverse_record:8,legaci:[8,9],collection_s:8,pinard:8,flip:0,bytestr:8,mako_modul:8,polymorph:5,correctli:9,pattern:8,written:[8,5,4],progress:9,neither:6,email:5,jot:9,kei:[8,6,9,3,7],module_directori:[8,6],tempfil:8,job:2,entir:[0,1,2,3,5,7,8],joe:5,cache_arg:[8,6],addit:[0,2,4,5,6,3,8],plugin:[6,1],etc:[0,8,9,6,5],instanc:[8,9,3,5],freeli:9,comment:[8,1,7,5],guidelin:6,mako_cach:6,respect:5,addition:[8,7,4],compon:[6,9,3],include_fil:3,treat:7,immedi:[8,5,9,7,4],upcom:6,togeth:4,present:[0,7,4,6,3,8,9],determinist:2,therefor:[8,5,3,4],plain:[0,8,3,7,5],contextu:0,defin:[0,1,2,3,4,5,6,7,8,9],helper:8,almost:[5,4],incom:7,revis:8,parti:6,began:9,member:[8,9,5],python:[0,1,2,3,4,5,7,8,9],denot:5,iou:9,upon:[0,8,2,6,4],effect:[0,6,2,3],distutil:8,markupsaf:[2,7],off:[0,6,2,3,4],mention:7,well:[0,2,3,4,5,6,7,8,9],exampl:[0,2,4,5,6,3,8,9],command:8,choos:7,undefin:[0,8,9,5],usual:[8,6,2,9,5],module_writ:8,less:[9,7,4],heavili:7,web:8,point:[0,7,4,5,6,3,8],add:[0,8,2,4],lookup:[8,6,9,7],dest:8,arguabl:7,cache_impl:[8,6],five:[6,5],know:[7,4],xe2:7,mkstemp:8,insert:4,like:[0,2,3,4,5,6,7,8,9],success:8,page:[0,1,2,4,5,6,3,8,9],unreach:0,exceed:9,revers:8,captur:[8,2,3,9],pariti:9,"export":[0,5,4],smoothli:4,proper:8,librari:[0,8,2,6,7],tmp:[8,2],lead:[2,3,9],usag:[0,1,2,3,4,6,7,8,9],nutshel:4,although:5,stage:8,beaker:[8,6],about:[8,1,5,9,4],actual:[0,2,4,5,6,3,8,9],column:0,htmlentitydef:2,discard:2,x99a:7,disabl:[1,2,6,7,8,9],own:[0,2,3,4,5,6,7,8,9],populate_self:3,automat:[0,2,4,5,6,8,9],"dr\u00f4le":7,leverag:5,quote_plu:2,inner:0,arg1:3,arg2:3,"function":[0,2,3,4,5,6,7,8,9],keyerror:9,invalidate_def:6,eas:[2,9],inlin:[5,9,4],buf:[8,2],wherev:7,count:[0,8,9],made:[6,9],whether:[2,9,5],wish:[6,2,9],displai:8,record:[8,3,5],below:[0,7,4],otherwis:[8,9,7,5],evalu:[0,3,5],"int":9,dure:[8,4],filenam:[8,6,3],twist:0,pit:9,probabl:[0,8,9,6],mutual:8,percent:5,detail:[0,4,5,7,8,9],other:[0,2,3,4,5,6,7,8,9],bool:9,futur:[3,5],varieti:[6,5],post_pros:0,supports_cal:3,templateuri:3,some_condit:0,stai:[6,9],experienc:9,strict_undefin:[8,9],rule:[0,7,4],portion:0},objtypes:{"0":"py:attribute","1":"py:method","2":"py:class","3":"py:function"},titles:["Defs and Blocks","Table of Contents","Filtering and Buffering","Namespaces","Inheritance","Syntax","Caching","The Unicode Chapter","Usage","The Mako Runtime Environment"],objnames:{"0":["py","attribute","Python attribute"],"1":["py","method","Python method"],"2":["py","class","Python class"],"3":["py","function","Python function"]},filenames:["defs","index","filtering","namespaces","inheritance","syntax","caching","unicode","usage","runtime"]})
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/doc/syntax.html b/lib/Mako-0.7.3/doc/syntax.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/syntax.html
@@ -0,0 +1,596 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<head>
+<title>
+    
+                Syntax
+             — 
+    Mako 0.7.3 Documentation
+</title>
+
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
+
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+          URL_ROOT:    '#',
+          VERSION:     '0.7.3',
+          COLLAPSE_MODINDEX: false,
+          FILE_SUFFIX: '.html'
+      };
+    </script>
+        <script type="text/javascript" src="_static/jquery.js"></script>
+        <script type="text/javascript" src="_static/underscore.js"></script>
+        <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="top" title="Mako 0.7.3 Documentation" href="index.html" />
+        <link rel="next" title="Defs and Blocks" href="defs.html" />
+        <link rel="prev" title="Usage" href="usage.html" />
+
+<link rel="stylesheet" href="_static/site.css"></link>
+
+
+</head>
+<body>
+    <div id="wrap">
+    <div class="rightbar">
+
+
+    <div class="slogan">
+    Hyperfast and lightweight templating for the Python platform.
+    </div>
+
+
+    </div>
+
+    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
+
+    <hr/>
+
+    
+
+
+
+
+
+
+
+
+
+<div id="docs-container">
+
+
+
+<div id="docs-header">
+    <h1>Mako 0.7.3 Documentation</h1>
+
+    <div id="docs-search">
+    Search:
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </div>
+
+    <div id="docs-version-header">
+        Release: <span class="version-num">0.7.3</span>
+
+    </div>
+
+</div>
+
+<div id="docs-top-navigation">
+    <div id="docs-top-page-control" class="docs-navigation-links">
+        <ul>
+            <li>Prev:
+            <a href="usage.html" title="previous chapter">Usage</a>
+            </li>
+            <li>Next:
+            <a href="defs.html" title="next chapter">Defs and Blocks</a>
+            </li>
+
+        <li>
+            <a href="index.html">Table of Contents</a> |
+            <a href="genindex.html">Index</a>
+            | <a href="_sources/syntax.txt">view source
+        </li>
+        </ul>
+    </div>
+
+    <div id="docs-navigation-banner">
+        <a href="index.html">Mako 0.7.3 Documentation</a>
+        » 
+                Syntax
+             
+
+        <h2>
+            
+                Syntax
+            
+        </h2>
+    </div>
+
+</div>
+
+<div id="docs-body-container">
+
+    <div id="docs-sidebar">
+    <h3><a href="index.html">Table of Contents</a></h3>
+    <ul>
+<li><a class="reference internal" href="#">Syntax</a><ul>
+<li><a class="reference internal" href="#expression-substitution">Expression Substitution</a></li>
+<li><a class="reference internal" href="#expression-escaping">Expression Escaping</a></li>
+<li><a class="reference internal" href="#control-structures">Control Structures</a><ul>
+<li><a class="reference internal" href="#the-loop-context">The Loop Context</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#comments">Comments</a></li>
+<li><a class="reference internal" href="#newline-filters">Newline Filters</a></li>
+<li><a class="reference internal" href="#python-blocks">Python Blocks</a></li>
+<li><a class="reference internal" href="#module-level-blocks">Module-level Blocks</a></li>
+<li><a class="reference internal" href="#tags">Tags</a><ul>
+<li><a class="reference internal" href="#page"><tt class="docutils literal"><span class="pre"><%page></span></tt></a></li>
+<li><a class="reference internal" href="#include"><tt class="docutils literal"><span class="pre"><%include></span></tt></a></li>
+<li><a class="reference internal" href="#def"><tt class="docutils literal"><span class="pre"><%def></span></tt></a></li>
+<li><a class="reference internal" href="#block"><tt class="docutils literal"><span class="pre"><%block></span></tt></a></li>
+<li><a class="reference internal" href="#namespace"><tt class="docutils literal"><span class="pre"><%namespace></span></tt></a></li>
+<li><a class="reference internal" href="#inherit"><tt class="docutils literal"><span class="pre"><%inherit></span></tt></a></li>
+<li><a class="reference internal" href="#nsname-defname"><tt class="docutils literal"><span class="pre"><%</span></tt>nsname<tt class="docutils literal"><span class="pre">:</span></tt>defname<tt class="docutils literal"><span class="pre">></span></tt></a></li>
+<li><a class="reference internal" href="#call"><tt class="docutils literal"><span class="pre"><%call></span></tt></a></li>
+<li><a class="reference internal" href="#doc"><tt class="docutils literal"><span class="pre"><%doc></span></tt></a></li>
+<li><a class="reference internal" href="#text"><tt class="docutils literal"><span class="pre"><%text></span></tt></a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#returning-early-from-a-template">Returning Early from a Template</a></li>
+</ul>
+</li>
+</ul>
+
+
+    <h4>Previous Topic</h4>
+    <p>
+    <a href="usage.html" title="previous chapter">Usage</a>
+    </p>
+    <h4>Next Topic</h4>
+    <p>
+    <a href="defs.html" title="next chapter">Defs and Blocks</a>
+    </p>
+
+    <h4>Quick Search</h4>
+    <p>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </p>
+
+    </div>
+
+    <div id="docs-body" class="withsidebar" >
+        
+<div class="section" id="syntax">
+<span id="syntax-toplevel"></span><h1>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h1>
+<p>A Mako template is parsed from a text stream containing any kind
+of content, XML, HTML, email text, etc. The template can further
+contain Mako-specific directives which represent variable and/or
+expression substitutions, control structures (i.e. conditionals
+and loops), server-side comments, full blocks of Python code, as
+well as various tags that offer additional functionality. All of
+these constructs compile into real Python code. This means that
+you can leverage the full power of Python in almost every aspect
+of a Mako template.</p>
+<div class="section" id="expression-substitution">
+<h2>Expression Substitution<a class="headerlink" href="#expression-substitution" title="Permalink to this headline">¶</a></h2>
+<p>The simplest expression is just a variable substitution. The
+syntax for this is the <tt class="docutils literal"><span class="pre">${}</span></tt> construct, which is inspired by
+Perl, Genshi, JSP EL, and others:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x">this is x: </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>Above, the string representation of <tt class="docutils literal"><span class="pre">x</span></tt> is applied to the
+template’s output stream. If you’re wondering where <tt class="docutils literal"><span class="pre">x</span></tt> comes
+from, it’s usually from the <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> supplied to the
+template’s rendering function. If <tt class="docutils literal"><span class="pre">x</span></tt> was not supplied to the
+template and was not otherwise assigned locally, it evaluates to
+a special value <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt>. More on that later.</p>
+<p>The contents within the <tt class="docutils literal"><span class="pre">${}</span></tt> tag are evaluated by Python
+directly, so full expressions are OK:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x">pythagorean theorem:  </span><span class="cp">${</span><span class="nb">pow</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span> <span class="o">+</span> <span class="nb">pow</span><span class="p">(</span><span class="n">y</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>The results of the expression are evaluated into a string result
+in all cases before being rendered to the output stream, such as
+the above example where the expression produces a numeric
+result.</p>
+</div>
+<div class="section" id="expression-escaping">
+<h2>Expression Escaping<a class="headerlink" href="#expression-escaping" title="Permalink to this headline">¶</a></h2>
+<p>Mako includes a number of built-in escaping mechanisms,
+including HTML, URI and XML escaping, as well as a “trim”
+function. These escapes can be added to an expression
+substitution using the <tt class="docutils literal"><span class="pre">|</span></tt> operator:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">"this is some text"</span> <span class="o">|</span> <span class="n">u</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>The above expression applies URL escaping to the expression, and
+produces <tt class="docutils literal"><span class="pre">this+is+some+text</span></tt>. The <tt class="docutils literal"><span class="pre">u</span></tt> name indicates URL
+escaping, whereas <tt class="docutils literal"><span class="pre">h</span></tt> represents HTML escaping, <tt class="docutils literal"><span class="pre">x</span></tt>
+represents XML escaping, and <tt class="docutils literal"><span class="pre">trim</span></tt> applies a trim function.</p>
+<p>Read more about built-in filtering functions, including how to
+make your own filter functions, in <a class="reference internal" href="filtering.html"><em>Filtering and Buffering</em></a>.</p>
+</div>
+<div class="section" id="control-structures">
+<h2>Control Structures<a class="headerlink" href="#control-structures" title="Permalink to this headline">¶</a></h2>
+<p>A control structure refers to all those things that control the
+flow of a program – conditionals (i.e. <tt class="docutils literal"><span class="pre">if</span></tt>/<tt class="docutils literal"><span class="pre">else</span></tt>), loops (like
+<tt class="docutils literal"><span class="pre">while</span></tt> and <tt class="docutils literal"><span class="pre">for</span></tt>), as well as things like <tt class="docutils literal"><span class="pre">try</span></tt>/<tt class="docutils literal"><span class="pre">except</span></tt>. In Mako,
+control structures are written using the <tt class="docutils literal"><span class="pre">%</span></tt> marker followed
+by a regular Python control expression, and are “closed” by
+using another <tt class="docutils literal"><span class="pre">%</span></tt> marker with the tag “<tt class="docutils literal"><span class="pre">end<name></span></tt>”, where
+“<tt class="docutils literal"><span class="pre"><name></span></tt>” is the keyword of the expression:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">%</span> <span class="k">if</span> <span class="n">x</span><span class="o">==</span><span class="mi">5</span><span class="p">:</span><span class="x"></span>
+<span class="x">    this is some output</span>
+<span class="cp">%</span><span class="k"> endif</span><span class="x"></span>
+</pre></div>
+</div>
+<p>The <tt class="docutils literal"><span class="pre">%</span></tt> can appear anywhere on the line as long as no text
+precedes it; indentation is not significant. The full range of
+Python “colon” expressions are allowed here, including
+<tt class="docutils literal"><span class="pre">if</span></tt>/<tt class="docutils literal"><span class="pre">elif</span></tt>/<tt class="docutils literal"><span class="pre">else</span></tt>, <tt class="docutils literal"><span class="pre">while</span></tt>, <tt class="docutils literal"><span class="pre">for</span></tt>, and even <tt class="docutils literal"><span class="pre">def</span></tt>, although
+Mako has a built-in tag for defs which is more full-featured.</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">%</span> <span class="k">for</span> <span class="n">a</span> <span class="ow">in</span> <span class="p">[</span><span class="s">'one'</span><span class="p">,</span> <span class="s">'two'</span><span class="p">,</span> <span class="s">'three'</span><span class="p">,</span> <span class="s">'four'</span><span class="p">,</span> <span class="s">'five'</span><span class="p">]:</span><span class="x"></span>
+    <span class="cp">%</span> <span class="k">if</span> <span class="n">a</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s">'t'</span><span class="p">:</span><span class="x"></span>
+<span class="x">    its two or three</span>
+    <span class="cp">%</span> <span class="k">elif</span> <span class="n">a</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s">'f'</span><span class="p">:</span><span class="x"></span>
+<span class="x">    four/five</span>
+    <span class="cp">%</span> <span class="k">else</span><span class="p">:</span><span class="x"></span>
+<span class="x">    one</span>
+    <span class="cp">%</span><span class="k"> endif</span><span class="x"></span>
+<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
+</pre></div>
+</div>
+<p>The <tt class="docutils literal"><span class="pre">%</span></tt> sign can also be “escaped”, if you actually want to
+emit a percent sign as the first non whitespace character on a
+line, by escaping it as in <tt class="docutils literal"><span class="pre">%%</span></tt>:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x">%% some text</span>
+
+<span class="x">    %% some more text</span>
+</pre></div>
+</div>
+<div class="section" id="the-loop-context">
+<h3>The Loop Context<a class="headerlink" href="#the-loop-context" title="Permalink to this headline">¶</a></h3>
+<p>The <strong>loop context</strong> provides additional information about a loop
+while inside of a <tt class="docutils literal"><span class="pre">%</span> <span class="pre">for</span></tt> structure:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><ul></span>
+<span class="cp">%</span> <span class="k">for</span> <span class="n">a</span> <span class="ow">in</span> <span class="p">(</span><span class="s">"one"</span><span class="p">,</span> <span class="s">"two"</span><span class="p">,</span> <span class="s">"three"</span><span class="p">):</span><span class="x"></span>
+<span class="x">    <li>Item </span><span class="cp">${</span><span class="n">loop</span><span class="o">.</span><span class="n">index</span><span class="cp">}</span><span class="x">: </span><span class="cp">${</span><span class="n">a</span><span class="cp">}</span><span class="x"></li></span>
+<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
+<span class="x"></ul></span>
+</pre></div>
+</div>
+<p>See <a class="reference internal" href="runtime.html#loop-context"><em>The Loop Context</em></a> for more information on this feature.</p>
+<p class="versionadded">
+<span class="versionmodified">New in version 0.7.</span></p>
+</div>
+</div>
+<div class="section" id="comments">
+<h2>Comments<a class="headerlink" href="#comments" title="Permalink to this headline">¶</a></h2>
+<p>Comments come in two varieties. The single line comment uses
+<tt class="docutils literal"><span class="pre">##</span></tt> as the first non-space characters on a line:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## this is a comment.</span><span class="x"></span>
+<span class="x">...text ...</span>
+</pre></div>
+</div>
+<p>A multiline version exists using <tt class="docutils literal"><span class="pre"><%doc></span> <span class="pre">...text...</span> <span class="pre"></%doc></span></tt>:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%doc></span>
+<span class="cp">    these are comments</span>
+<span class="cp">    more comments</span>
+<span class="cp"></%doc></span><span class="x"></span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="newline-filters">
+<h2>Newline Filters<a class="headerlink" href="#newline-filters" title="Permalink to this headline">¶</a></h2>
+<p>The backslash (“<tt class="docutils literal"><span class="pre">\</span></tt>”) character, placed at the end of any
+line, will consume the newline character before continuing to
+the next line:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x">here is a line that goes onto </span><span class="o">\</span>
+<span class="x">another line.</span>
+</pre></div>
+</div>
+<p>The above text evaluates to:</p>
+<div class="highlight-text"><div class="highlight"><pre>here is a line that goes onto another line.
+</pre></div>
+</div>
+</div>
+<div class="section" id="python-blocks">
+<h2>Python Blocks<a class="headerlink" href="#python-blocks" title="Permalink to this headline">¶</a></h2>
+<p>Any arbitrary block of python can be dropped in using the <tt class="docutils literal"><span class="pre"><%</span>
+<span class="pre">%></span></tt> tags:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x">this is a template</span>
+<span class="cp"><%</span>
+    <span class="n">x</span> <span class="o">=</span> <span class="n">db</span><span class="o">.</span><span class="n">get_resource</span><span class="p">(</span><span class="s">'foo'</span><span class="p">)</span>
+    <span class="n">y</span> <span class="o">=</span> <span class="p">[</span><span class="n">z</span><span class="o">.</span><span class="n">element</span> <span class="k">for</span> <span class="n">z</span> <span class="ow">in</span> <span class="n">x</span> <span class="k">if</span> <span class="n">x</span><span class="o">.</span><span class="n">frobnizzle</span><span class="o">==</span><span class="mi">5</span><span class="p">]</span>
+<span class="cp">%></span>
+<span class="cp">%</span> <span class="k">for</span> <span class="n">elem</span> <span class="ow">in</span> <span class="n">y</span><span class="p">:</span><span class="x"></span>
+<span class="x">    element: </span><span class="cp">${</span><span class="n">elem</span><span class="cp">}</span>
+<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
+</pre></div>
+</div>
+<p>Within <tt class="docutils literal"><span class="pre"><%</span> <span class="pre">%></span></tt>, you’re writing a regular block of Python code.
+While the code can appear with an arbitrary level of preceding
+whitespace, it has to be consistently formatted with itself.
+Mako’s compiler will adjust the block of Python to be consistent
+with the surrounding generated Python code.</p>
+</div>
+<div class="section" id="module-level-blocks">
+<h2>Module-level Blocks<a class="headerlink" href="#module-level-blocks" title="Permalink to this headline">¶</a></h2>
+<p>A variant on <tt class="docutils literal"><span class="pre"><%</span> <span class="pre">%></span></tt> is the module-level code block, denoted
+by <tt class="docutils literal"><span class="pre"><%!</span> <span class="pre">%></span></tt>. Code within these tags is executed at the module
+level of the template, and not within the rendering function of
+the template. Therefore, this code does not have access to the
+template’s context and is only executed when the template is
+loaded into memory (which can be only once per application, or
+more, depending on the runtime environment). Use the <tt class="docutils literal"><span class="pre"><%!</span> <span class="pre">%></span></tt>
+tags to declare your template’s imports, as well as any
+pure-Python functions you might want to declare:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%!</span>
+    <span class="kn">import</span> <span class="nn">mylib</span>
+    <span class="kn">import</span> <span class="nn">re</span>
+
+    <span class="k">def</span> <span class="nf">filter</span><span class="p">(</span><span class="n">text</span><span class="p">):</span>
+        <span class="k">return</span> <span class="n">re</span><span class="o">.</span><span class="n">sub</span><span class="p">(</span><span class="s">r'^@'</span><span class="p">,</span> <span class="s">''</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span>
+<span class="cp">%></span><span class="x"></span>
+</pre></div>
+</div>
+<p>Any number of <tt class="docutils literal"><span class="pre"><%!</span> <span class="pre">%></span></tt> blocks can be declared anywhere in a
+template; they will be rendered in the resulting module
+in a single contiguous block above all render callables,
+in the order in which they appear in the source template.</p>
+</div>
+<div class="section" id="tags">
+<h2>Tags<a class="headerlink" href="#tags" title="Permalink to this headline">¶</a></h2>
+<p>The rest of what Mako offers takes place in the form of tags.
+All tags use the same syntax, which is similar to an XML tag
+except that the first character of the tag name is a <tt class="docutils literal"><span class="pre">%</span></tt>
+character. The tag is closed either by a contained slash
+character, or an explicit closing tag:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">include</span> <span class="na">file=</span><span class="s">"foo.txt"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"foo"</span> <span class="na">buffered=</span><span class="s">"True"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    this is a def</span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>All tags have a set of attributes which are defined for each
+tag. Some of these attributes are required. Also, many
+attributes support <strong>evaluation</strong>, meaning you can embed an
+expression (using <tt class="docutils literal"><span class="pre">${}</span></tt>) inside the attribute text:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">include</span> <span class="na">file=</span><span class="s">"/foo/bar/${myfile}.txt"</span><span class="cp">/></span><span class="x"></span>
+</pre></div>
+</div>
+<p>Whether or not an attribute accepts runtime evaluation depends
+on the type of tag and how that tag is compiled into the
+template. The best way to find out if you can stick an
+expression in is to try it! The lexer will tell you if it’s not
+valid.</p>
+<p>Heres a quick summary of all the tags:</p>
+<div class="section" id="page">
+<h3><tt class="docutils literal"><span class="pre"><%page></span></tt><a class="headerlink" href="#page" title="Permalink to this headline">¶</a></h3>
+<p>This tag defines general characteristics of the template,
+including caching arguments, and optional lists of arguments
+which the template expects when invoked.</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">args=</span><span class="s">"x, y, z='default'"</span><span class="cp">/></span><span class="x"></span>
+</pre></div>
+</div>
+<p>Or a page tag that defines caching characteristics:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">cached=</span><span class="s">"True"</span> <span class="na">cache_type=</span><span class="s">"memory"</span><span class="cp">/></span><span class="x"></span>
+</pre></div>
+</div>
+<p>Currently, only one <tt class="docutils literal"><span class="pre"><%page></span></tt> tag gets used per template, the
+rest get ignored. While this will be improved in a future
+release, for now make sure you have only one <tt class="docutils literal"><span class="pre"><%page></span></tt> tag
+defined in your template, else you may not get the results you
+want. The details of what <tt class="docutils literal"><span class="pre"><%page></span></tt> is used for are described
+further in <a class="reference internal" href="namespaces.html#namespaces-body"><em>The body() Method</em></a> as well as <a class="reference internal" href="caching.html"><em>Caching</em></a>.</p>
+</div>
+<div class="section" id="include">
+<h3><tt class="docutils literal"><span class="pre"><%include></span></tt><a class="headerlink" href="#include" title="Permalink to this headline">¶</a></h3>
+<p>A tag that is familiar from other template languages, <tt class="docutils literal"><span class="pre">%include</span></tt>
+is a regular joe that just accepts a file argument and calls in
+the rendered result of that file:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">include</span> <span class="na">file=</span><span class="s">"header.html"</span><span class="cp">/></span><span class="x"></span>
+
+<span class="x">    hello world</span>
+
+<span class="cp"><%</span><span class="nb">include</span> <span class="na">file=</span><span class="s">"footer.html"</span><span class="cp">/></span><span class="x"></span>
+</pre></div>
+</div>
+<p>Include also accepts arguments which are available as <tt class="docutils literal"><span class="pre"><%page></span></tt> arguments in the receiving template:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">include</span> <span class="na">file=</span><span class="s">"toolbar.html"</span> <span class="na">args=</span><span class="s">"current_section='members', username='ed'"</span><span class="cp">/></span><span class="x"></span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="def">
+<h3><tt class="docutils literal"><span class="pre"><%def></span></tt><a class="headerlink" href="#def" title="Permalink to this headline">¶</a></h3>
+<p>The <tt class="docutils literal"><span class="pre">%def</span></tt> tag defines a Python function which contains a set
+of content, that can be called at some other point in the
+template. The basic idea is simple:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"myfunc(x)"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    this is myfunc, x is </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x"></span>
+<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+
+<span class="cp">${</span><span class="n">myfunc</span><span class="p">(</span><span class="mi">7</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>The <tt class="docutils literal"><span class="pre">%def</span></tt> tag is a lot more powerful than a plain Python <tt class="docutils literal"><span class="pre">def</span></tt>, as
+the Mako compiler provides many extra services with <tt class="docutils literal"><span class="pre">%def</span></tt> that
+you wouldn’t normally have, such as the ability to export defs
+as template “methods”, automatic propagation of the current
+<a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>, buffering/filtering/caching flags, and def calls
+with content, which enable packages of defs to be sent as
+arguments to other def calls (not as hard as it sounds). Get the
+full deal on what <tt class="docutils literal"><span class="pre">%def</span></tt> can do in <a class="reference internal" href="defs.html"><em>Defs and Blocks</em></a>.</p>
+</div>
+<div class="section" id="block">
+<h3><tt class="docutils literal"><span class="pre"><%block></span></tt><a class="headerlink" href="#block" title="Permalink to this headline">¶</a></h3>
+<p><tt class="docutils literal"><span class="pre">%block</span></tt> is a tag that is close to a <tt class="docutils literal"><span class="pre">%def</span></tt>,
+except executes itself immediately in its base-most scope,
+and can also be anonymous (i.e. with no name):</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">block</span> <span class="na">filter=</span><span class="s">"h"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    some <html> stuff.</span>
+<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>Inspired by Jinja2 blocks, named blocks offer a syntactically pleasing way
+to do inheritance:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><html></span>
+<span class="x">    <body></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
+<span class="x">        <h2></span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"title"</span><span class="cp">/></span><span class="x"></h2></span>
+<span class="x">    </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
+<span class="x">    </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
+<span class="x">    </body></span>
+<span class="x"></html></span>
+</pre></div>
+</div>
+<p>Blocks are introduced in <a class="reference internal" href="defs.html#blocks"><em>Using Blocks</em></a> and further described in <a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</p>
+<p class="versionadded">
+<span class="versionmodified">New in version 0.4.1.</span></p>
+</div>
+<div class="section" id="namespace">
+<h3><tt class="docutils literal"><span class="pre"><%namespace></span></tt><a class="headerlink" href="#namespace" title="Permalink to this headline">¶</a></h3>
+<p><tt class="docutils literal"><span class="pre">%namespace</span></tt> is Mako’s equivalent of Python’s <tt class="docutils literal"><span class="pre">import</span></tt>
+statement. It allows access to all the rendering functions and
+metadata of other template files, plain Python modules, as well
+as locally defined “packages” of functions.</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">namespace</span> <span class="na">file=</span><span class="s">"functions.html"</span> <span class="na">import=</span><span class="s">"*"</span><span class="cp">/></span><span class="x"></span>
+</pre></div>
+</div>
+<p>The underlying object generated by <tt class="docutils literal"><span class="pre">%namespace</span></tt>, an instance of
+<a class="reference internal" href="namespaces.html#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">mako.runtime.Namespace</span></tt></a>, is a central construct used in
+templates to reference template-specific information such as the
+current URI, inheritance structures, and other things that are
+not as hard as they sound right here. Namespaces are described
+in <a class="reference internal" href="namespaces.html"><em>Namespaces</em></a>.</p>
+</div>
+<div class="section" id="inherit">
+<h3><tt class="docutils literal"><span class="pre"><%inherit></span></tt><a class="headerlink" href="#inherit" title="Permalink to this headline">¶</a></h3>
+<p>Inherit allows templates to arrange themselves in <strong>inheritance
+chains</strong>. This is a concept familiar in many other template
+languages.</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"base.html"</span><span class="cp">/></span><span class="x"></span>
+</pre></div>
+</div>
+<p>When using the <tt class="docutils literal"><span class="pre">%inherit</span></tt> tag, control is passed to the topmost
+inherited template first, which then decides how to handle
+calling areas of content from its inheriting templates. Mako
+offers a lot of flexibility in this area, including dynamic
+inheritance, content wrapping, and polymorphic method calls.
+Check it out in <a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</p>
+</div>
+<div class="section" id="nsname-defname">
+<h3><tt class="docutils literal"><span class="pre"><%</span></tt>nsname<tt class="docutils literal"><span class="pre">:</span></tt>defname<tt class="docutils literal"><span class="pre">></span></tt><a class="headerlink" href="#nsname-defname" title="Permalink to this headline">¶</a></h3>
+<p>Any user-defined “tag” can be created against
+a namespace by using a tag with a name of the form
+<tt class="docutils literal"><span class="pre"><%<namespacename>:<defname>></span></tt>. The closed and open formats of such a
+tag are equivalent to an inline expression and the <tt class="docutils literal"><span class="pre"><%call></span></tt>
+tag, respectively.</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">mynamespace:somedef</span> <span class="na">param=</span><span class="s">"some value"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    this is the body</span>
+<span class="cp"></%</span><span class="nb">mynamespace:somedef</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+<p>To create custom tags which accept a body, see
+<a class="reference internal" href="defs.html#defs-with-content"><em>Calling a Def with Embedded Content and/or Other Defs</em></a>.</p>
+<p class="versionadded">
+<span class="versionmodified">New in version 0.2.3.</span></p>
+</div>
+<div class="section" id="call">
+<h3><tt class="docutils literal"><span class="pre"><%call></span></tt><a class="headerlink" href="#call" title="Permalink to this headline">¶</a></h3>
+<p>The call tag is the “classic” form of a user-defined tag, and is
+roughly equivalent to the <tt class="docutils literal"><span class="pre"><%namespacename:defname></span></tt> syntax
+described above. This tag is also described in <a class="reference internal" href="defs.html#defs-with-content"><em>Calling a Def with Embedded Content and/or Other Defs</em></a>.</p>
+</div>
+<div class="section" id="doc">
+<h3><tt class="docutils literal"><span class="pre"><%doc></span></tt><a class="headerlink" href="#doc" title="Permalink to this headline">¶</a></h3>
+<p>The <tt class="docutils literal"><span class="pre">%doc</span></tt> tag handles multiline comments:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%doc></span>
+<span class="cp">    these are comments</span>
+<span class="cp">    more comments</span>
+<span class="cp"></%doc></span><span class="x"></span>
+</pre></div>
+</div>
+<p>Also the <tt class="docutils literal"><span class="pre">##</span></tt> symbol as the first non-space characters on a line can be used for single line comments.</p>
+</div>
+<div class="section" id="text">
+<h3><tt class="docutils literal"><span class="pre"><%text></span></tt><a class="headerlink" href="#text" title="Permalink to this headline">¶</a></h3>
+<p>This tag suspends the Mako lexer’s normal parsing of Mako
+template directives, and returns its entire body contents as
+plain text. It is used pretty much to write documentation about
+Mako:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">text</span> <span class="na">filter=</span><span class="s">"h"</span><span class="cp">></span><span class="x"></span>
+<span class="x">    heres some fake mako </span><span class="cp">${</span><span class="n">syntax</span><span class="cp">}</span><span class="x"></span>
+<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"x()"</span><span class="cp">>${</span><span class="n">x</span><span class="cp">}</%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
+<span class="cp"></%</span><span class="nb">text</span><span class="cp">></span><span class="x"></span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="returning-early-from-a-template">
+<h2>Returning Early from a Template<a class="headerlink" href="#returning-early-from-a-template" title="Permalink to this headline">¶</a></h2>
+<p>Sometimes you want to stop processing a template or <tt class="docutils literal"><span class="pre"><%def></span></tt>
+method in the middle and just use the text you’ve accumulated so
+far. You can use a <tt class="docutils literal"><span class="pre">return</span></tt> statement inside a Python
+block to do that.</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">%</span> <span class="k">if</span> <span class="ow">not</span> <span class="nb">len</span><span class="p">(</span><span class="n">records</span><span class="p">):</span><span class="x"></span>
+<span class="x">    No records found.</span>
+<span class="x">    </span><span class="cp"><%</span> <span class="k">return</span> <span class="cp">%></span>
+<span class="cp">%</span><span class="k"> endif</span><span class="x"></span>
+</pre></div>
+</div>
+<p>Or perhaps:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span>
+    <span class="k">if</span> <span class="ow">not</span> <span class="nb">len</span><span class="p">(</span><span class="n">records</span><span class="p">):</span>
+        <span class="k">return</span>
+<span class="cp">%></span><span class="x"></span>
+</pre></div>
+</div>
+</div>
+</div>
+
+    </div>
+
+</div>
+
+<div id="docs-bottom-navigation" class="docs-navigation-links">
+        Previous:
+        <a href="usage.html" title="previous chapter">Usage</a>
+        Next:
+        <a href="defs.html" title="next chapter">Defs and Blocks</a>
+
+    <div id="docs-copyright">
+        © Copyright the Mako authors and contributors.
+        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
+        with Mako templates.
+    </div>
+</div>
+
+</div>
+
+<div class="clearfix">
+
+<hr/>
+
+<div class="copyright">Website content copyright © by Michael Bayer.
+    All rights reserved.  Mako and its documentation are licensed
+    under the MIT license.  mike(&)zzzcomputing.com</div>
+
+</div>
+</div>
+</body>
+</html>
diff --git a/lib/Mako-0.7.3/doc/unicode.html b/lib/Mako-0.7.3/doc/unicode.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/unicode.html
@@ -0,0 +1,476 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<head>
+<title>
+    
+                The Unicode Chapter
+             — 
+    Mako 0.7.3 Documentation
+</title>
+
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
+
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+          URL_ROOT:    '#',
+          VERSION:     '0.7.3',
+          COLLAPSE_MODINDEX: false,
+          FILE_SUFFIX: '.html'
+      };
+    </script>
+        <script type="text/javascript" src="_static/jquery.js"></script>
+        <script type="text/javascript" src="_static/underscore.js"></script>
+        <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="top" title="Mako 0.7.3 Documentation" href="index.html" />
+        <link rel="next" title="Caching" href="caching.html" />
+        <link rel="prev" title="Filtering and Buffering" href="filtering.html" />
+
+<link rel="stylesheet" href="_static/site.css"></link>
+
+
+</head>
+<body>
+    <div id="wrap">
+    <div class="rightbar">
+
+
+    <div class="slogan">
+    Hyperfast and lightweight templating for the Python platform.
+    </div>
+
+
+    </div>
+
+    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
+
+    <hr/>
+
+    
+
+
+
+
+
+
+
+
+
+<div id="docs-container">
+
+
+
+<div id="docs-header">
+    <h1>Mako 0.7.3 Documentation</h1>
+
+    <div id="docs-search">
+    Search:
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </div>
+
+    <div id="docs-version-header">
+        Release: <span class="version-num">0.7.3</span>
+
+    </div>
+
+</div>
+
+<div id="docs-top-navigation">
+    <div id="docs-top-page-control" class="docs-navigation-links">
+        <ul>
+            <li>Prev:
+            <a href="filtering.html" title="previous chapter">Filtering and Buffering</a>
+            </li>
+            <li>Next:
+            <a href="caching.html" title="next chapter">Caching</a>
+            </li>
+
+        <li>
+            <a href="index.html">Table of Contents</a> |
+            <a href="genindex.html">Index</a>
+            | <a href="_sources/unicode.txt">view source
+        </li>
+        </ul>
+    </div>
+
+    <div id="docs-navigation-banner">
+        <a href="index.html">Mako 0.7.3 Documentation</a>
+        » 
+                The Unicode Chapter
+             
+
+        <h2>
+            
+                The Unicode Chapter
+            
+        </h2>
+    </div>
+
+</div>
+
+<div id="docs-body-container">
+
+    <div id="docs-sidebar">
+    <h3><a href="index.html">Table of Contents</a></h3>
+    <ul>
+<li><a class="reference internal" href="#">The Unicode Chapter</a><ul>
+<li><a class="reference internal" href="#specifying-the-encoding-of-a-template-file">Specifying the Encoding of a Template File</a></li>
+<li><a class="reference internal" href="#handling-expressions">Handling Expressions</a></li>
+<li><a class="reference internal" href="#defining-output-encoding">Defining Output Encoding</a><ul>
+<li><a class="reference internal" href="#buffer-selection">Buffer Selection</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#saying-to-heck-with-it-disabling-the-usage-of-unicode-entirely">Saying to Heck with It: Disabling the Usage of Unicode Entirely</a><ul>
+<li><a class="reference internal" href="#rules-for-using-disable-unicode-true">Rules for using <tt class="docutils literal"><span class="pre">disable_unicode=True</span></tt></a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+
+
+    <h4>Previous Topic</h4>
+    <p>
+    <a href="filtering.html" title="previous chapter">Filtering and Buffering</a>
+    </p>
+    <h4>Next Topic</h4>
+    <p>
+    <a href="caching.html" title="next chapter">Caching</a>
+    </p>
+
+    <h4>Quick Search</h4>
+    <p>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </p>
+
+    </div>
+
+    <div id="docs-body" class="withsidebar" >
+        
+<div class="section" id="the-unicode-chapter">
+<span id="unicode-toplevel"></span><h1>The Unicode Chapter<a class="headerlink" href="#the-unicode-chapter" title="Permalink to this headline">¶</a></h1>
+<p>The Python language supports two ways of representing what we
+know as “strings”, i.e. series of characters. In Python 2, the
+two types are <tt class="docutils literal"><span class="pre">string</span></tt> and <tt class="docutils literal"><span class="pre">unicode</span></tt>, and in Python 3 they are
+<tt class="docutils literal"><span class="pre">bytes</span></tt> and <tt class="docutils literal"><span class="pre">string</span></tt>. A key aspect of the Python 2 <tt class="docutils literal"><span class="pre">string</span></tt> and
+Python 3 <tt class="docutils literal"><span class="pre">bytes</span></tt> types are that they contain no information
+regarding what <strong>encoding</strong> the data is stored in. For this
+reason they were commonly referred to as <strong>byte strings</strong> on
+Python 2, and Python 3 makes this name more explicit. The
+origins of this come from Python’s background of being developed
+before the Unicode standard was even available, back when
+strings were C-style strings and were just that, a series of
+bytes. Strings that had only values below 128 just happened to
+be <strong>ASCII</strong> strings and were printable on the console, whereas
+strings with values above 128 would produce all kinds of
+graphical characters and bells.</p>
+<p>Contrast the “byte-string” type with the “unicode/string” type.
+Objects of this latter type are created whenever you say something like
+<tt class="docutils literal"><span class="pre">u"hello</span> <span class="pre">world"</span></tt> (or in Python 3, just <tt class="docutils literal"><span class="pre">"hello</span> <span class="pre">world"</span></tt>). In this
+case, Python represents each character in the string internally
+using multiple bytes per character (something similar to
+UTF-16). What’s important is that when using the
+<tt class="docutils literal"><span class="pre">unicode</span></tt>/<tt class="docutils literal"><span class="pre">string</span></tt> type to store strings, Python knows the
+data’s encoding; it’s in its own internal format. Whereas when
+using the <tt class="docutils literal"><span class="pre">string</span></tt>/<tt class="docutils literal"><span class="pre">bytes</span></tt> type, it does not.</p>
+<p>When Python 2 attempts to treat a byte-string as a string, which
+means it’s attempting to compare/parse its characters, to coerce
+it into another encoding, or to decode it to a unicode object,
+it has to guess what the encoding is. In this case, it will
+pretty much always guess the encoding as <tt class="docutils literal"><span class="pre">ascii</span></tt>... and if the
+byte-string contains bytes above value 128, you’ll get an error.
+Python 3 eliminates much of this confusion by just raising an
+error unconditionally if a byte-string is used in a
+character-aware context.</p>
+<p>There is one operation that Python <em>can</em> do with a non-ASCII
+byte-string, and it’s a great source of confusion: it can dump the
+byte-string straight out to a stream or a file, with nary a care
+what the encoding is. To Python, this is pretty much like
+dumping any other kind of binary data (like an image) to a
+stream somewhere. In Python 2, it is common to see programs that
+embed all kinds of international characters and encodings into
+plain byte-strings (i.e. using <tt class="docutils literal"><span class="pre">"hello</span> <span class="pre">world"</span></tt> style literals)
+can fly right through their run, sending reams of strings out to
+wherever they are going, and the programmer, seeing the same
+output as was expressed in the input, is now under the illusion
+that his or her program is Unicode-compliant. In fact, their
+program has no unicode awareness whatsoever, and similarly has
+no ability to interact with libraries that <em>are</em> unicode aware.
+Python 3 makes this much less likely by defaulting to unicode as
+the storage format for strings.</p>
+<p>The “pass through encoded data” scheme is what template
+languages like Cheetah and earlier versions of Myghty do by
+default. Mako as of version 0.2 also supports this mode of
+operation when using Python 2, using the <tt class="docutils literal"><span class="pre">disable_unicode=True</span></tt>
+flag. However, when using Mako in its default mode of
+unicode-aware, it requires explicitness when dealing with
+non-ASCII encodings. Additionally, if you ever need to handle
+unicode strings and other kinds of encoding conversions more
+intelligently, the usage of raw byte-strings quickly becomes a
+nightmare, since you are sending the Python interpreter
+collections of bytes for which it can make no intelligent
+decisions with regards to encoding. In Python 3 Mako only allows
+usage of native, unicode strings.</p>
+<p>In normal Mako operation, all parsed template constructs and
+output streams are handled internally as Python <tt class="docutils literal"><span class="pre">unicode</span></tt>
+objects. It’s only at the point of <a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> that this unicode
+stream may be rendered into whatever the desired output encoding
+is. The implication here is that the template developer must
+:ensure that <a class="reference internal" href="#set-template-file-encoding"><em>the encoding of all non-ASCII templates is explicit</em></a> (still required in Python 3),
+that <a class="reference internal" href="#handling-non-ascii-expressions"><em>all non-ASCII-encoded expressions are in one way or another
+converted to unicode</em></a>
+(not much of a burden in Python 3), and that <a class="reference internal" href="#defining-output-encoding"><em>the output stream of the
+template is handled as a unicode stream being encoded to some
+encoding</em></a> (still required in Python 3).</p>
+<div class="section" id="specifying-the-encoding-of-a-template-file">
+<span id="set-template-file-encoding"></span><h2>Specifying the Encoding of a Template File<a class="headerlink" href="#specifying-the-encoding-of-a-template-file" title="Permalink to this headline">¶</a></h2>
+<p>This is the most basic encoding-related setting, and it is
+equivalent to Python’s “magic encoding comment”, as described in
+<a class="reference external" href="http://www.python.org/dev/peps/pep-0263/">pep-0263</a>. Any
+template that contains non-ASCII characters requires that this
+comment be present so that Mako can decode to unicode (and also
+make usage of Python’s AST parsing services). Mako’s lexer will
+use this encoding in order to convert the template source into a
+<tt class="docutils literal"><span class="pre">unicode</span></tt> object before continuing its parsing:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## -*- coding: utf-8 -*-</span><span class="x"></span>
+
+<span class="x">Alors vous imaginez ma surprise, au lever du jour, quand</span>
+<span class="x">une drôle de petite voix m’a réveillé. Elle disait:</span>
+<span class="x"> « S’il vous plaît… dessine-moi un mouton! »</span>
+</pre></div>
+</div>
+<p>For the picky, the regular expression used is derived from that
+of the above mentioned pep:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="c">#.*coding[:=]\s*([-\w.]+).*\n</span>
+</pre></div>
+</div>
+<p>The lexer will convert to unicode in all cases, so that if any
+characters exist in the template that are outside of the
+specified encoding (or the default of <tt class="docutils literal"><span class="pre">ascii</span></tt>), the error will
+be immediate.</p>
+<p>As an alternative, the template encoding can be specified
+programmatically to either <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> or <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> via
+the <tt class="docutils literal"><span class="pre">input_encoding</span></tt> parameter:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'./'</span><span class="p">],</span> <span class="n">input_encoding</span><span class="o">=</span><span class="s">'utf-8'</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The above will assume all located templates specify <tt class="docutils literal"><span class="pre">utf-8</span></tt>
+encoding, unless the template itself contains its own magic
+encoding comment, which takes precedence.</p>
+</div>
+<div class="section" id="handling-expressions">
+<span id="handling-non-ascii-expressions"></span><h2>Handling Expressions<a class="headerlink" href="#handling-expressions" title="Permalink to this headline">¶</a></h2>
+<p>The next area that encoding comes into play is in expression
+constructs. By default, Mako’s treatment of an expression like
+this:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">"hello world"</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>looks something like this:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="nb">unicode</span><span class="p">(</span><span class="s">"hello world"</span><span class="p">))</span>
+</pre></div>
+</div>
+<p>In Python 3, it’s just:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="s">"hello world"</span><span class="p">))</span>
+</pre></div>
+</div>
+<p>That is, <strong>the output of all expressions is run through the
+``unicode`` built-in</strong>. This is the default setting, and can be
+modified to expect various encodings. The <tt class="docutils literal"><span class="pre">unicode</span></tt> step serves
+both the purpose of rendering non-string expressions into
+strings (such as integers or objects which contain <tt class="docutils literal"><span class="pre">__str()__</span></tt>
+methods), and to ensure that the final output stream is
+constructed as a unicode object. The main implication of this is
+that <strong>any raw byte-strings that contain an encoding other than
+ASCII must first be decoded to a Python unicode object</strong>. It
+means you can’t say this in Python 2:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">"voix m’a réveillé."</span><span class="cp">}</span>  <span class="cp">## error in Python 2!</span><span class="x"></span>
+</pre></div>
+</div>
+<p>You must instead say this:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">u"voix m’a réveillé."</span><span class="cp">}</span>  <span class="cp">## OK !</span><span class="x"></span>
+</pre></div>
+</div>
+<p>Similarly, if you are reading data from a file that is streaming
+bytes, or returning data from some object that is returning a
+Python byte-string containing a non-ASCII encoding, you have to
+explicitly decode to unicode first, such as:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="n">call_my_object</span><span class="p">()</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s">'utf-8'</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+</pre></div>
+</div>
+<p>Note that filehandles acquired by <tt class="docutils literal"><span class="pre">open()</span></tt> in Python 3 default
+to returning “text”, that is the decoding is done for you. See
+Python 3’s documentation for the <tt class="docutils literal"><span class="pre">open()</span></tt> built-in for details on
+this.</p>
+<p>If you want a certain encoding applied to <em>all</em> expressions,
+override the <tt class="docutils literal"><span class="pre">unicode</span></tt> builtin with the <tt class="docutils literal"><span class="pre">decode</span></tt> built-in at the
+<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> or <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> level:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="n">templatetext</span><span class="p">,</span> <span class="n">default_filters</span><span class="o">=</span><span class="p">[</span><span class="s">'decode.utf8'</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>Note that the built-in <tt class="docutils literal"><span class="pre">decode</span></tt> object is slower than the
+<tt class="docutils literal"><span class="pre">unicode</span></tt> function, since unlike <tt class="docutils literal"><span class="pre">unicode</span></tt> it’s not a Python
+built-in, and it also checks the type of the incoming data to
+determine if string conversion is needed first.</p>
+<p>The <tt class="docutils literal"><span class="pre">default_filters</span></tt> argument can be used to entirely customize
+the filtering process of expressions. This argument is described
+in <a class="reference internal" href="filtering.html#filtering-default-filters"><em>The default_filters Argument</em></a>.</p>
+</div>
+<div class="section" id="defining-output-encoding">
+<span id="id1"></span><h2>Defining Output Encoding<a class="headerlink" href="#defining-output-encoding" title="Permalink to this headline">¶</a></h2>
+<p>Now that we have a template which produces a pure unicode output
+stream, all the hard work is done. We can take the output and do
+anything with it.</p>
+<p>As stated in the <a class="reference internal" href="usage.html"><em>“Usage” chapter</em></a>, both <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> and
+<a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> accept <tt class="docutils literal"><span class="pre">output_encoding</span></tt> and <tt class="docutils literal"><span class="pre">encoding_errors</span></tt>
+parameters which can be used to encode the output in any Python
+supported codec:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
+<span class="kn">from</span> <span class="nn">mako.lookup</span> <span class="kn">import</span> <span class="n">TemplateLookup</span>
+
+<span class="n">mylookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/docs'</span><span class="p">],</span> <span class="n">output_encoding</span><span class="o">=</span><span class="s">'utf-8'</span><span class="p">,</span> <span class="n">encoding_errors</span><span class="o">=</span><span class="s">'replace'</span><span class="p">)</span>
+
+<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">mylookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="s">"foo.txt"</span><span class="p">)</span>
+<span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
+</pre></div>
+</div>
+<p><a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> will return a <tt class="docutils literal"><span class="pre">bytes</span></tt> object in Python 3 if an output
+encoding is specified. By default it performs no encoding and
+returns a native string.</p>
+<p><a class="reference internal" href="usage.html#mako.template.Template.render_unicode" title="mako.template.Template.render_unicode"><tt class="xref py py-meth docutils literal"><span class="pre">render_unicode()</span></tt></a> will return the template output as a Python
+<tt class="docutils literal"><span class="pre">unicode</span></tt> object (or <tt class="docutils literal"><span class="pre">string</span></tt> in Python 3):</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render_unicode</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>The above method disgards the output encoding keyword argument;
+you can encode yourself by saying:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render_unicode</span><span class="p">()</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s">'utf-8'</span><span class="p">,</span> <span class="s">'replace'</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="section" id="buffer-selection">
+<h3>Buffer Selection<a class="headerlink" href="#buffer-selection" title="Permalink to this headline">¶</a></h3>
+<p>Mako does play some games with the style of buffering used
+internally, to maximize performance. Since the buffer is by far
+the most heavily used object in a render operation, it’s
+important!</p>
+<p>When calling <a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> on a template that does not specify any
+output encoding (i.e. it’s <tt class="docutils literal"><span class="pre">ascii</span></tt>), Python’s <tt class="docutils literal"><span class="pre">cStringIO</span></tt> module,
+which cannot handle encoding of non-ASCII <tt class="docutils literal"><span class="pre">unicode</span></tt> objects
+(even though it can send raw byte-strings through), is used for
+buffering. Otherwise, a custom Mako class called
+<tt class="docutils literal"><span class="pre">FastEncodingBuffer</span></tt> is used, which essentially is a super
+dumbed-down version of <tt class="docutils literal"><span class="pre">StringIO</span></tt> that gathers all strings into
+a list and uses <tt class="docutils literal"><span class="pre">u''.join(elements)</span></tt> to produce the final output
+– it’s markedly faster than <tt class="docutils literal"><span class="pre">StringIO</span></tt>.</p>
+</div>
+</div>
+<div class="section" id="saying-to-heck-with-it-disabling-the-usage-of-unicode-entirely">
+<span id="unicode-disabled"></span><h2>Saying to Heck with It: Disabling the Usage of Unicode Entirely<a class="headerlink" href="#saying-to-heck-with-it-disabling-the-usage-of-unicode-entirely" title="Permalink to this headline">¶</a></h2>
+<p>Some segments of Mako’s userbase choose to make no usage of
+Unicode whatsoever, and instead would prefer the “pass through”
+approach; all string expressions in their templates return
+encoded byte-strings, and they would like these strings to pass
+right through. The only advantage to this approach is that
+templates need not use <tt class="docutils literal"><span class="pre">u""</span></tt> for literal strings; there’s an
+arguable speed improvement as well since raw byte-strings
+generally perform slightly faster than unicode objects in
+Python. For these users, assuming they’re sticking with Python
+2, they can hit the <tt class="docutils literal"><span class="pre">disable_unicode=True</span></tt> flag as so:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># -*- encoding:utf-8 -*-</span>
+<span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
+
+<span class="n">t</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"drôle de petite voix m’a réveillé."</span><span class="p">,</span> <span class="n">disable_unicode</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">input_encoding</span><span class="o">=</span><span class="s">'utf-8'</span><span class="p">)</span>
+<span class="k">print</span> <span class="n">t</span><span class="o">.</span><span class="n">code</span>
+</pre></div>
+</div>
+<p>The <tt class="docutils literal"><span class="pre">disable_unicode</span></tt> mode is strictly a Python 2 thing. It is
+not supported at all in Python 3.</p>
+<p>The generated module source code will contain elements like
+these:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># -*- encoding:utf-8 -*-</span>
+<span class="c">#  ...more generated code ...</span>
+
+<span class="k">def</span> <span class="nf">render_body</span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="o">**</span><span class="n">pageargs</span><span class="p">):</span>
+    <span class="n">context</span><span class="o">.</span><span class="n">caller_stack</span><span class="o">.</span><span class="n">push_frame</span><span class="p">()</span>
+    <span class="k">try</span><span class="p">:</span>
+        <span class="n">__M_locals</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="n">pageargs</span><span class="o">=</span><span class="n">pageargs</span><span class="p">)</span>
+        <span class="c"># SOURCE LINE 1</span>
+        <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">'dr</span><span class="se">\xc3\xb4</span><span class="s">le de petite voix m</span><span class="se">\xe2\x80\x99</span><span class="s">a r</span><span class="se">\xc3\xa9</span><span class="s">veill</span><span class="se">\xc3\xa9</span><span class="s">.'</span><span class="p">)</span>
+        <span class="k">return</span> <span class="s">''</span>
+    <span class="k">finally</span><span class="p">:</span>
+        <span class="n">context</span><span class="o">.</span><span class="n">caller_stack</span><span class="o">.</span><span class="n">pop_frame</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Where above that the string literal used within <a class="reference internal" href="runtime.html#mako.runtime.Context.write" title="mako.runtime.Context.write"><tt class="xref py py-meth docutils literal"><span class="pre">Context.write()</span></tt></a>
+is a regular byte-string.</p>
+<p>When <tt class="docutils literal"><span class="pre">disable_unicode=True</span></tt> is turned on, the <tt class="docutils literal"><span class="pre">default_filters</span></tt>
+argument which normally defaults to <tt class="docutils literal"><span class="pre">["unicode"]</span></tt> now defaults
+to <tt class="docutils literal"><span class="pre">["str"]</span></tt> instead. Setting <tt class="docutils literal"><span class="pre">default_filters</span></tt> to the empty list
+<tt class="docutils literal"><span class="pre">[]</span></tt> can remove the overhead of the <tt class="docutils literal"><span class="pre">str</span></tt> call. Also, in this
+mode you <strong>cannot</strong> safely call <a class="reference internal" href="usage.html#mako.template.Template.render_unicode" title="mako.template.Template.render_unicode"><tt class="xref py py-meth docutils literal"><span class="pre">render_unicode()</span></tt></a> – you’ll get
+unicode/decode errors.</p>
+<p>The <tt class="docutils literal"><span class="pre">h</span></tt> filter (HTML escape) uses a less performant pure Python
+escape function in non-unicode mode. This because
+MarkupSafe only supports Python unicode objects for non-ASCII
+strings.</p>
+<p class="versionchanged">
+<span class="versionmodified">Changed in version 0.3.4: </span>In prior versions, it used <tt class="docutils literal"><span class="pre">cgi.escape()</span></tt>, which has been replaced
+with a function that also escapes single quotes.</p>
+<div class="section" id="rules-for-using-disable-unicode-true">
+<h3>Rules for using <tt class="docutils literal"><span class="pre">disable_unicode=True</span></tt><a class="headerlink" href="#rules-for-using-disable-unicode-true" title="Permalink to this headline">¶</a></h3>
+<ul class="simple">
+<li>Don’t use this mode unless you really, really want to and you
+absolutely understand what you’re doing.</li>
+<li>Don’t use this option just because you don’t want to learn to
+use Unicode properly; we aren’t supporting user issues in this
+mode of operation. We will however offer generous help for the
+vast majority of users who stick to the Unicode program.</li>
+<li>Python 3 is unicode by default, and the flag is not available
+when running on Python 3.</li>
+</ul>
+</div>
+</div>
+</div>
+
+    </div>
+
+</div>
+
+<div id="docs-bottom-navigation" class="docs-navigation-links">
+        Previous:
+        <a href="filtering.html" title="previous chapter">Filtering and Buffering</a>
+        Next:
+        <a href="caching.html" title="next chapter">Caching</a>
+
+    <div id="docs-copyright">
+        © Copyright the Mako authors and contributors.
+        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
+        with Mako templates.
+    </div>
+</div>
+
+</div>
+
+<div class="clearfix">
+
+<hr/>
+
+<div class="copyright">Website content copyright © by Michael Bayer.
+    All rights reserved.  Mako and its documentation are licensed
+    under the MIT license.  mike(&)zzzcomputing.com</div>
+
+</div>
+</div>
+</body>
+</html>
diff --git a/lib/Mako-0.7.3/doc/usage.html b/lib/Mako-0.7.3/doc/usage.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/doc/usage.html
@@ -0,0 +1,1057 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<head>
+<title>
+    
+                Usage
+             — 
+    Mako 0.7.3 Documentation
+</title>
+
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
+
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+          URL_ROOT:    '#',
+          VERSION:     '0.7.3',
+          COLLAPSE_MODINDEX: false,
+          FILE_SUFFIX: '.html'
+      };
+    </script>
+        <script type="text/javascript" src="_static/jquery.js"></script>
+        <script type="text/javascript" src="_static/underscore.js"></script>
+        <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="top" title="Mako 0.7.3 Documentation" href="index.html" />
+        <link rel="next" title="Syntax" href="syntax.html" />
+        <link rel="prev" title="Table of Contents" href="index.html" />
+
+<link rel="stylesheet" href="_static/site.css"></link>
+
+
+</head>
+<body>
+    <div id="wrap">
+    <div class="rightbar">
+
+
+    <div class="slogan">
+    Hyperfast and lightweight templating for the Python platform.
+    </div>
+
+
+    </div>
+
+    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
+
+    <hr/>
+
+    
+
+
+
+
+
+
+
+
+
+<div id="docs-container">
+
+
+
+<div id="docs-header">
+    <h1>Mako 0.7.3 Documentation</h1>
+
+    <div id="docs-search">
+    Search:
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </div>
+
+    <div id="docs-version-header">
+        Release: <span class="version-num">0.7.3</span>
+
+    </div>
+
+</div>
+
+<div id="docs-top-navigation">
+    <div id="docs-top-page-control" class="docs-navigation-links">
+        <ul>
+            <li>Prev:
+            <a href="index.html" title="previous chapter">Table of Contents</a>
+            </li>
+            <li>Next:
+            <a href="syntax.html" title="next chapter">Syntax</a>
+            </li>
+
+        <li>
+            <a href="index.html">Table of Contents</a> |
+            <a href="genindex.html">Index</a>
+            | <a href="_sources/usage.txt">view source
+        </li>
+        </ul>
+    </div>
+
+    <div id="docs-navigation-banner">
+        <a href="index.html">Mako 0.7.3 Documentation</a>
+        » 
+                Usage
+             
+
+        <h2>
+            
+                Usage
+            
+        </h2>
+    </div>
+
+</div>
+
+<div id="docs-body-container">
+
+    <div id="docs-sidebar">
+    <h3><a href="index.html">Table of Contents</a></h3>
+    <ul>
+<li><a class="reference internal" href="#">Usage</a><ul>
+<li><a class="reference internal" href="#basic-usage">Basic Usage</a></li>
+<li><a class="reference internal" href="#using-file-based-templates">Using File-Based Templates</a></li>
+<li><a class="reference internal" href="#using-templatelookup">Using <tt class="docutils literal"><span class="pre">TemplateLookup</span></tt></a><ul>
+<li><a class="reference internal" href="#setting-the-collection-size">Setting the Collection Size</a></li>
+<li><a class="reference internal" href="#setting-filesystem-checks">Setting Filesystem Checks</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#using-unicode-and-encoding">Using Unicode and Encoding</a></li>
+<li><a class="reference internal" href="#handling-exceptions">Handling Exceptions</a></li>
+<li><a class="reference internal" href="#common-framework-integrations">Common Framework Integrations</a><ul>
+<li><a class="reference internal" href="#wsgi">WSGI</a></li>
+<li><a class="reference internal" href="#pygments">Pygments</a></li>
+<li><a class="reference internal" href="#babel">Babel</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#api-reference">API Reference</a></li>
+</ul>
+</li>
+</ul>
+
+
+    <h4>Previous Topic</h4>
+    <p>
+    <a href="index.html" title="previous chapter">Table of Contents</a>
+    </p>
+    <h4>Next Topic</h4>
+    <p>
+    <a href="syntax.html" title="next chapter">Syntax</a>
+    </p>
+
+    <h4>Quick Search</h4>
+    <p>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    </p>
+
+    </div>
+
+    <div id="docs-body" class="withsidebar" >
+        
+<div class="section" id="usage">
+<span id="usage-toplevel"></span><h1>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="basic-usage">
+<h2>Basic Usage<a class="headerlink" href="#basic-usage" title="Permalink to this headline">¶</a></h2>
+<p>This section describes the Python API for Mako templates. If you
+are using Mako within a web framework such as Pylons, the work
+of integrating Mako’s API is already done for you, in which case
+you can skip to the next section, <a class="reference internal" href="syntax.html"><em>Syntax</em></a>.</p>
+<p>The most basic way to create a template and render it is through
+the <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> class:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
+
+<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"hello world!"</span><span class="p">)</span>
+<span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Above, the text argument to <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> is <strong>compiled</strong> into a
+Python module representation. This module contains a function
+called <tt class="docutils literal"><span class="pre">render_body()</span></tt>, which produces the output of the
+template. When <tt class="docutils literal"><span class="pre">mytemplate.render()</span></tt> is called, Mako sets up a
+runtime environment for the template and calls the
+<tt class="docutils literal"><span class="pre">render_body()</span></tt> function, capturing the output into a buffer and
+returning its string contents.</p>
+<p>The code inside the <tt class="docutils literal"><span class="pre">render_body()</span></tt> function has access to a
+namespace of variables. You can specify these variables by
+sending them as additional keyword arguments to the <a class="reference internal" href="#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a>
+method:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
+
+<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"hello, ${name}!"</span><span class="p">)</span>
+<span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">"jack"</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The <a class="reference internal" href="#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> method calls upon Mako to create a
+<a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object, which stores all the variable names accessible
+to the template and also stores a buffer used to capture output.
+You can create this <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> yourself and have the template
+render with it, using the <a class="reference internal" href="#mako.template.Template.render_context" title="mako.template.Template.render_context"><tt class="xref py py-meth docutils literal"><span class="pre">render_context()</span></tt></a> method:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
+<span class="kn">from</span> <span class="nn">mako.runtime</span> <span class="kn">import</span> <span class="n">Context</span>
+<span class="kn">from</span> <span class="nn">StringIO</span> <span class="kn">import</span> <span class="n">StringIO</span>
+
+<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"hello, ${name}!"</span><span class="p">)</span>
+<span class="n">buf</span> <span class="o">=</span> <span class="n">StringIO</span><span class="p">()</span>
+<span class="n">ctx</span> <span class="o">=</span> <span class="n">Context</span><span class="p">(</span><span class="n">buf</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s">"jack"</span><span class="p">)</span>
+<span class="n">mytemplate</span><span class="o">.</span><span class="n">render_context</span><span class="p">(</span><span class="n">ctx</span><span class="p">)</span>
+<span class="k">print</span> <span class="n">buf</span><span class="o">.</span><span class="n">getvalue</span><span class="p">()</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="using-file-based-templates">
+<h2>Using File-Based Templates<a class="headerlink" href="#using-file-based-templates" title="Permalink to this headline">¶</a></h2>
+<p>A <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> can also load its template source code from a file,
+using the <tt class="docutils literal"><span class="pre">filename</span></tt> keyword argument:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
+
+<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="s">'/docs/mytmpl.txt'</span><span class="p">)</span>
+<span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>For improved performance, a <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> which is loaded from a
+file can also cache the source code to its generated module on
+the filesystem as a regular Python module file (i.e. a <tt class="docutils literal"><span class="pre">.py</span></tt>
+file). To do this, just add the <tt class="docutils literal"><span class="pre">module_directory</span></tt> argument to
+the template:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
+
+<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="s">'/docs/mytmpl.txt'</span><span class="p">,</span> <span class="n">module_directory</span><span class="o">=</span><span class="s">'/tmp/mako_modules'</span><span class="p">)</span>
+<span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>When the above code is rendered, a file
+<tt class="docutils literal"><span class="pre">/tmp/mako_modules/docs/mytmpl.txt.py</span></tt> is created containing the
+source code for the module. The next time a <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> with the
+same arguments is created, this module file will be
+automatically re-used.</p>
+</div>
+<div class="section" id="using-templatelookup">
+<span id="usage-templatelookup"></span><h2>Using <tt class="docutils literal"><span class="pre">TemplateLookup</span></tt><a class="headerlink" href="#using-templatelookup" title="Permalink to this headline">¶</a></h2>
+<p>All of the examples thus far have dealt with the usage of a
+single <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object. If the code within those templates
+tries to locate another template resource, it will need some way
+to find them, using simple URI strings. For this need, the
+resolution of other templates from within a template is
+accomplished by the <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> class. This class is
+constructed given a list of directories in which to search for
+templates, as well as keyword arguments that will be passed to
+the <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> objects it creates:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
+<span class="kn">from</span> <span class="nn">mako.lookup</span> <span class="kn">import</span> <span class="n">TemplateLookup</span>
+
+<span class="n">mylookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/docs'</span><span class="p">])</span>
+<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"""<</span><span class="si">%i</span><span class="s">nclude file="header.txt"/> hello world!"""</span><span class="p">,</span> <span class="n">lookup</span><span class="o">=</span><span class="n">mylookup</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>Above, we created a textual template which includes the file
+<tt class="docutils literal"><span class="pre">"header.txt"</span></tt>. In order for it to have somewhere to look for
+<tt class="docutils literal"><span class="pre">"header.txt"</span></tt>, we passed a <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> object to it, which
+will search in the directory <tt class="docutils literal"><span class="pre">/docs</span></tt> for the file <tt class="docutils literal"><span class="pre">"header.txt"</span></tt>.</p>
+<p>Usually, an application will store most or all of its templates
+as text files on the filesystem. So far, all of our examples
+have been a little bit contrived in order to illustrate the
+basic concepts. But a real application would get most or all of
+its templates directly from the <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>, using the
+aptly named <a class="reference internal" href="#mako.lookup.TemplateLookup.get_template" title="mako.lookup.TemplateLookup.get_template"><tt class="xref py py-meth docutils literal"><span class="pre">get_template()</span></tt></a> method, which accepts the URI of the
+desired template:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
+<span class="kn">from</span> <span class="nn">mako.lookup</span> <span class="kn">import</span> <span class="n">TemplateLookup</span>
+
+<span class="n">mylookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/docs'</span><span class="p">],</span> <span class="n">module_directory</span><span class="o">=</span><span class="s">'/tmp/mako_modules'</span><span class="p">)</span>
+
+<span class="k">def</span> <span class="nf">serve_template</span><span class="p">(</span><span class="n">templatename</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+    <span class="n">mytemplate</span> <span class="o">=</span> <span class="n">mylookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="n">templatename</span><span class="p">)</span>
+    <span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>In the example above, we create a <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> which will
+look for templates in the <tt class="docutils literal"><span class="pre">/docs</span></tt> directory, and will store
+generated module files in the <tt class="docutils literal"><span class="pre">/tmp/mako_modules</span></tt> directory. The
+lookup locates templates by appending the given URI to each of
+its search directories; so if you gave it a URI of
+<tt class="docutils literal"><span class="pre">/etc/beans/info.txt</span></tt>, it would search for the file
+<tt class="docutils literal"><span class="pre">/docs/etc/beans/info.txt</span></tt>, else raise a <tt class="xref py py-class docutils literal"><span class="pre">TopLevelNotFound</span></tt>
+exception, which is a custom Mako exception.</p>
+<p>When the lookup locates templates, it will also assign a <tt class="docutils literal"><span class="pre">uri</span></tt>
+property to the <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> which is the URI passed to the
+<a class="reference internal" href="#mako.lookup.TemplateLookup.get_template" title="mako.lookup.TemplateLookup.get_template"><tt class="xref py py-meth docutils literal"><span class="pre">get_template()</span></tt></a> call. <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> uses this URI to calculate the
+name of its module file. So in the above example, a
+<tt class="docutils literal"><span class="pre">templatename</span></tt> argument of <tt class="docutils literal"><span class="pre">/etc/beans/info.txt</span></tt> will create a
+module file <tt class="docutils literal"><span class="pre">/tmp/mako_modules/etc/beans/info.txt.py</span></tt>.</p>
+<div class="section" id="setting-the-collection-size">
+<h3>Setting the Collection Size<a class="headerlink" href="#setting-the-collection-size" title="Permalink to this headline">¶</a></h3>
+<p>The <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> also serves the important need of caching a
+fixed set of templates in memory at a given time, so that
+successive URI lookups do not result in full template
+compilations and/or module reloads on each request. By default,
+the <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> size is unbounded. You can specify a fixed
+size using the <tt class="docutils literal"><span class="pre">collection_size</span></tt> argument:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">mylookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/docs'</span><span class="p">],</span>
+                <span class="n">module_directory</span><span class="o">=</span><span class="s">'/tmp/mako_modules'</span><span class="p">,</span> <span class="n">collection_size</span><span class="o">=</span><span class="mi">500</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The above lookup will continue to load templates into memory
+until it reaches a count of around 500. At that point, it will
+clean out a certain percentage of templates using a least
+recently used scheme.</p>
+</div>
+<div class="section" id="setting-filesystem-checks">
+<h3>Setting Filesystem Checks<a class="headerlink" href="#setting-filesystem-checks" title="Permalink to this headline">¶</a></h3>
+<p>Another important flag on <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> is
+<tt class="docutils literal"><span class="pre">filesystem_checks</span></tt>. This defaults to <tt class="docutils literal"><span class="pre">True</span></tt>, and says that each
+time a template is returned by the <a class="reference internal" href="#mako.lookup.TemplateLookup.get_template" title="mako.lookup.TemplateLookup.get_template"><tt class="xref py py-meth docutils literal"><span class="pre">get_template()</span></tt></a> method, the
+revision time of the original template file is checked against
+the last time the template was loaded, and if the file is newer
+will reload its contents and recompile the template. On a
+production system, setting <tt class="docutils literal"><span class="pre">filesystem_checks</span></tt> to <tt class="docutils literal"><span class="pre">False</span></tt> can
+afford a small to moderate performance increase (depending on
+the type of filesystem used).</p>
+</div>
+</div>
+<div class="section" id="using-unicode-and-encoding">
+<span id="usage-unicode"></span><h2>Using Unicode and Encoding<a class="headerlink" href="#using-unicode-and-encoding" title="Permalink to this headline">¶</a></h2>
+<p>Both <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> and <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> accept <tt class="docutils literal"><span class="pre">output_encoding</span></tt>
+and <tt class="docutils literal"><span class="pre">encoding_errors</span></tt> parameters which can be used to encode the
+output in any Python supported codec:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
+<span class="kn">from</span> <span class="nn">mako.lookup</span> <span class="kn">import</span> <span class="n">TemplateLookup</span>
+
+<span class="n">mylookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/docs'</span><span class="p">],</span> <span class="n">output_encoding</span><span class="o">=</span><span class="s">'utf-8'</span><span class="p">,</span> <span class="n">encoding_errors</span><span class="o">=</span><span class="s">'replace'</span><span class="p">)</span>
+
+<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">mylookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="s">"foo.txt"</span><span class="p">)</span>
+<span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>When using Python 3, the <a class="reference internal" href="#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> method will return a <tt class="docutils literal"><span class="pre">bytes</span></tt>
+object, <strong>if</strong> <tt class="docutils literal"><span class="pre">output_encoding</span></tt> is set. Otherwise it returns a
+<tt class="docutils literal"><span class="pre">string</span></tt>.</p>
+<p>Additionally, the <a class="reference internal" href="#mako.template.Template.render_unicode" title="mako.template.Template.render_unicode"><tt class="xref py py-meth docutils literal"><span class="pre">render_unicode()</span></tt></a> method exists which will
+return the template output as a Python <tt class="docutils literal"><span class="pre">unicode</span></tt> object, or in
+Python 3 a <tt class="docutils literal"><span class="pre">string</span></tt>:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render_unicode</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>The above method disregards the output encoding keyword
+argument; you can encode yourself by saying:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render_unicode</span><span class="p">()</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s">'utf-8'</span><span class="p">,</span> <span class="s">'replace'</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>Note that Mako’s ability to return data in any encoding and/or
+<tt class="docutils literal"><span class="pre">unicode</span></tt> implies that the underlying output stream of the
+template is a Python unicode object. This behavior is described
+fully in <a class="reference internal" href="unicode.html"><em>The Unicode Chapter</em></a>.</p>
+</div>
+<div class="section" id="handling-exceptions">
+<span id="id1"></span><h2>Handling Exceptions<a class="headerlink" href="#handling-exceptions" title="Permalink to this headline">¶</a></h2>
+<p>Template exceptions can occur in two distinct places. One is
+when you <strong>lookup, parse and compile</strong> the template, the other
+is when you <strong>run</strong> the template. Within the running of a
+template, exceptions are thrown normally from whatever Python
+code originated the issue. Mako has its own set of exception
+classes which mostly apply to the lookup and lexer/compiler
+stages of template construction. Mako provides some library
+routines that can be used to help provide Mako-specific
+information about any exception’s stack trace, as well as
+formatting the exception within textual or HTML format. In all
+cases, the main value of these handlers is that of converting
+Python filenames, line numbers, and code samples into Mako
+template filenames, line numbers, and code samples. All lines
+within a stack trace which correspond to a Mako template module
+will be converted to be against the originating template file.</p>
+<p>To format exception traces, the <a class="reference internal" href="#mako.exceptions.text_error_template" title="mako.exceptions.text_error_template"><tt class="xref py py-func docutils literal"><span class="pre">text_error_template()</span></tt></a> and
+<a class="reference internal" href="#mako.exceptions.html_error_template" title="mako.exceptions.html_error_template"><tt class="xref py py-func docutils literal"><span class="pre">html_error_template()</span></tt></a> functions are provided. They make usage of
+<tt class="docutils literal"><span class="pre">sys.exc_info()</span></tt> to get at the most recently thrown exception.
+Usage of these handlers usually looks like:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako</span> <span class="kn">import</span> <span class="n">exceptions</span>
+
+<span class="k">try</span><span class="p">:</span>
+    <span class="n">template</span> <span class="o">=</span> <span class="n">lookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="n">uri</span><span class="p">)</span>
+    <span class="k">print</span> <span class="n">template</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
+<span class="k">except</span><span class="p">:</span>
+    <span class="k">print</span> <span class="n">exceptions</span><span class="o">.</span><span class="n">text_error_template</span><span class="p">()</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Or for the HTML render function:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako</span> <span class="kn">import</span> <span class="n">exceptions</span>
+
+<span class="k">try</span><span class="p">:</span>
+    <span class="n">template</span> <span class="o">=</span> <span class="n">lookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="n">uri</span><span class="p">)</span>
+    <span class="k">print</span> <span class="n">template</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
+<span class="k">except</span><span class="p">:</span>
+    <span class="k">print</span> <span class="n">exceptions</span><span class="o">.</span><span class="n">html_error_template</span><span class="p">()</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>The <a class="reference internal" href="#mako.exceptions.html_error_template" title="mako.exceptions.html_error_template"><tt class="xref py py-func docutils literal"><span class="pre">html_error_template()</span></tt></a> template accepts two options:
+specifying <tt class="docutils literal"><span class="pre">full=False</span></tt> causes only a section of an HTML
+document to be rendered. Specifying <tt class="docutils literal"><span class="pre">css=False</span></tt> will disable the
+default stylesheet from being rendered.</p>
+<p>E.g.:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="k">print</span> <span class="n">exceptions</span><span class="o">.</span><span class="n">html_error_template</span><span class="p">()</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="n">full</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The HTML render function is also available built-in to
+<a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> using the <tt class="docutils literal"><span class="pre">format_exceptions</span></tt> flag. In this case, any
+exceptions raised within the <strong>render</strong> stage of the template
+will result in the output being substituted with the output of
+<a class="reference internal" href="#mako.exceptions.html_error_template" title="mako.exceptions.html_error_template"><tt class="xref py py-func docutils literal"><span class="pre">html_error_template()</span></tt></a>:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">template</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="s">"/foo/bar"</span><span class="p">,</span> <span class="n">format_exceptions</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
+<span class="k">print</span> <span class="n">template</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Note that the compile stage of the above template occurs when
+you construct the <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> itself, and no output stream is
+defined. Therefore exceptions which occur within the
+lookup/parse/compile stage will not be handled and will
+propagate normally. While the pre-render traceback usually will
+not include any Mako-specific lines anyway, it will mean that
+exceptions which occur previous to rendering and those which
+occur within rendering will be handled differently... so the
+<tt class="docutils literal"><span class="pre">try</span></tt>/<tt class="docutils literal"><span class="pre">except</span></tt> patterns described previously are probably of more
+general use.</p>
+<p>The underlying object used by the error template functions is
+the <a class="reference internal" href="#mako.exceptions.RichTraceback" title="mako.exceptions.RichTraceback"><tt class="xref py py-class docutils literal"><span class="pre">RichTraceback</span></tt></a> object. This object can also be used
+directly to provide custom error views. Here’s an example usage
+which describes its general API:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.exceptions</span> <span class="kn">import</span> <span class="n">RichTraceback</span>
+
+<span class="k">try</span><span class="p">:</span>
+    <span class="n">template</span> <span class="o">=</span> <span class="n">lookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="n">uri</span><span class="p">)</span>
+    <span class="k">print</span> <span class="n">template</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
+<span class="k">except</span><span class="p">:</span>
+    <span class="n">traceback</span> <span class="o">=</span> <span class="n">RichTraceback</span><span class="p">()</span>
+    <span class="k">for</span> <span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">lineno</span><span class="p">,</span> <span class="n">function</span><span class="p">,</span> <span class="n">line</span><span class="p">)</span> <span class="ow">in</span> <span class="n">traceback</span><span class="o">.</span><span class="n">traceback</span><span class="p">:</span>
+        <span class="k">print</span> <span class="s">"File </span><span class="si">%s</span><span class="s">, line </span><span class="si">%s</span><span class="s">, in </span><span class="si">%s</span><span class="s">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">lineno</span><span class="p">,</span> <span class="n">function</span><span class="p">)</span>
+        <span class="k">print</span> <span class="n">line</span><span class="p">,</span> <span class="s">"</span><span class="se">\n</span><span class="s">"</span>
+    <span class="k">print</span> <span class="s">"</span><span class="si">%s</span><span class="s">: </span><span class="si">%s</span><span class="s">"</span> <span class="o">%</span> <span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">traceback</span><span class="o">.</span><span class="n">error</span><span class="o">.</span><span class="n">__class__</span><span class="o">.</span><span class="n">__name__</span><span class="p">),</span> <span class="n">traceback</span><span class="o">.</span><span class="n">error</span><span class="p">)</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="common-framework-integrations">
+<h2>Common Framework Integrations<a class="headerlink" href="#common-framework-integrations" title="Permalink to this headline">¶</a></h2>
+<p>The Mako distribution includes a little bit of helper code for
+the purpose of using Mako in some popular web framework
+scenarios. This is a brief description of what’s included.</p>
+<div class="section" id="wsgi">
+<h3>WSGI<a class="headerlink" href="#wsgi" title="Permalink to this headline">¶</a></h3>
+<p>A sample WSGI application is included in the distribution in the
+file <tt class="docutils literal"><span class="pre">examples/wsgi/run_wsgi.py</span></tt>. This runner is set up to pull
+files from a <cite>templates</cite> as well as an <cite>htdocs</cite> directory and
+includes a rudimental two-file layout. The WSGI runner acts as a
+fully functional standalone web server, using <tt class="docutils literal"><span class="pre">wsgiutils</span></tt> to run
+itself, and propagates GET and POST arguments from the request
+into the <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>, can serve images, CSS files and other kinds
+of files, and also displays errors using Mako’s included
+exception-handling utilities.</p>
+</div>
+<div class="section" id="pygments">
+<h3>Pygments<a class="headerlink" href="#pygments" title="Permalink to this headline">¶</a></h3>
+<p>A <a class="reference external" href="http://pygments.pocoo.org">Pygments</a>-compatible syntax
+highlighting module is included under <tt class="xref py py-mod docutils literal"><span class="pre">mako.ext.pygmentplugin</span></tt>.
+This module is used in the generation of Mako documentation and
+also contains various <cite>setuptools</cite> entry points under the heading
+<tt class="docutils literal"><span class="pre">pygments.lexers</span></tt>, including <tt class="docutils literal"><span class="pre">mako</span></tt>, <tt class="docutils literal"><span class="pre">html+mako</span></tt>, <tt class="docutils literal"><span class="pre">xml+mako</span></tt>
+(see the <tt class="docutils literal"><span class="pre">setup.py</span></tt> file for all the entry points).</p>
+</div>
+<div class="section" id="babel">
+<h3>Babel<a class="headerlink" href="#babel" title="Permalink to this headline">¶</a></h3>
+<p>Mako provides support for extracting <cite>gettext</cite> messages from
+templates via a <a class="reference external" href="http://babel.edgewall.org/">Babel</a> extractor
+entry point under <tt class="docutils literal"><span class="pre">mako.ext.babelplugin</span></tt>.</p>
+<p><cite>Gettext</cite> messages are extracted from all Python code sections,
+including those of control lines and expressions embedded
+in tags.</p>
+<p><a class="reference external" href="http://babel.edgewall.org/wiki/Documentation/messages.html#comments-tags-and-translator-comments-explanation">Translator
+comments</a>
+may also be extracted from Mako templates when a comment tag is
+specified to <a class="reference external" href="http://babel.edgewall.org/">Babel</a> (such as with
+the <tt class="docutils literal"><span class="pre">-c</span></tt> option).</p>
+<p>For example, a project <tt class="docutils literal"><span class="pre">"myproj"</span></tt> contains the following Mako
+template at <tt class="docutils literal"><span class="pre">myproj/myproj/templates/name.html</span></tt>:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><div id="name"></span>
+<span class="x">  Name:</span>
+<span class="x">  ## TRANSLATORS: This is a proper name. See the gettext</span>
+<span class="x">  ## manual, section Names.</span>
+<span class="x">  </span><span class="cp">${</span><span class="n">_</span><span class="p">(</span><span class="s">'Francois Pinard'</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+<span class="x"></div></span>
+</pre></div>
+</div>
+<p>To extract gettext messages from this template the project needs
+a Mako section in its <a class="reference external" href="http://babel.edgewall.org/wiki/Documentation/messages.html#extraction-method-mapping-and-configuration">Babel Extraction Method Mapping
+file</a>
+(typically located at <tt class="docutils literal"><span class="pre">myproj/babel.cfg</span></tt>):</p>
+<div class="highlight-cfg"><div class="highlight"><pre><span class="c"># Extraction from Python source files</span>
+
+<span class="k">[python: myproj/**.py]</span>
+
+<span class="c"># Extraction from Mako templates</span>
+
+<span class="k">[mako: myproj/templates/**.html]</span>
+<span class="na">input_encoding</span> <span class="o">=</span> <span class="s">utf-8</span>
+</pre></div>
+</div>
+<p>The Mako extractor supports an optional <tt class="docutils literal"><span class="pre">input_encoding</span></tt>
+parameter specifying the encoding of the templates (identical to
+<a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>/<a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>‘s <tt class="docutils literal"><span class="pre">input_encoding</span></tt> parameter).</p>
+<p>Invoking <a class="reference external" href="http://babel.edgewall.org/">Babel</a>‘s extractor at the
+command line in the project’s root directory:</p>
+<div class="highlight-sh"><div class="highlight"><pre>myproj<span class="nv">$ </span>pybabel extract -F babel.cfg -c <span class="s2">"TRANSLATORS:"</span> .
+</pre></div>
+</div>
+<p>will output a <cite>gettext</cite> catalog to <cite>stdout</cite> including the following:</p>
+<div class="highlight-pot"><div class="highlight"><pre><span class="c1">#. TRANSLATORS: This is a proper name. See the gettext</span>
+<span class="c1">#. manual, section Names.</span>
+<span class="kd">#: myproj/templates/name.html:5</span>
+<span class="nv">msgid</span> <span class="s">"Francois Pinard"</span>
+<span class="nv">msgstr</span> <span class="s">""</span>
+</pre></div>
+</div>
+<p>This is only a basic example:
+<a class="reference external" href="http://babel.edgewall.org/">Babel</a> can be invoked from <tt class="docutils literal"><span class="pre">setup.py</span></tt>
+and its command line options specified in the accompanying
+<tt class="docutils literal"><span class="pre">setup.cfg</span></tt> via <a class="reference external" href="http://babel.edgewall.org/wiki/Documentation/setup.html">Babel Distutils/Setuptools
+Integration</a>.</p>
+<p>Comments must immediately precede a <cite>gettext</cite> message to be
+extracted. In the following case the <tt class="docutils literal"><span class="pre">TRANSLATORS:</span></tt> comment would
+not have been extracted:</p>
+<div class="highlight-mako"><div class="highlight"><pre><span class="x"><div id="name"></span>
+<span class="x">  ## TRANSLATORS: This is a proper name. See the gettext</span>
+<span class="x">  ## manual, section Names.</span>
+<span class="x">  Name: </span><span class="cp">${</span><span class="n">_</span><span class="p">(</span><span class="s">'Francois Pinard'</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
+<span class="x"></div></span>
+</pre></div>
+</div>
+<p>See the <a class="reference external" href="http://babel.edgewall.org/wiki/Documentation/index.html">Babel User
+Guide</a>
+for more information.</p>
+</div>
+</div>
+<div class="section" id="api-reference">
+<h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="mako.template.Template">
+<em class="property">class </em><tt class="descclassname">mako.template.</tt><tt class="descname">Template</tt><big>(</big><em>text=None</em>, <em>filename=None</em>, <em>uri=None</em>, <em>format_exceptions=False</em>, <em>error_handler=None</em>, <em>lookup=None</em>, <em>output_encoding=None</em>, <em>encoding_errors='strict'</em>, <em>module_directory=None</em>, <em>cache_args=None</em>, <em>cache_impl='beaker'</em>, <em>cache_enabled=True</em>, <em>cache_type=None</em>, <em>cache_dir=None</em>, <em>cache_url=None</em>, <em>module_filename=None</em>, <em>input_encoding=None</em>, <em>disable_unicode=False</em>, <em>module_writer=None</em>, <em>bytestring_passthrough=False</em>, <em>default_filters=None</em>, <em>buffer_filters=()</em>, <em>strict_undefined=False</em>, <em>imports=None</em>, <em>enable_loop=True</em>, <em>preprocessor=None</em><big>)</big><a class="headerlink" href="#mako.template.Template" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
+<p>Represents a compiled template.</p>
+<p><a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> includes a reference to the original
+template source (via the <a class="reference internal" href="#RichTraceback.source" title="RichTraceback.source"><tt class="xref py py-attr docutils literal"><span class="pre">source</span></tt></a> attribute)
+as well as the source code of the
+generated Python module (i.e. the <a class="reference internal" href="#mako.template.Template.code" title="mako.template.Template.code"><tt class="xref py py-attr docutils literal"><span class="pre">code</span></tt></a> attribute),
+as well as a reference to an actual Python module.</p>
+<p><a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> is constructed using either a literal string
+representing the template text, or a filename representing a filesystem
+path to a source file.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>text</strong> – textual template source.  This argument is mutually
+exclusive versus the <tt class="docutils literal"><span class="pre">filename</span></tt> parameter.</li>
+<li><strong>filename</strong> – filename of the source template.  This argument is
+mutually exclusive versus the <tt class="docutils literal"><span class="pre">text</span></tt> parameter.</li>
+<li><strong>buffer_filters</strong> – string list of filters to be applied
+to the output of <tt class="docutils literal"><span class="pre">%def</span></tt>s which are buffered, cached, or otherwise
+filtered, after all filters
+defined with the <tt class="docutils literal"><span class="pre">%def</span></tt> itself have been applied. Allows the
+creation of default expression filters that let the output
+of return-valued <tt class="docutils literal"><span class="pre">%def</span></tt>s “opt out” of that filtering via
+passing special attributes or objects.</li>
+<li><strong>bytestring_passthrough</strong> – <p>When <tt class="docutils literal"><span class="pre">True</span></tt>, and <tt class="docutils literal"><span class="pre">output_encoding</span></tt> is
+set to <tt class="docutils literal"><span class="pre">None</span></tt>, and <a class="reference internal" href="#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">Template.render()</span></tt></a> is used to render,
+the <cite>StringIO</cite> or <cite>cStringIO</cite> buffer will be used instead of the
+default “fast” buffer.   This allows raw bytestrings in the
+output stream, such as in expressions, to pass straight
+through to the buffer.  This flag is forced
+to <tt class="docutils literal"><span class="pre">True</span></tt> if <tt class="docutils literal"><span class="pre">disable_unicode</span></tt> is also configured.</p>
+<p class="versionadded">
+<span class="versionmodified">New in version 0.4: </span>Added to provide the same behavior as that of the previous series.</p>
+</li>
+<li><strong>cache_args</strong> – Dictionary of cache configuration arguments that
+will be passed to the <a class="reference internal" href="caching.html#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a>.   See <a class="reference internal" href="caching.html"><em>Caching</em></a>.</li>
+<li><strong>cache_dir</strong> – <p class="deprecated">
+<span class="versionmodified">Deprecated since version 0.6: </span>Use the <tt class="docutils literal"><span class="pre">'dir'</span></tt> argument in the <tt class="docutils literal"><span class="pre">cache_args</span></tt> dictionary.
+See <a class="reference internal" href="caching.html"><em>Caching</em></a>.</p>
+</li>
+<li><strong>cache_enabled</strong> – Boolean flag which enables caching of this
+template.  See <a class="reference internal" href="caching.html"><em>Caching</em></a>.</li>
+<li><strong>cache_impl</strong> – String name of a <a class="reference internal" href="caching.html#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> caching
+implementation to use.   Defaults to <tt class="docutils literal"><span class="pre">'beaker'</span></tt>.</li>
+<li><strong>cache_type</strong> – <p class="deprecated">
+<span class="versionmodified">Deprecated since version 0.6: </span>Use the <tt class="docutils literal"><span class="pre">'type'</span></tt> argument in the <tt class="docutils literal"><span class="pre">cache_args</span></tt> dictionary.
+See <a class="reference internal" href="caching.html"><em>Caching</em></a>.</p>
+</li>
+<li><strong>cache_url</strong> – <p class="deprecated">
+<span class="versionmodified">Deprecated since version 0.6: </span>Use the <tt class="docutils literal"><span class="pre">'url'</span></tt> argument in the <tt class="docutils literal"><span class="pre">cache_args</span></tt> dictionary.
+See <a class="reference internal" href="caching.html"><em>Caching</em></a>.</p>
+</li>
+<li><strong>default_filters</strong> – List of string filter names that will
+be applied to all expressions.  See <a class="reference internal" href="filtering.html#filtering-default-filters"><em>The default_filters Argument</em></a>.</li>
+<li><strong>disable_unicode</strong> – Disables all awareness of Python Unicode
+objects.  See <a class="reference internal" href="unicode.html#unicode-disabled"><em>Saying to Heck with It: Disabling the Usage of Unicode Entirely</em></a>.</li>
+<li><strong>enable_loop</strong> – When <tt class="docutils literal"><span class="pre">True</span></tt>, enable the <tt class="docutils literal"><span class="pre">loop</span></tt> context variable.
+This can be set to <tt class="docutils literal"><span class="pre">False</span></tt> to support templates that may
+be making usage of the name “<tt class="docutils literal"><span class="pre">loop</span></tt>”.   Individual templates can
+re-enable the “loop” context by placing the directive
+<tt class="docutils literal"><span class="pre">enable_loop="True"</span></tt> inside the <tt class="docutils literal"><span class="pre"><%page></span></tt> tag – see
+<a class="reference internal" href="runtime.html#migrating-loop"><em>Migrating Legacy Templates that Use the Word “loop”</em></a>.</li>
+<li><strong>encoding_errors</strong> – Error parameter passed to <tt class="docutils literal"><span class="pre">encode()</span></tt> when
+string encoding is performed. See <a class="reference internal" href="#usage-unicode"><em>Using Unicode and Encoding</em></a>.</li>
+<li><strong>error_handler</strong> – Python callable which is called whenever
+compile or runtime exceptions occur. The callable is passed
+the current context as well as the exception. If the
+callable returns <tt class="docutils literal"><span class="pre">True</span></tt>, the exception is considered to
+be handled, else it is re-raised after the function
+completes. Is used to provide custom error-rendering
+functions.</li>
+<li><strong>format_exceptions</strong> – if <tt class="docutils literal"><span class="pre">True</span></tt>, exceptions which occur during
+the render phase of this template will be caught and
+formatted into an HTML error page, which then becomes the
+rendered result of the <a class="reference internal" href="#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> call. Otherwise,
+runtime exceptions are propagated outwards.</li>
+<li><strong>imports</strong> – String list of Python statements, typically individual
+“import” lines, which will be placed into the module level
+preamble of all generated Python modules. See the example
+in <a class="reference internal" href="filtering.html#filtering-default-filters"><em>The default_filters Argument</em></a>.</li>
+<li><strong>input_encoding</strong> – Encoding of the template’s source code.  Can
+be used in lieu of the coding comment. See
+<a class="reference internal" href="#usage-unicode"><em>Using Unicode and Encoding</em></a> as well as <a class="reference internal" href="unicode.html"><em>The Unicode Chapter</em></a> for
+details on source encoding.</li>
+<li><strong>lookup</strong> – a <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> instance that will be used
+for all file lookups via the <tt class="docutils literal"><span class="pre"><%namespace></span></tt>,
+<tt class="docutils literal"><span class="pre"><%include></span></tt>, and <tt class="docutils literal"><span class="pre"><%inherit></span></tt> tags. See
+<a class="reference internal" href="#usage-templatelookup"><em>Using TemplateLookup</em></a>.</li>
+<li><strong>module_directory</strong> – Filesystem location where generated
+Python module files will be placed.</li>
+<li><strong>module_filename</strong> – Overrides the filename of the generated
+Python module file. For advanced usage only.</li>
+<li><strong>module_writer</strong> – <p>A callable which overrides how the Python
+module is written entirely.  The callable is passed the
+encoded source content of the module and the destination
+path to be written to.   The default behavior of module writing
+uses a tempfile in conjunction with a file move in order
+to make the operation atomic.   So a user-defined module
+writing function that mimics the default behavior would be:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">tempfile</span>
+<span class="kn">import</span> <span class="nn">os</span>
+<span class="kn">import</span> <span class="nn">shutil</span>
+
+<span class="k">def</span> <span class="nf">module_writer</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">outputpath</span><span class="p">):</span>
+    <span class="p">(</span><span class="n">dest</span><span class="p">,</span> <span class="n">name</span><span class="p">)</span> <span class="o">=</span> \
+        <span class="n">tempfile</span><span class="o">.</span><span class="n">mkstemp</span><span class="p">(</span>
+            <span class="nb">dir</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">outputpath</span><span class="p">)</span>
+        <span class="p">)</span>
+
+    <span class="n">os</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">dest</span><span class="p">,</span> <span class="n">source</span><span class="p">)</span>
+    <span class="n">os</span><span class="o">.</span><span class="n">close</span><span class="p">(</span><span class="n">dest</span><span class="p">)</span>
+    <span class="n">shutil</span><span class="o">.</span><span class="n">move</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">outputpath</span><span class="p">)</span>
+
+<span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
+<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span>
+                <span class="nb">file</span><span class="o">=</span><span class="s">"index.html"</span><span class="p">,</span>
+                <span class="n">module_directory</span><span class="o">=</span><span class="s">"/path/to/modules"</span><span class="p">,</span>
+                <span class="n">module_writer</span><span class="o">=</span><span class="n">module_writer</span>
+            <span class="p">)</span>
+</pre></div>
+</div>
+<p>The function is provided for unusual configurations where
+certain platform-specific permissions or other special
+steps are needed.</p>
+</li>
+<li><strong>output_encoding</strong> – The encoding to use when <a class="reference internal" href="#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a>
+is called.
+See <a class="reference internal" href="#usage-unicode"><em>Using Unicode and Encoding</em></a> as well as <a class="reference internal" href="unicode.html"><em>The Unicode Chapter</em></a>.</li>
+<li><strong>preprocessor</strong> – Python callable which will be passed
+the full template source before it is parsed. The return
+result of the callable will be used as the template source
+code.</li>
+<li><strong>strict_undefined</strong> – <p>Replaces the automatic usage of
+<tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> for any undeclared variables not located in
+the <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> with an immediate raise of
+<tt class="docutils literal"><span class="pre">NameError</span></tt>. The advantage is immediate reporting of
+missing variables which include the name.</p>
+<p class="versionadded">
+<span class="versionmodified">New in version 0.3.6.</span></p>
+</li>
+<li><strong>uri</strong> – string URI or other identifier for this template.
+If not provided, the <tt class="docutils literal"><span class="pre">uri</span></tt> is generated from the filesystem
+path, or from the in-memory identity of a non-file-based
+template. The primary usage of the <tt class="docutils literal"><span class="pre">uri</span></tt> is to provide a key
+within <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>, as well as to generate the
+file path of the generated Python module file, if
+<tt class="docutils literal"><span class="pre">module_directory</span></tt> is specified.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="attribute">
+<dt id="mako.template.Template.code">
+<tt class="descname">code</tt><a class="headerlink" href="#mako.template.Template.code" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return the module source code for this <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.template.Template.get_def">
+<tt class="descname">get_def</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#mako.template.Template.get_def" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a def of this template as a <a class="reference internal" href="#mako.template.DefTemplate" title="mako.template.DefTemplate"><tt class="xref py py-class docutils literal"><span class="pre">DefTemplate</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.template.Template.render">
+<tt class="descname">render</tt><big>(</big><em>*args</em>, <em>**data</em><big>)</big><a class="headerlink" href="#mako.template.Template.render" title="Permalink to this definition">¶</a></dt>
+<dd><p>Render the output of this template as a string.</p>
+<p>If the template specifies an output encoding, the string
+will be encoded accordingly, else the output is raw (raw
+output uses <cite>cStringIO</cite> and can’t handle multibyte
+characters). A <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object is created corresponding
+to the given data. Arguments that are explicitly declared
+by this template’s internal rendering method are also
+pulled from the given <tt class="docutils literal"><span class="pre">*args</span></tt>, <tt class="docutils literal"><span class="pre">**data</span></tt> members.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.template.Template.render_context">
+<tt class="descname">render_context</tt><big>(</big><em>context</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mako.template.Template.render_context" title="Permalink to this definition">¶</a></dt>
+<dd><p>Render this <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> with the given context.</p>
+<p>The data is written to the context’s buffer.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.template.Template.render_unicode">
+<tt class="descname">render_unicode</tt><big>(</big><em>*args</em>, <em>**data</em><big>)</big><a class="headerlink" href="#mako.template.Template.render_unicode" title="Permalink to this definition">¶</a></dt>
+<dd><p>Render the output of this template as a unicode object.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="mako.template.Template.source">
+<tt class="descname">source</tt><a class="headerlink" href="#mako.template.Template.source" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return the template source code for this <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>.</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="mako.template.DefTemplate">
+<em class="property">class </em><tt class="descclassname">mako.template.</tt><tt class="descname">DefTemplate</tt><big>(</big><em>parent</em>, <em>callable_</em><big>)</big><a class="headerlink" href="#mako.template.DefTemplate" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bases: <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">mako.template.Template</span></tt></a></p>
+<p>A <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> which represents a callable def in a parent
+template.</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="mako.lookup.TemplateCollection">
+<em class="property">class </em><tt class="descclassname">mako.lookup.</tt><tt class="descname">TemplateCollection</tt><a class="headerlink" href="#mako.lookup.TemplateCollection" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
+<p>Represent a collection of <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> objects,
+identifiable via URI.</p>
+<p>A <a class="reference internal" href="#mako.lookup.TemplateCollection" title="mako.lookup.TemplateCollection"><tt class="xref py py-class docutils literal"><span class="pre">TemplateCollection</span></tt></a> is linked to the usage of
+all template tags that address other templates, such
+as <tt class="docutils literal"><span class="pre"><%include></span></tt>, <tt class="docutils literal"><span class="pre"><%namespace></span></tt>, and <tt class="docutils literal"><span class="pre"><%inherit></span></tt>.
+The <tt class="docutils literal"><span class="pre">file</span></tt> attribute of each of those tags refers
+to a string URI that is passed to that <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>
+object’s <a class="reference internal" href="#mako.lookup.TemplateCollection" title="mako.lookup.TemplateCollection"><tt class="xref py py-class docutils literal"><span class="pre">TemplateCollection</span></tt></a> for resolution.</p>
+<p><a class="reference internal" href="#mako.lookup.TemplateCollection" title="mako.lookup.TemplateCollection"><tt class="xref py py-class docutils literal"><span class="pre">TemplateCollection</span></tt></a> is an abstract class,
+with the usual default implementation being <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>.</p>
+<dl class="method">
+<dt id="mako.lookup.TemplateCollection.adjust_uri">
+<tt class="descname">adjust_uri</tt><big>(</big><em>uri</em>, <em>filename</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateCollection.adjust_uri" title="Permalink to this definition">¶</a></dt>
+<dd><p>Adjust the given <tt class="docutils literal"><span class="pre">uri</span></tt> based on the calling <tt class="docutils literal"><span class="pre">filename</span></tt>.</p>
+<p>When this method is called from the runtime, the
+<tt class="docutils literal"><span class="pre">filename</span></tt> parameter is taken directly to the <tt class="docutils literal"><span class="pre">filename</span></tt>
+attribute of the calling template. Therefore a custom
+<a class="reference internal" href="#mako.lookup.TemplateCollection" title="mako.lookup.TemplateCollection"><tt class="xref py py-class docutils literal"><span class="pre">TemplateCollection</span></tt></a> subclass can place any string
+identifier desired in the <tt class="docutils literal"><span class="pre">filename</span></tt> parameter of the
+<a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> objects it constructs and have them come back
+here.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.lookup.TemplateCollection.filename_to_uri">
+<tt class="descname">filename_to_uri</tt><big>(</big><em>uri</em>, <em>filename</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateCollection.filename_to_uri" title="Permalink to this definition">¶</a></dt>
+<dd><p>Convert the given <tt class="docutils literal"><span class="pre">filename</span></tt> to a URI relative to
+this <a class="reference internal" href="#mako.lookup.TemplateCollection" title="mako.lookup.TemplateCollection"><tt class="xref py py-class docutils literal"><span class="pre">TemplateCollection</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.lookup.TemplateCollection.get_template">
+<tt class="descname">get_template</tt><big>(</big><em>uri</em>, <em>relativeto=None</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateCollection.get_template" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object corresponding to the given
+<tt class="docutils literal"><span class="pre">uri</span></tt>.</p>
+<p>The default implementation raises
+<tt class="xref py py-class docutils literal"><span class="pre">NotImplementedError</span></tt>. Implementations should
+raise <tt class="xref py py-class docutils literal"><span class="pre">TemplateLookupException</span></tt> if the given <tt class="docutils literal"><span class="pre">uri</span></tt>
+cannot be resolved.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>uri</strong> – String URI of the template to be resolved.</li>
+<li><strong>relativeto</strong> – if present, the given <tt class="docutils literal"><span class="pre">uri</span></tt> is assumed to
+be relative to this URI.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.lookup.TemplateCollection.has_template">
+<tt class="descname">has_template</tt><big>(</big><em>uri</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateCollection.has_template" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return <tt class="docutils literal"><span class="pre">True</span></tt> if this <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> is
+capable of returning a <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object for the
+given <tt class="docutils literal"><span class="pre">uri</span></tt>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>uri</strong> – String URI of the template to be resolved.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="mako.lookup.TemplateLookup">
+<em class="property">class </em><tt class="descclassname">mako.lookup.</tt><tt class="descname">TemplateLookup</tt><big>(</big><em>directories=None</em>, <em>module_directory=None</em>, <em>filesystem_checks=True</em>, <em>collection_size=-1</em>, <em>format_exceptions=False</em>, <em>error_handler=None</em>, <em>disable_unicode=False</em>, <em>bytestring_passthrough=False</em>, <em>output_encoding=None</em>, <em>encoding_errors='strict'</em>, <em>cache_args=None</em>, <em>cache_impl='beaker'</em>, <em>cache_enabled=True</em>, <em>cache_type=None</em>, <em>cache_dir=None</em>, <em>cache_url=None</em>, <em>modulename_callable=None</em>, <em>module_writer=None</em>, <em>default_filters=None</em>, <em>buffer_filters=()</em>, <em>strict_undefined=False</em>, <em>imports=None</em>, <em>enable_loop=True</em>, <em>input_encoding=None</em>, <em>preprocessor=None</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateLookup" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bases: <a class="reference internal" href="#mako.lookup.TemplateCollection" title="mako.lookup.TemplateCollection"><tt class="xref py py-class docutils literal"><span class="pre">mako.lookup.TemplateCollection</span></tt></a></p>
+<p>Represent a collection of templates that locates template source files
+from the local filesystem.</p>
+<p>The primary argument is the <tt class="docutils literal"><span class="pre">directories</span></tt> argument, the list of
+directories to search:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">lookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">([</span><span class="s">"/path/to/templates"</span><span class="p">])</span>
+<span class="n">some_template</span> <span class="o">=</span> <span class="n">lookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="s">"/index.html"</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> can also be given <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> objects
+programatically using <a class="reference internal" href="#mako.lookup.TemplateLookup.put_string" title="mako.lookup.TemplateLookup.put_string"><tt class="xref py py-meth docutils literal"><span class="pre">put_string()</span></tt></a> or <a class="reference internal" href="#mako.lookup.TemplateLookup.put_template" title="mako.lookup.TemplateLookup.put_template"><tt class="xref py py-meth docutils literal"><span class="pre">put_template()</span></tt></a>:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">lookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">()</span>
+<span class="n">lookup</span><span class="o">.</span><span class="n">put_string</span><span class="p">(</span><span class="s">"base.html"</span><span class="p">,</span> <span class="s">'''</span>
+<span class="s">    <html><body>${self.next()}</body></html></span>
+<span class="s">'''</span><span class="p">)</span>
+<span class="n">lookup</span><span class="o">.</span><span class="n">put_string</span><span class="p">(</span><span class="s">"hello.html"</span><span class="p">,</span> <span class="s">'''</span>
+<span class="s">    <</span><span class="si">%i</span><span class="s">nclude file='base.html'/></span>
+
+<span class="s">    Hello, world !</span>
+<span class="s">'''</span><span class="p">)</span>
+</pre></div>
+</div>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>directories</strong> – A list of directory names which will be
+searched for a particular template URI. The URI is appended
+to each directory and the filesystem checked.</li>
+<li><strong>collection_size</strong> – Approximate size of the collection used
+to store templates. If left at its default of <tt class="docutils literal"><span class="pre">-1</span></tt>, the size
+is unbounded, and a plain Python dictionary is used to
+relate URI strings to <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> instances.
+Otherwise, a least-recently-used cache object is used which
+will maintain the size of the collection approximately to
+the number given.</li>
+<li><strong>filesystem_checks</strong> – When at its default value of <tt class="docutils literal"><span class="pre">True</span></tt>,
+each call to <a class="reference internal" href="#mako.lookup.TemplateLookup.get_template" title="mako.lookup.TemplateLookup.get_template"><tt class="xref py py-meth docutils literal"><span class="pre">TemplateLookup.get_template()</span></tt></a> will
+compare the filesystem last modified time to the time in
+which an existing <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object was created.
+This allows the <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> to regenerate a
+new <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> whenever the original source has
+been updated. Set this to <tt class="docutils literal"><span class="pre">False</span></tt> for a very minor
+performance increase.</li>
+<li><strong>modulename_callable</strong> – A callable which, when present,
+is passed the path of the source file as well as the
+requested URI, and then returns the full path of the
+generated Python module file. This is used to inject
+alternate schemes for Python module location. If left at
+its default of <tt class="docutils literal"><span class="pre">None</span></tt>, the built in system of generation
+based on <tt class="docutils literal"><span class="pre">module_directory</span></tt> plus <tt class="docutils literal"><span class="pre">uri</span></tt> is used.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<p>All other keyword parameters available for
+<a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> are mirrored here. When new
+<a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> objects are created, the keywords
+established with this <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> are passed on
+to each new <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>.</p>
+<dl class="method">
+<dt id="mako.lookup.TemplateLookup.adjust_uri">
+<tt class="descname">adjust_uri</tt><big>(</big><em>uri</em>, <em>relativeto</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateLookup.adjust_uri" title="Permalink to this definition">¶</a></dt>
+<dd><p>Adjust the given <tt class="docutils literal"><span class="pre">uri</span></tt> based on the given relative URI.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.lookup.TemplateLookup.filename_to_uri">
+<tt class="descname">filename_to_uri</tt><big>(</big><em>filename</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateLookup.filename_to_uri" title="Permalink to this definition">¶</a></dt>
+<dd><p>Convert the given <tt class="docutils literal"><span class="pre">filename</span></tt> to a URI relative to
+this <a class="reference internal" href="#mako.lookup.TemplateCollection" title="mako.lookup.TemplateCollection"><tt class="xref py py-class docutils literal"><span class="pre">TemplateCollection</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.lookup.TemplateLookup.get_template">
+<tt class="descname">get_template</tt><big>(</big><em>uri</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateLookup.get_template" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object corresponding to the given
+<tt class="docutils literal"><span class="pre">uri</span></tt>.</p>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">The <tt class="docutils literal"><span class="pre">relativeto</span></tt> argument is not supported here at the moment.</p>
+</div>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.lookup.TemplateLookup.put_string">
+<tt class="descname">put_string</tt><big>(</big><em>uri</em>, <em>text</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateLookup.put_string" title="Permalink to this definition">¶</a></dt>
+<dd><p>Place a new <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object into this
+<a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>, based on the given string of
+<tt class="docutils literal"><span class="pre">text</span></tt>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="mako.lookup.TemplateLookup.put_template">
+<tt class="descname">put_template</tt><big>(</big><em>uri</em>, <em>template</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateLookup.put_template" title="Permalink to this definition">¶</a></dt>
+<dd><p>Place a new <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object into this
+<a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>, based on the given
+<a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object.</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="mako.exceptions.RichTraceback">
+<em class="property">class </em><tt class="descclassname">mako.exceptions.</tt><tt class="descname">RichTraceback</tt><big>(</big><em>error=None</em>, <em>traceback=None</em><big>)</big><a class="headerlink" href="#mako.exceptions.RichTraceback" title="Permalink to this definition">¶</a></dt>
+<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
+<p>Pull the current exception from the <tt class="docutils literal"><span class="pre">sys</span></tt> traceback and extracts
+Mako-specific template information.</p>
+<p>See the usage examples in <a class="reference internal" href="#handling-exceptions"><em>Handling Exceptions</em></a>.</p>
+<dl class="attribute">
+<dt id="RichTraceback.error">
+<tt class="descname">error</tt><a class="headerlink" href="#RichTraceback.error" title="Permalink to this definition">¶</a></dt>
+<dd><p>the exception instance.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="RichTraceback.message">
+<tt class="descname">message</tt><a class="headerlink" href="#RichTraceback.message" title="Permalink to this definition">¶</a></dt>
+<dd><p>the exception error message as unicode.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="RichTraceback.source">
+<tt class="descname">source</tt><a class="headerlink" href="#RichTraceback.source" title="Permalink to this definition">¶</a></dt>
+<dd><p>source code of the file where the error occurred.
+If the error occurred within a compiled template,
+this is the template source.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="RichTraceback.lineno">
+<tt class="descname">lineno</tt><a class="headerlink" href="#RichTraceback.lineno" title="Permalink to this definition">¶</a></dt>
+<dd><p>line number where the error occurred.  If the error
+occurred within a compiled template, the line number
+is adjusted to that of the template source.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="RichTraceback.records">
+<tt class="descname">records</tt><a class="headerlink" href="#RichTraceback.records" title="Permalink to this definition">¶</a></dt>
+<dd><p>a list of 8-tuples containing the original
+python traceback elements, plus the
+filename, line number, source line, and full template source
+for the traceline mapped back to its originating source
+template, if any for that traceline (else the fields are <tt class="docutils literal"><span class="pre">None</span></tt>).</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="RichTraceback.reverse_records">
+<tt class="descname">reverse_records</tt><a class="headerlink" href="#RichTraceback.reverse_records" title="Permalink to this definition">¶</a></dt>
+<dd><p>the list of records in reverse
+traceback – a list of 4-tuples, in the same format as a regular
+python traceback, with template-corresponding
+traceback records replacing the originals.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="RichTraceback.reverse_traceback">
+<tt class="descname">reverse_traceback</tt><a class="headerlink" href="#RichTraceback.reverse_traceback" title="Permalink to this definition">¶</a></dt>
+<dd><p>the traceback list in reverse.</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="mako.exceptions.html_error_template">
+<tt class="descclassname">mako.exceptions.</tt><tt class="descname">html_error_template</tt><big>(</big><big>)</big><a class="headerlink" href="#mako.exceptions.html_error_template" title="Permalink to this definition">¶</a></dt>
+<dd><p>Provides a template that renders a stack trace in an HTML format,
+providing an excerpt of code as well as substituting source template
+filenames, line numbers and code for that of the originating source
+template, as applicable.</p>
+<p>The template’s default <tt class="docutils literal"><span class="pre">encoding_errors</span></tt> value is <tt class="docutils literal"><span class="pre">'htmlentityreplace'</span></tt>. The
+template has two options. With the <tt class="docutils literal"><span class="pre">full</span></tt> option disabled, only a section of
+an HTML document is returned. With the <tt class="docutils literal"><span class="pre">css</span></tt> option disabled, the default
+stylesheet won’t be included.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="mako.exceptions.text_error_template">
+<tt class="descclassname">mako.exceptions.</tt><tt class="descname">text_error_template</tt><big>(</big><em>lookup=None</em><big>)</big><a class="headerlink" href="#mako.exceptions.text_error_template" title="Permalink to this definition">¶</a></dt>
+<dd><p>Provides a template that renders a stack trace in a similar format to
+the Python interpreter, substituting source template filenames, line
+numbers and code for that of the originating source template, as
+applicable.</p>
+</dd></dl>
+
+</div>
+</div>
+
+    </div>
+
+</div>
+
+<div id="docs-bottom-navigation" class="docs-navigation-links">
+        Previous:
+        <a href="index.html" title="previous chapter">Table of Contents</a>
+        Next:
+        <a href="syntax.html" title="next chapter">Syntax</a>
+
+    <div id="docs-copyright">
+        © Copyright the Mako authors and contributors.
+        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
+        with Mako templates.
+    </div>
+</div>
+
+</div>
+
+<div class="clearfix">
+
+<hr/>
+
+<div class="copyright">Website content copyright © by Michael Bayer.
+    All rights reserved.  Mako and its documentation are licensed
+    under the MIT license.  mike(&)zzzcomputing.com</div>
+
+</div>
+</div>
+</body>
+</html>
diff --git a/lib/Mako-0.7.3/examples/bench/basic.py b/lib/Mako-0.7.3/examples/bench/basic.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/examples/bench/basic.py
@@ -0,0 +1,191 @@
+# basic.py - basic benchmarks adapted from Genshi
+# Copyright (C) 2006 Edgewall Software
+# All rights reserved.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#  1. Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#  2. Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in
+#     the documentation and/or other materials provided with the
+#     distribution.
+#  3. The name of the author may not be used to endorse or promote
+#     products derived from this software without specific prior
+#     written permission.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from cgi import escape
+import os
+try:
+    from StringIO import StringIO
+except ImportError:
+    from io import StringIO
+import sys
+import timeit
+
+def u(stringlit):
+    if sys.version_info >= (3,):
+        return stringlit
+    else:
+        return stringlit.decode('latin1')
+
+__all__ = ['mako', 'mako_inheritance', 'jinja2', 'jinja2_inheritance',
+            'cheetah', 'django', 'myghty', 'genshi', 'kid']
+
+# Templates content and constants
+TITLE = 'Just a test'
+USER = 'joe'
+ITEMS = ['Number %d' % num for num in range(1, 15)]
+U_ITEMS = [u(item) for item in ITEMS]
+
+def genshi(dirname, verbose=False):
+    from genshi.template import TemplateLoader
+    loader = TemplateLoader([dirname], auto_reload=False)
+    template = loader.load('template.html')
+    def render():
+        data = dict(title=TITLE, user=USER, items=ITEMS)
+        return template.generate(**data).render('xhtml')
+
+    if verbose:
+        print(render())
+    return render
+
+def myghty(dirname, verbose=False):
+    from myghty import interp
+    interpreter = interp.Interpreter(component_root=dirname)
+    def render():
+        data = dict(title=TITLE, user=USER, items=ITEMS)
+        buffer = StringIO()
+        interpreter.execute("template.myt", request_args=data, out_buffer=buffer)
+        return buffer.getvalue()
+    if verbose:
+        print(render())
+    return render
+
+def mako(dirname, verbose=False):
+    from mako.template import Template
+    from mako.lookup import TemplateLookup
+    disable_unicode = (sys.version_info < (3,))
+    lookup = TemplateLookup(directories=[dirname], filesystem_checks=False, disable_unicode=disable_unicode)
+    template = lookup.get_template('template.html')
+    def render():
+        return template.render(title=TITLE, user=USER, list_items=U_ITEMS)
+    if verbose:
+        print(template.code + " " + render())
+    return render
+mako_inheritance = mako
+
+def jinja2(dirname, verbose=False):
+    from jinja2 import Environment, FileSystemLoader
+    env = Environment(loader=FileSystemLoader(dirname))
+    template = env.get_template('template.html')
+    def render():
+        return template.render(title=TITLE, user=USER, list_items=U_ITEMS)
+    if verbose:
+        print(render())
+    return render
+jinja2_inheritance = jinja2
+
+def cheetah(dirname, verbose=False):
+    from Cheetah.Template import Template
+    filename = os.path.join(dirname, 'template.tmpl')
+    template = Template(file=filename)
+    def render():
+        template.__dict__.update({'title': TITLE, 'user': USER,
+                                  'list_items': U_ITEMS})
+        return template.respond()
+
+    if verbose:
+        print(dir(template))
+        print(template.generatedModuleCode())
+        print(render())
+    return render
+
+def django(dirname, verbose=False):
+    from django.conf import settings
+    settings.configure(TEMPLATE_DIRS=[os.path.join(dirname, 'templates')])
+    from django import template, templatetags
+    from django.template import loader
+    templatetags.__path__.append(os.path.join(dirname, 'templatetags'))
+    tmpl = loader.get_template('template.html')
+
+    def render():
+        data = {'title': TITLE, 'user': USER, 'items': ITEMS}
+        return tmpl.render(template.Context(data))
+
+    if verbose:
+        print(render())
+    return render
+
+def kid(dirname, verbose=False):
+    import kid
+    kid.path = kid.TemplatePath([dirname])
+    template = kid.Template(file='template.kid')
+    def render():
+        template = kid.Template(file='template.kid',
+                                title=TITLE, user=USER, items=ITEMS)
+        return template.serialize(output='xhtml')
+
+    if verbose:
+        print(render())
+    return render
+
+
+def run(engines, number=2000, verbose=False):
+    basepath = os.path.abspath(os.path.dirname(__file__))
+    for engine in engines:
+        dirname = os.path.join(basepath, engine)
+        if verbose:
+            print('%s:' % engine.capitalize())
+            print('--------------------------------------------------------')
+        else:
+            sys.stdout.write('%s:' % engine.capitalize())
+        t = timeit.Timer(setup='from __main__ import %s; render = %s(r"%s", %s)'
+                                       % (engine, engine, dirname, verbose),
+                                 stmt='render()')
+
+        time = t.timeit(number=number) / number
+        if verbose:
+            print('--------------------------------------------------------')
+        print('%.2f ms' % (1000 * time))
+        if verbose:
+            print('--------------------------------------------------------')
+
+
+if __name__ == '__main__':
+    engines = [arg for arg in sys.argv[1:] if arg[0] != '-']
+    if not engines:
+        engines = __all__
+
+    verbose = '-v' in sys.argv
+
+    if '-p' in sys.argv:
+        try:
+            import hotshot, hotshot.stats
+            prof = hotshot.Profile("template.prof")
+            benchtime = prof.runcall(run, engines, number=100, verbose=verbose)
+            stats = hotshot.stats.load("template.prof")
+        except ImportError:
+            import cProfile, pstats
+            stmt = "run(%r, number=%r, verbose=%r)" % (engines, 1000, verbose)
+            cProfile.runctx(stmt, globals(), {}, "template.prof")
+            stats = pstats.Stats("template.prof")
+        stats.strip_dirs()
+        stats.sort_stats('time', 'calls')
+        stats.print_stats()
+    else:
+        run(engines, verbose=verbose)
diff --git a/lib/Mako-0.7.3/examples/bench/cheetah/footer.tmpl b/lib/Mako-0.7.3/examples/bench/cheetah/footer.tmpl
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/examples/bench/cheetah/footer.tmpl
@@ -0,0 +1,2 @@
+<div id="footer">
+</div>
diff --git a/lib/Mako-0.7.3/examples/bench/cheetah/header.tmpl b/lib/Mako-0.7.3/examples/bench/cheetah/header.tmpl
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/examples/bench/cheetah/header.tmpl
@@ -0,0 +1,5 @@
+<div id="header">
+  <h1>$title</h1>
+</div>
+
+
diff --git a/lib/Mako-0.7.3/examples/bench/cheetah/template.tmpl b/lib/Mako-0.7.3/examples/bench/cheetah/template.tmpl
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/examples/bench/cheetah/template.tmpl
@@ -0,0 +1,31 @@
+<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+  <head>
+    <title>${title}</title>
+  </head>
+  <body>
+
+      #def greeting(name)
+      <p>hello ${name}!</p>
+      #end def
+ 
+    #include "cheetah/header.tmpl"
+
+    $greeting($user)
+    $greeting('me')
+    $greeting('world')
+ 
+    <h2>Loop</h2>
+    #if $list_items
+      <ul>
+        #for $list_item in $list_items
+          <li #if $list_item is $list_items[-1] then "class='last'" else ""#>$list_item</li>
+        #end for
+      </ul>
+    #end if
+
+    #include "cheetah/footer.tmpl"
+  </body>
+</html>
diff --git a/lib/Mako-0.7.3/examples/bench/django/templatetags/__init__.py b/lib/Mako-0.7.3/examples/bench/django/templatetags/__init__.py
new file mode 100644
diff --git a/lib/Mako-0.7.3/examples/bench/django/templatetags/bench.py b/lib/Mako-0.7.3/examples/bench/django/templatetags/bench.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/examples/bench/django/templatetags/bench.py
@@ -0,0 +1,8 @@
+from django.template import Library, Node, resolve_variable
+from django.utils.html import escape
+
+register = Library()
+
+def greeting(name):
+    return 'Hello, %s!' % escape(name)
+greeting = register.simple_tag(greeting)
diff --git a/lib/Mako-0.7.3/examples/bench/kid/base.kid b/lib/Mako-0.7.3/examples/bench/kid/base.kid
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/examples/bench/kid/base.kid
@@ -0,0 +1,15 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:py="http://purl.org/kid/ns#">
+
+  <p py:def="greeting(name)">
+    Hello, ${name}!
+  </p>
+
+  <body py:match="item.tag == '{http://www.w3.org/1999/xhtml}body'" py:strip="">
+    <div id="header">
+      <h1>${title}</h1>
+    </div>
+    ${item}
+    <div id="footer" />
+  </body>
+</html>
diff --git a/lib/Mako-0.7.3/examples/bench/kid/template.kid b/lib/Mako-0.7.3/examples/bench/kid/template.kid
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/examples/bench/kid/template.kid
@@ -0,0 +1,22 @@
+<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:py="http://purl.org/kid/ns#"
+      py:extends="'base.kid'"
+      lang="en">
+  <head>
+    <title>${title}</title>
+  </head>
+  <body>
+    <div>${greeting(user)}</div>
+    <div>${greeting('me')}</div>
+    <div>${greeting('world')}</div>
+ 
+    <h2>Loop</h2>
+    <ul py:if="items">
+      <li py:for="idx, item in enumerate(items)" py:content="item"
+          class="${idx + 1 == len(items) and 'last' or None}" />
+    </ul>
+  </body>
+</html>
diff --git a/lib/Mako-0.7.3/examples/bench/myghty/base.myt b/lib/Mako-0.7.3/examples/bench/myghty/base.myt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/examples/bench/myghty/base.myt
@@ -0,0 +1,29 @@
+<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+<%args scope="request">
+    title
+</%args>
+
+<& REQUEST:header &>
+
+<body>
+<div id="header">
+  <h1><% title %></h1>
+</div>
+
+% m.call_next()
+
+<div id="footer"></div>
+
+</body>
+</html>
+
+
+<%method greeting>
+<%args>
+   name
+</%args>
+Hello, <% name | h %>
+</%method>
diff --git a/lib/Mako-0.7.3/examples/bench/myghty/template.myt b/lib/Mako-0.7.3/examples/bench/myghty/template.myt
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/examples/bench/myghty/template.myt
@@ -0,0 +1,30 @@
+<%flags>inherit="base.myt"</%flags>
+<%args>
+	title
+	items
+	user
+</%args>
+
+<%method header>
+    <%args scope="request">
+    title
+    </%args>
+<head>
+  <title><% title %></title>
+</head>
+</%method>
+
+  <div><& base.myt:greeting, name=user &></div>
+  <div><& base.myt:greeting, name="me"&></div>
+  <div><& base.myt:greeting, name="world" &></div>
+
+  <h2>Loop</h2>
+%if items:
+      <ul>
+%	for i, item in enumerate(items):
+  <li <% i+1==len(items) and "class='last'" or ""%>><% item %></li>
+%
+      </ul>
+%
+
+ 
diff --git a/lib/Mako-0.7.3/examples/wsgi/run_wsgi.py b/lib/Mako-0.7.3/examples/wsgi/run_wsgi.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/examples/wsgi/run_wsgi.py
@@ -0,0 +1,78 @@
+#!/usr/bin/python
+
+import cgi, re, os, posixpath, mimetypes
+from mako.lookup import TemplateLookup
+from mako import exceptions
+
+root = './'
+port = 8000
+error_style = 'html' # select 'text' for plaintext error reporting
+
+lookup = TemplateLookup(directories=[root + 'templates', root + 'htdocs'], filesystem_checks=True, module_directory='./modules')
+
+def serve(environ, start_response):
+    """serves requests using the WSGI callable interface."""
+    fieldstorage = cgi.FieldStorage(
+            fp = environ['wsgi.input'],
+            environ = environ,
+            keep_blank_values = True
+    )
+    d = dict([(k, getfield(fieldstorage[k])) for k in fieldstorage])
+
+    uri = environ.get('PATH_INFO', '/')
+    if not uri:
+        uri = '/index.html'
+    else:
+        uri = re.sub(r'^/$', '/index.html', uri)
+
+    if re.match(r'.*\.html$', uri):
+        try:
+            template = lookup.get_template(uri)
+            start_response("200 OK", [('Content-type','text/html')])
+            return [template.render(**d)]
+        except exceptions.TopLevelLookupException:
+            start_response("404 Not Found", [])
+            return ["Cant find template '%s'" % uri]
+        except:
+            if error_style == 'text':
+                start_response("200 OK", [('Content-type','text/plain')])
+                return [exceptions.text_error_template().render()]
+            else:
+                start_response("200 OK", [('Content-type','text/html')])
+                return [exceptions.html_error_template().render()]
+    else:
+        u = re.sub(r'^\/+', '', uri)
+        filename = os.path.join(root, u)
+        start_response("200 OK", [('Content-type',guess_type(uri))])
+        return [file(filename).read()]
+ 
+def getfield(f):
+    """convert values from cgi.Field objects to plain values."""
+    if isinstance(f, list):
+        return [getfield(x) for x in f]
+    else:
+        return f.value
+
+extensions_map = mimetypes.types_map.copy()
+extensions_map.update({
+'': 'text/html', # Default
+})
+
+def guess_type(path):
+    """return a mimetype for the given path based on file extension."""
+    base, ext = posixpath.splitext(path)
+    if ext in extensions_map:
+        return extensions_map[ext]
+    ext = ext.lower()
+    if ext in extensions_map:
+        return extensions_map[ext]
+    else:
+        return extensions_map['']
+ 
+if __name__ == '__main__':
+    import wsgiref.simple_server
+    server = wsgiref.simple_server.make_server('', port, serve)
+    print "Server listening on port %d" % port
+    server.serve_forever()
+
+
diff --git a/lib/Mako-0.7.3/mako/__init__.py b/lib/Mako-0.7.3/mako/__init__.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/__init__.py
@@ -0,0 +1,9 @@
+# mako/__init__.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+
+__version__ = '0.7.3'
+
diff --git a/lib/Mako-0.7.3/mako/_ast_util.py b/lib/Mako-0.7.3/mako/_ast_util.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/_ast_util.py
@@ -0,0 +1,839 @@
+# mako/_ast_util.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""
+    ast
+    ~~~
+
+    The `ast` module helps Python applications to process trees of the Python
+    abstract syntax grammar.  The abstract syntax itself might change with
+    each Python release; this module helps to find out programmatically what
+    the current grammar looks like and allows modifications of it.
+
+    An abstract syntax tree can be generated by passing `ast.PyCF_ONLY_AST` as
+    a flag to the `compile()` builtin function or by using the `parse()`
+    function from this module.  The result will be a tree of objects whose
+    classes all inherit from `ast.AST`.
+
+    A modified abstract syntax tree can be compiled into a Python code object
+    using the built-in `compile()` function.
+
+    Additionally various helper functions are provided that make working with
+    the trees simpler.  The main intention of the helper functions and this
+    module in general is to provide an easy to use interface for libraries
+    that work tightly with the python syntax (template engines for example).
+
+
+    :copyright: Copyright 2008 by Armin Ronacher.
+    :license: Python License.
+"""
+from _ast import *
+
+
+BOOLOP_SYMBOLS = {
+    And:        'and',
+    Or:         'or'
+}
+
+BINOP_SYMBOLS = {
+    Add:        '+',
+    Sub:        '-',
+    Mult:       '*',
+    Div:        '/',
+    FloorDiv:   '//',
+    Mod:        '%',
+    LShift:     '<<',
+    RShift:     '>>',
+    BitOr:      '|',
+    BitAnd:     '&',
+    BitXor:     '^'
+}
+
+CMPOP_SYMBOLS = {
+    Eq:         '==',
+    Gt:         '>',
+    GtE:        '>=',
+    In:         'in',
+    Is:         'is',
+    IsNot:      'is not',
+    Lt:         '<',
+    LtE:        '<=',
+    NotEq:      '!=',
+    NotIn:      'not in'
+}
+
+UNARYOP_SYMBOLS = {
+    Invert:     '~',
+    Not:        'not',
+    UAdd:       '+',
+    USub:       '-'
+}
+
+ALL_SYMBOLS = {}
+ALL_SYMBOLS.update(BOOLOP_SYMBOLS)
+ALL_SYMBOLS.update(BINOP_SYMBOLS)
+ALL_SYMBOLS.update(CMPOP_SYMBOLS)
+ALL_SYMBOLS.update(UNARYOP_SYMBOLS)
+
+
+def parse(expr, filename='<unknown>', mode='exec'):
+    """Parse an expression into an AST node."""
+    return compile(expr, filename, mode, PyCF_ONLY_AST)
+
+
+def to_source(node, indent_with=' ' * 4):
+    """
+    This function can convert a node tree back into python sourcecode.  This
+    is useful for debugging purposes, especially if you're dealing with custom
+    asts not generated by python itself.
+
+    It could be that the sourcecode is evaluable when the AST itself is not
+    compilable / evaluable.  The reason for this is that the AST contains some
+    more data than regular sourcecode does, which is dropped during
+    conversion.
+
+    Each level of indentation is replaced with `indent_with`.  Per default this
+    parameter is equal to four spaces as suggested by PEP 8, but it might be
+    adjusted to match the application's styleguide.
+    """
+    generator = SourceGenerator(indent_with)
+    generator.visit(node)
+    return ''.join(generator.result)
+
+
+def dump(node):
+    """
+    A very verbose representation of the node passed.  This is useful for
+    debugging purposes.
+    """
+    def _format(node):
+        if isinstance(node, AST):
+            return '%s(%s)' % (node.__class__.__name__,
+                               ', '.join('%s=%s' % (a, _format(b))
+                                         for a, b in iter_fields(node)))
+        elif isinstance(node, list):
+            return '[%s]' % ', '.join(_format(x) for x in node)
+        return repr(node)
+    if not isinstance(node, AST):
+        raise TypeError('expected AST, got %r' % node.__class__.__name__)
+    return _format(node)
+
+
+def copy_location(new_node, old_node):
+    """
+    Copy the source location hint (`lineno` and `col_offset`) from the
+    old to the new node if possible and return the new one.
+    """
+    for attr in 'lineno', 'col_offset':
+        if attr in old_node._attributes and attr in new_node._attributes \
+           and hasattr(old_node, attr):
+            setattr(new_node, attr, getattr(old_node, attr))
+    return new_node
+
+
+def fix_missing_locations(node):
+    """
+    Some nodes require a line number and the column offset.  Without that
+    information the compiler will abort the compilation.  Because it can be
+    a dull task to add appropriate line numbers and column offsets when
+    adding new nodes this function can help.  It copies the line number and
+    column offset of the parent node to the child nodes without this
+    information.
+
+    Unlike `copy_location` this works recursive and won't touch nodes that
+    already have a location information.
+    """
+    def _fix(node, lineno, col_offset):
+        if 'lineno' in node._attributes:
+            if not hasattr(node, 'lineno'):
+                node.lineno = lineno
+            else:
+                lineno = node.lineno
+        if 'col_offset' in node._attributes:
+            if not hasattr(node, 'col_offset'):
+                node.col_offset = col_offset
+            else:
+                col_offset = node.col_offset
+        for child in iter_child_nodes(node):
+            _fix(child, lineno, col_offset)
+    _fix(node, 1, 0)
+    return node
+
+
+def increment_lineno(node, n=1):
+    """
+    Increment the line numbers of all nodes by `n` if they have line number
+    attributes.  This is useful to "move code" to a different location in a
+    file.
+    """
+    for node in zip((node,), walk(node)):
+        if 'lineno' in node._attributes:
+            node.lineno = getattr(node, 'lineno', 0) + n
+
+
+def iter_fields(node):
+    """Iterate over all fields of a node, only yielding existing fields."""
+    # CPython 2.5 compat
+    if not hasattr(node, '_fields') or not node._fields:
+        return
+    for field in node._fields:
+        try:
+            yield field, getattr(node, field)
+        except AttributeError:
+            pass
+
+
+def get_fields(node):
+    """Like `iter_fiels` but returns a dict."""
+    return dict(iter_fields(node))
+
+
+def iter_child_nodes(node):
+    """Iterate over all child nodes or a node."""
+    for name, field in iter_fields(node):
+        if isinstance(field, AST):
+            yield field
+        elif isinstance(field, list):
+            for item in field:
+                if isinstance(item, AST):
+                    yield item
+
+
+def get_child_nodes(node):
+    """Like `iter_child_nodes` but returns a list."""
+    return list(iter_child_nodes(node))
+
+
+def get_compile_mode(node):
+    """
+    Get the mode for `compile` of a given node.  If the node is not a `mod`
+    node (`Expression`, `Module` etc.) a `TypeError` is thrown.
+    """
+    if not isinstance(node, mod):
+        raise TypeError('expected mod node, got %r' % node.__class__.__name__)
+    return {
+        Expression:     'eval',
+        Interactive:    'single'
+    }.get(node.__class__, 'expr')
+
+
+def get_docstring(node):
+    """
+    Return the docstring for the given node or `None` if no docstring can be
+    found.  If the node provided does not accept docstrings a `TypeError`
+    will be raised.
+    """
+    if not isinstance(node, (FunctionDef, ClassDef, Module)):
+        raise TypeError("%r can't have docstrings" % node.__class__.__name__)
+    if node.body and isinstance(node.body[0], Str):
+        return node.body[0].s
+
+
+def walk(node):
+    """
+    Iterate over all nodes.  This is useful if you only want to modify nodes in
+    place and don't care about the context or the order the nodes are returned.
+    """
+    from collections import deque
+    todo = deque([node])
+    while todo:
+        node = todo.popleft()
+        todo.extend(iter_child_nodes(node))
+        yield node
+
+
+class NodeVisitor(object):
+    """
+    Walks the abstract syntax tree and call visitor functions for every node
+    found.  The visitor functions may return values which will be forwarded
+    by the `visit` method.
+
+    Per default the visitor functions for the nodes are ``'visit_'`` +
+    class name of the node.  So a `TryFinally` node visit function would
+    be `visit_TryFinally`.  This behavior can be changed by overriding
+    the `get_visitor` function.  If no visitor function exists for a node
+    (return value `None`) the `generic_visit` visitor is used instead.
+
+    Don't use the `NodeVisitor` if you want to apply changes to nodes during
+    traversing.  For this a special visitor exists (`NodeTransformer`) that
+    allows modifications.
+    """
+
+    def get_visitor(self, node):
+        """
+        Return the visitor function for this node or `None` if no visitor
+        exists for this node.  In that case the generic visit function is
+        used instead.
+        """
+        method = 'visit_' + node.__class__.__name__
+        return getattr(self, method, None)
+
+    def visit(self, node):
+        """Visit a node."""
+        f = self.get_visitor(node)
+        if f is not None:
+            return f(node)
+        return self.generic_visit(node)
+
+    def generic_visit(self, node):
+        """Called if no explicit visitor function exists for a node."""
+        for field, value in iter_fields(node):
+            if isinstance(value, list):
+                for item in value:
+                    if isinstance(item, AST):
+                        self.visit(item)
+            elif isinstance(value, AST):
+                self.visit(value)
+
+
+class NodeTransformer(NodeVisitor):
+    """
+    Walks the abstract syntax tree and allows modifications of nodes.
+
+    The `NodeTransformer` will walk the AST and use the return value of the
+    visitor functions to replace or remove the old node.  If the return
+    value of the visitor function is `None` the node will be removed
+    from the previous location otherwise it's replaced with the return
+    value.  The return value may be the original node in which case no
+    replacement takes place.
+
+    Here an example transformer that rewrites all `foo` to `data['foo']`::
+
+        class RewriteName(NodeTransformer):
+
+            def visit_Name(self, node):
+                return copy_location(Subscript(
+                    value=Name(id='data', ctx=Load()),
+                    slice=Index(value=Str(s=node.id)),
+                    ctx=node.ctx
+                ), node)
+
+    Keep in mind that if the node you're operating on has child nodes
+    you must either transform the child nodes yourself or call the generic
+    visit function for the node first.
+
+    Nodes that were part of a collection of statements (that applies to
+    all statement nodes) may also return a list of nodes rather than just
+    a single node.
+
+    Usually you use the transformer like this::
+
+        node = YourTransformer().visit(node)
+    """
+
+    def generic_visit(self, node):
+        for field, old_value in iter_fields(node):
+            old_value = getattr(node, field, None)
+            if isinstance(old_value, list):
+                new_values = []
+                for value in old_value:
+                    if isinstance(value, AST):
+                        value = self.visit(value)
+                        if value is None:
+                            continue
+                        elif not isinstance(value, AST):
+                            new_values.extend(value)
+                            continue
+                    new_values.append(value)
+                old_value[:] = new_values
+            elif isinstance(old_value, AST):
+                new_node = self.visit(old_value)
+                if new_node is None:
+                    delattr(node, field)
+                else:
+                    setattr(node, field, new_node)
+        return node
+
+
+class SourceGenerator(NodeVisitor):
+    """
+    This visitor is able to transform a well formed syntax tree into python
+    sourcecode.  For more details have a look at the docstring of the
+    `node_to_source` function.
+    """
+
+    def __init__(self, indent_with):
+        self.result = []
+        self.indent_with = indent_with
+        self.indentation = 0
+        self.new_lines = 0
+
+    def write(self, x):
+        if self.new_lines:
+            if self.result:
+                self.result.append('\n' * self.new_lines)
+            self.result.append(self.indent_with * self.indentation)
+            self.new_lines = 0
+        self.result.append(x)
+
+    def newline(self, n=1):
+        self.new_lines = max(self.new_lines, n)
+
+    def body(self, statements):
+        self.new_line = True
+        self.indentation += 1
+        for stmt in statements:
+            self.visit(stmt)
+        self.indentation -= 1
+
+    def body_or_else(self, node):
+        self.body(node.body)
+        if node.orelse:
+            self.newline()
+            self.write('else:')
+            self.body(node.orelse)
+
+    def signature(self, node):
+        want_comma = []
+        def write_comma():
+            if want_comma:
+                self.write(', ')
+            else:
+                want_comma.append(True)
+
+        padding = [None] * (len(node.args) - len(node.defaults))
+        for arg, default in zip(node.args, padding + node.defaults):
+            write_comma()
+            self.visit(arg)
+            if default is not None:
+                self.write('=')
+                self.visit(default)
+        if node.vararg is not None:
+            write_comma()
+            self.write('*' + node.vararg)
+        if node.kwarg is not None:
+            write_comma()
+            self.write('**' + node.kwarg)
+
+    def decorators(self, node):
+        for decorator in node.decorator_list:
+            self.newline()
+            self.write('@')
+            self.visit(decorator)
+
+    # Statements
+
+    def visit_Assign(self, node):
+        self.newline()
+        for idx, target in enumerate(node.targets):
+            if idx:
+                self.write(', ')
+            self.visit(target)
+        self.write(' = ')
+        self.visit(node.value)
+
+    def visit_AugAssign(self, node):
+        self.newline()
+        self.visit(node.target)
+        self.write(BINOP_SYMBOLS[type(node.op)] + '=')
+        self.visit(node.value)
+
+    def visit_ImportFrom(self, node):
+        self.newline()
+        self.write('from %s%s import ' % ('.' * node.level, node.module))
+        for idx, item in enumerate(node.names):
+            if idx:
+                self.write(', ')
+            self.write(item)
+
+    def visit_Import(self, node):
+        self.newline()
+        for item in node.names:
+            self.write('import ')
+            self.visit(item)
+
+    def visit_Expr(self, node):
+        self.newline()
+        self.generic_visit(node)
+
+    def visit_FunctionDef(self, node):
+        self.newline(n=2)
+        self.decorators(node)
+        self.newline()
+        self.write('def %s(' % node.name)
+        self.signature(node.args)
+        self.write('):')
+        self.body(node.body)
+
+    def visit_ClassDef(self, node):
+        have_args = []
+        def paren_or_comma():
+            if have_args:
+                self.write(', ')
+            else:
+                have_args.append(True)
+                self.write('(')
+
+        self.newline(n=3)
+        self.decorators(node)
+        self.newline()
+        self.write('class %s' % node.name)
+        for base in node.bases:
+            paren_or_comma()
+            self.visit(base)
+        # XXX: the if here is used to keep this module compatible
+        #      with python 2.6.
+        if hasattr(node, 'keywords'):
+            for keyword in node.keywords:
+                paren_or_comma()
+                self.write(keyword.arg + '=')
+                self.visit(keyword.value)
+            if node.starargs is not None:
+                paren_or_comma()
+                self.write('*')
+                self.visit(node.starargs)
+            if node.kwargs is not None:
+                paren_or_comma()
+                self.write('**')
+                self.visit(node.kwargs)
+        self.write(have_args and '):' or ':')
+        self.body(node.body)
+
+    def visit_If(self, node):
+        self.newline()
+        self.write('if ')
+        self.visit(node.test)
+        self.write(':')
+        self.body(node.body)
+        while True:
+            else_ = node.orelse
+            if len(else_) == 1 and isinstance(else_[0], If):
+                node = else_[0]
+                self.newline()
+                self.write('elif ')
+                self.visit(node.test)
+                self.write(':')
+                self.body(node.body)
+            else:
+                self.newline()
+                self.write('else:')
+                self.body(else_)
+                break
+
+    def visit_For(self, node):
+        self.newline()
+        self.write('for ')
+        self.visit(node.target)
+        self.write(' in ')
+        self.visit(node.iter)
+        self.write(':')
+        self.body_or_else(node)
+
+    def visit_While(self, node):
+        self.newline()
+        self.write('while ')
+        self.visit(node.test)
+        self.write(':')
+        self.body_or_else(node)
+
+    def visit_With(self, node):
+        self.newline()
+        self.write('with ')
+        self.visit(node.context_expr)
+        if node.optional_vars is not None:
+            self.write(' as ')
+            self.visit(node.optional_vars)
+        self.write(':')
+        self.body(node.body)
+
+    def visit_Pass(self, node):
+        self.newline()
+        self.write('pass')
+
+    def visit_Print(self, node):
+        # XXX: python 2.6 only
+        self.newline()
+        self.write('print ')
+        want_comma = False
+        if node.dest is not None:
+            self.write(' >> ')
+            self.visit(node.dest)
+            want_comma = True
+        for value in node.values:
+            if want_comma:
+                self.write(', ')
+            self.visit(value)
+            want_comma = True
+        if not node.nl:
+            self.write(',')
+
+    def visit_Delete(self, node):
+        self.newline()
+        self.write('del ')
+        for idx, target in enumerate(node):
+            if idx:
+                self.write(', ')
+            self.visit(target)
+
+    def visit_TryExcept(self, node):
+        self.newline()
+        self.write('try:')
+        self.body(node.body)
+        for handler in node.handlers:
+            self.visit(handler)
+
+    def visit_TryFinally(self, node):
+        self.newline()
+        self.write('try:')
+        self.body(node.body)
+        self.newline()
+        self.write('finally:')
+        self.body(node.finalbody)
+
+    def visit_Global(self, node):
+        self.newline()
+        self.write('global ' + ', '.join(node.names))
+
+    def visit_Nonlocal(self, node):
+        self.newline()
+        self.write('nonlocal ' + ', '.join(node.names))
+
+    def visit_Return(self, node):
+        self.newline()
+        self.write('return ')
+        self.visit(node.value)
+
+    def visit_Break(self, node):
+        self.newline()
+        self.write('break')
+
+    def visit_Continue(self, node):
+        self.newline()
+        self.write('continue')
+
+    def visit_Raise(self, node):
+        # XXX: Python 2.6 / 3.0 compatibility
+        self.newline()
+        self.write('raise')
+        if hasattr(node, 'exc') and node.exc is not None:
+            self.write(' ')
+            self.visit(node.exc)
+            if node.cause is not None:
+                self.write(' from ')
+                self.visit(node.cause)
+        elif hasattr(node, 'type') and node.type is not None:
+            self.visit(node.type)
+            if node.inst is not None:
+                self.write(', ')
+                self.visit(node.inst)
+            if node.tback is not None:
+                self.write(', ')
+                self.visit(node.tback)
+
+    # Expressions
+
+    def visit_Attribute(self, node):
+        self.visit(node.value)
+        self.write('.' + node.attr)
+
+    def visit_Call(self, node):
+        want_comma = []
+        def write_comma():
+            if want_comma:
+                self.write(', ')
+            else:
+                want_comma.append(True)
+
+        self.visit(node.func)
+        self.write('(')
+        for arg in node.args:
+            write_comma()
+            self.visit(arg)
+        for keyword in node.keywords:
+            write_comma()
+            self.write(keyword.arg + '=')
+            self.visit(keyword.value)
+        if node.starargs is not None:
+            write_comma()
+            self.write('*')
+            self.visit(node.starargs)
+        if node.kwargs is not None:
+            write_comma()
+            self.write('**')
+            self.visit(node.kwargs)
+        self.write(')')
+
+    def visit_Name(self, node):
+        self.write(node.id)
+
+    def visit_Str(self, node):
+        self.write(repr(node.s))
+
+    def visit_Bytes(self, node):
+        self.write(repr(node.s))
+
+    def visit_Num(self, node):
+        self.write(repr(node.n))
+
+    def visit_Tuple(self, node):
+        self.write('(')
+        idx = -1
+        for idx, item in enumerate(node.elts):
+            if idx:
+                self.write(', ')
+            self.visit(item)
+        self.write(idx and ')' or ',)')
+
+    def sequence_visit(left, right):
+        def visit(self, node):
+            self.write(left)
+            for idx, item in enumerate(node.elts):
+                if idx:
+                    self.write(', ')
+                self.visit(item)
+            self.write(right)
+        return visit
+
+    visit_List = sequence_visit('[', ']')
+    visit_Set = sequence_visit('{', '}')
+    del sequence_visit
+
+    def visit_Dict(self, node):
+        self.write('{')
+        for idx, (key, value) in enumerate(zip(node.keys, node.values)):
+            if idx:
+                self.write(', ')
+            self.visit(key)
+            self.write(': ')
+            self.visit(value)
+        self.write('}')
+
+    def visit_BinOp(self, node):
+        self.write('(')
+        self.visit(node.left)
+        self.write(' %s ' % BINOP_SYMBOLS[type(node.op)])
+        self.visit(node.right)
+        self.write(')')
+
+    def visit_BoolOp(self, node):
+        self.write('(')
+        for idx, value in enumerate(node.values):
+            if idx:
+                self.write(' %s ' % BOOLOP_SYMBOLS[type(node.op)])
+            self.visit(value)
+        self.write(')')
+
+    def visit_Compare(self, node):
+        self.write('(')
+        self.visit(node.left)
+        for op, right in zip(node.ops, node.comparators):
+            self.write(' %s ' % CMPOP_SYMBOLS[type(op)])
+            self.visit(right)
+        self.write(')')
+
+    def visit_UnaryOp(self, node):
+        self.write('(')
+        op = UNARYOP_SYMBOLS[type(node.op)]
+        self.write(op)
+        if op == 'not':
+            self.write(' ')
+        self.visit(node.operand)
+        self.write(')')
+
+    def visit_Subscript(self, node):
+        self.visit(node.value)
+        self.write('[')
+        self.visit(node.slice)
+        self.write(']')
+
+    def visit_Slice(self, node):
+        if node.lower is not None:
+            self.visit(node.lower)
+        self.write(':')
+        if node.upper is not None:
+            self.visit(node.upper)
+        if node.step is not None:
+            self.write(':')
+            if not (isinstance(node.step, Name) and node.step.id == 'None'):
+                self.visit(node.step)
+
+    def visit_ExtSlice(self, node):
+        for idx, item in node.dims:
+            if idx:
+                self.write(', ')
+            self.visit(item)
+
+    def visit_Yield(self, node):
+        self.write('yield ')
+        self.visit(node.value)
+
+    def visit_Lambda(self, node):
+        self.write('lambda ')
+        self.signature(node.args)
+        self.write(': ')
+        self.visit(node.body)
+
+    def visit_Ellipsis(self, node):
+        self.write('Ellipsis')
+
+    def generator_visit(left, right):
+        def visit(self, node):
+            self.write(left)
+            self.visit(node.elt)
+            for comprehension in node.generators:
+                self.visit(comprehension)
+            self.write(right)
+        return visit
+
+    visit_ListComp = generator_visit('[', ']')
+    visit_GeneratorExp = generator_visit('(', ')')
+    visit_SetComp = generator_visit('{', '}')
+    del generator_visit
+
+    def visit_DictComp(self, node):
+        self.write('{')
+        self.visit(node.key)
+        self.write(': ')
+        self.visit(node.value)
+        for comprehension in node.generators:
+            self.visit(comprehension)
+        self.write('}')
+
+    def visit_IfExp(self, node):
+        self.visit(node.body)
+        self.write(' if ')
+        self.visit(node.test)
+        self.write(' else ')
+        self.visit(node.orelse)
+
+    def visit_Starred(self, node):
+        self.write('*')
+        self.visit(node.value)
+
+    def visit_Repr(self, node):
+        # XXX: python 2.6 only
+        self.write('`')
+        self.visit(node.value)
+        self.write('`')
+
+    # Helper Nodes
+
+    def visit_alias(self, node):
+        self.write(node.name)
+        if node.asname is not None:
+            self.write(' as ' + node.asname)
+
+    def visit_comprehension(self, node):
+        self.write(' for ')
+        self.visit(node.target)
+        self.write(' in ')
+        self.visit(node.iter)
+        if node.ifs:
+            for if_ in node.ifs:
+                self.write(' if ')
+                self.visit(if_)
+
+    def visit_excepthandler(self, node):
+        self.newline()
+        self.write('except')
+        if node.type is not None:
+            self.write(' ')
+            self.visit(node.type)
+            if node.name is not None:
+                self.write(' as ')
+                self.visit(node.name)
+        self.write(':')
+        self.body(node.body)
diff --git a/lib/Mako-0.7.3/mako/ast.py b/lib/Mako-0.7.3/mako/ast.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/ast.py
@@ -0,0 +1,151 @@
+# mako/ast.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""utilities for analyzing expressions and blocks of Python
+code, as well as generating Python from AST nodes"""
+
+from mako import exceptions, pyparser, util
+import re
+
+class PythonCode(object):
+    """represents information about a string containing Python code"""
+    def __init__(self, code, **exception_kwargs):
+        self.code = code
+
+        # represents all identifiers which are assigned to at some point in
+        # the code
+        self.declared_identifiers = set()
+
+        # represents all identifiers which are referenced before their
+        # assignment, if any
+        self.undeclared_identifiers = set()
+
+        # note that an identifier can be in both the undeclared and declared
+        # lists.
+
+        # using AST to parse instead of using code.co_varnames,
+        # code.co_names has several advantages:
+        # - we can locate an identifier as "undeclared" even if
+        # its declared later in the same block of code
+        # - AST is less likely to break with version changes
+        # (for example, the behavior of co_names changed a little bit
+        # in python version 2.5)
+        if isinstance(code, basestring):
+            expr = pyparser.parse(code.lstrip(), "exec", **exception_kwargs)
+        else:
+            expr = code
+
+        f = pyparser.FindIdentifiers(self, **exception_kwargs)
+        f.visit(expr)
+
+class ArgumentList(object):
+    """parses a fragment of code as a comma-separated list of expressions"""
+    def __init__(self, code, **exception_kwargs):
+        self.codeargs = []
+        self.args = []
+        self.declared_identifiers = set()
+        self.undeclared_identifiers = set()
+        if isinstance(code, basestring):
+            if re.match(r"\S", code) and not re.match(r",\s*$", code):
+                # if theres text and no trailing comma, insure its parsed
+                # as a tuple by adding a trailing comma
+                code  += ","
+            expr = pyparser.parse(code, "exec", **exception_kwargs)
+        else:
+            expr = code
+
+        f = pyparser.FindTuple(self, PythonCode, **exception_kwargs)
+        f.visit(expr)
+
+class PythonFragment(PythonCode):
+    """extends PythonCode to provide identifier lookups in partial control
+    statements
+
+    e.g.
+        for x in 5:
+        elif y==9:
+        except (MyException, e):
+    etc.
+    """
+    def __init__(self, code, **exception_kwargs):
+        m = re.match(r'^(\w+)(?:\s+(.*?))?:\s*(#|$)', code.strip(), re.S)
+        if not m:
+            raise exceptions.CompileException(
+                          "Fragment '%s' is not a partial control statement" %
+                          code, **exception_kwargs)
+        if m.group(3):
+            code = code[:m.start(3)]
+        (keyword, expr) = m.group(1,2)
+        if keyword in ['for','if', 'while']:
+            code = code + "pass"
+        elif keyword == 'try':
+            code = code + "pass\nexcept:pass"
+        elif keyword == 'elif' or keyword == 'else':
+            code = "if False:pass\n" + code + "pass"
+        elif keyword == 'except':
+            code = "try:pass\n" + code + "pass"
+        elif keyword == 'with':
+            code = code + "pass"
+        else:
+            raise exceptions.CompileException(
+                                "Unsupported control keyword: '%s'" %
+                                keyword, **exception_kwargs)
+        super(PythonFragment, self).__init__(code, **exception_kwargs)
+
+
+class FunctionDecl(object):
+    """function declaration"""
+    def __init__(self, code, allow_kwargs=True, **exception_kwargs):
+        self.code = code
+        expr = pyparser.parse(code, "exec", **exception_kwargs)
+
+        f = pyparser.ParseFunc(self, **exception_kwargs)
+        f.visit(expr)
+        if not hasattr(self, 'funcname'):
+            raise exceptions.CompileException(
+                              "Code '%s' is not a function declaration" % code,
+                              **exception_kwargs)
+        if not allow_kwargs and self.kwargs:
+            raise exceptions.CompileException(
+                                "'**%s' keyword argument not allowed here" %
+                                self.argnames[-1], **exception_kwargs)
+
+    def get_argument_expressions(self, include_defaults=True):
+        """return the argument declarations of this FunctionDecl as a printable
+        list."""
+
+        namedecls = []
+        defaults = [d for d in self.defaults]
+        kwargs = self.kwargs
+        varargs = self.varargs
+        argnames = [f for f in self.argnames]
+        argnames.reverse()
+        for arg in argnames:
+            default = None
+            if kwargs:
+                arg = "**" + arg
+                kwargs = False
+            elif varargs:
+                arg = "*" + arg
+                varargs = False
+            else:
+                default = len(defaults) and defaults.pop() or None
+            if include_defaults and default:
+                namedecls.insert(0, "%s=%s" %
+                            (arg,
+                            pyparser.ExpressionGenerator(default).value()
+                            )
+                        )
+            else:
+                namedecls.insert(0, arg)
+        return namedecls
+
+class FunctionArgs(FunctionDecl):
+    """the argument portion of a function declaration"""
+
+    def __init__(self, code, **kwargs):
+        super(FunctionArgs, self).__init__("def ANON(%s):pass" % code,
+                **kwargs)
diff --git a/lib/Mako-0.7.3/mako/cache.py b/lib/Mako-0.7.3/mako/cache.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/cache.py
@@ -0,0 +1,236 @@
+# mako/cache.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+from mako import exceptions, util
+
+_cache_plugins = util.PluginLoader("mako.cache")
+
+register_plugin = _cache_plugins.register
+register_plugin("beaker", "mako.ext.beaker_cache", "BeakerCacheImpl")
+
+
+class Cache(object):
+    """Represents a data content cache made available to the module
+    space of a specific :class:`.Template` object.
+
+    .. versionadded:: 0.6
+       :class:`.Cache` by itself is mostly a
+       container for a :class:`.CacheImpl` object, which implements
+       a fixed API to provide caching services; specific subclasses exist to
+       implement different
+       caching strategies.   Mako includes a backend that works with
+       the Beaker caching system.   Beaker itself then supports
+       a number of backends (i.e. file, memory, memcached, etc.)
+
+    The construction of a :class:`.Cache` is part of the mechanics
+    of a :class:`.Template`, and programmatic access to this
+    cache is typically via the :attr:`.Template.cache` attribute.
+
+    """
+
+    impl = None
+    """Provide the :class:`.CacheImpl` in use by this :class:`.Cache`.
+
+    This accessor allows a :class:`.CacheImpl` with additional
+    methods beyond that of :class:`.Cache` to be used programmatically.
+
+    """
+
+    id = None
+    """Return the 'id' that identifies this cache.
+
+    This is a value that should be globally unique to the
+    :class:`.Template` associated with this cache, and can
+    be used by a caching system to name a local container
+    for data specific to this template.
+
+    """
+
+    starttime = None
+    """Epochal time value for when the owning :class:`.Template` was
+    first compiled.
+
+    A cache implementation may wish to invalidate data earlier than
+    this timestamp; this has the effect of the cache for a specific
+    :class:`.Template` starting clean any time the :class:`.Template`
+    is recompiled, such as when the original template file changed on
+    the filesystem.
+
+    """
+
+    def __init__(self, template, *args):
+        # check for a stale template calling the
+        # constructor
+        if isinstance(template, basestring) and args:
+            return
+        self.template = template
+        self.id = template.module.__name__
+        self.starttime = template.module._modified_time
+        self._def_regions = {}
+        self.impl = self._load_impl(self.template.cache_impl)
+
+    def _load_impl(self, name):
+        return _cache_plugins.load(name)(self)
+
+    def get_or_create(self, key, creation_function, **kw):
+        """Retrieve a value from the cache, using the given creation function
+        to generate a new value."""
+
+        return self._ctx_get_or_create(key, creation_function, None, **kw)
+
+    def _ctx_get_or_create(self, key, creation_function, context, **kw):
+        """Retrieve a value from the cache, using the given creation function
+        to generate a new value."""
+
+        if not self.template.cache_enabled:
+            return creation_function()
+
+        return self.impl.get_or_create(key,
+                        creation_function,
+                        **self._get_cache_kw(kw, context))
+
+    def set(self, key, value, **kw):
+        """Place a value in the cache.
+
+        :param key: the value's key.
+        :param value: the value.
+        :param \**kw: cache configuration arguments.
+
+        """
+
+        self.impl.set(key, value, **self._get_cache_kw(kw, None))
+
+    put = set
+    """A synonym for :meth:`.Cache.set`.
+
+    This is here for backwards compatibility.
+
+    """
+
+    def get(self, key, **kw):
+        """Retrieve a value from the cache.
+
+        :param key: the value's key.
+        :param \**kw: cache configuration arguments.  The
+         backend is configured using these arguments upon first request.
+         Subsequent requests that use the same series of configuration
+         values will use that same backend.
+
+        """
+        return self.impl.get(key, **self._get_cache_kw(kw, None))
+
+    def invalidate(self, key, **kw):
+        """Invalidate a value in the cache.
+
+        :param key: the value's key.
+        :param \**kw: cache configuration arguments.  The
+         backend is configured using these arguments upon first request.
+         Subsequent requests that use the same series of configuration
+         values will use that same backend.
+
+        """
+        self.impl.invalidate(key, **self._get_cache_kw(kw, None))
+
+    def invalidate_body(self):
+        """Invalidate the cached content of the "body" method for this
+        template.
+
+        """
+        self.invalidate('render_body', __M_defname='render_body')
+
+    def invalidate_def(self, name):
+        """Invalidate the cached content of a particular ``<%def>`` within this
+        template.
+
+        """
+
+        self.invalidate('render_%s' % name, __M_defname='render_%s' % name)
+
+    def invalidate_closure(self, name):
+        """Invalidate a nested ``<%def>`` within this template.
+
+        Caching of nested defs is a blunt tool as there is no
+        management of scope -- nested defs that use cache tags
+        need to have names unique of all other nested defs in the
+        template, else their content will be overwritten by
+        each other.
+
+        """
+
+        self.invalidate(name, __M_defname=name)
+
+    def _get_cache_kw(self, kw, context):
+        defname = kw.pop('__M_defname', None)
+        if not defname:
+            tmpl_kw = self.template.cache_args.copy()
+            tmpl_kw.update(kw)
+        elif defname in self._def_regions:
+            tmpl_kw = self._def_regions[defname]
+        else:
+            tmpl_kw = self.template.cache_args.copy()
+            tmpl_kw.update(kw)
+            self._def_regions[defname] = tmpl_kw
+        if context and self.impl.pass_context:
+            tmpl_kw = tmpl_kw.copy()
+            tmpl_kw.setdefault('context', context)
+        return tmpl_kw
+
+class CacheImpl(object):
+    """Provide a cache implementation for use by :class:`.Cache`."""
+
+    def __init__(self, cache):
+        self.cache = cache
+
+    pass_context = False
+    """If ``True``, the :class:`.Context` will be passed to
+    :meth:`get_or_create <.CacheImpl.get_or_create>` as the name ``'context'``.
+    """
+
+    def get_or_create(self, key, creation_function, **kw):
+        """Retrieve a value from the cache, using the given creation function
+        to generate a new value.
+
+        This function *must* return a value, either from
+        the cache, or via the given creation function.
+        If the creation function is called, the newly
+        created value should be populated into the cache
+        under the given key before being returned.
+
+        :param key: the value's key.
+        :param creation_function: function that when called generates
+         a new value.
+        :param \**kw: cache configuration arguments.
+
+        """
+        raise NotImplementedError()
+
+    def set(self, key, value, **kw):
+        """Place a value in the cache.
+
+        :param key: the value's key.
+        :param value: the value.
+        :param \**kw: cache configuration arguments.
+
+        """
+        raise NotImplementedError()
+
+    def get(self, key, **kw):
+        """Retrieve a value from the cache.
+
+        :param key: the value's key.
+        :param \**kw: cache configuration arguments.
+
+        """
+        raise NotImplementedError()
+
+    def invalidate(self, key, **kw):
+        """Invalidate a value in the cache.
+
+        :param key: the value's key.
+        :param \**kw: cache configuration arguments.
+
+        """
+        raise NotImplementedError()
diff --git a/lib/Mako-0.7.3/mako/codegen.py b/lib/Mako-0.7.3/mako/codegen.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/codegen.py
@@ -0,0 +1,1215 @@
+# mako/codegen.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""provides functionality for rendering a parsetree constructing into module
+source code."""
+
+import time
+import re
+from mako.pygen import PythonPrinter
+from mako import util, ast, parsetree, filters, exceptions
+
+MAGIC_NUMBER = 8
+
+# names which are hardwired into the
+# template and are not accessed via the
+# context itself
+RESERVED_NAMES = set(['context', 'loop', 'UNDEFINED'])
+
+def compile(node,
+                uri,
+                filename=None,
+                default_filters=None,
+                buffer_filters=None,
+                imports=None,
+                source_encoding=None,
+                generate_magic_comment=True,
+                disable_unicode=False,
+                strict_undefined=False,
+                enable_loop=True,
+                reserved_names=()):
+
+    """Generate module source code given a parsetree node,
+      uri, and optional source filename"""
+
+    # if on Py2K, push the "source_encoding" string to be
+    # a bytestring itself, as we will be embedding it into
+    # the generated source and we don't want to coerce the
+    # result into a unicode object, in "disable_unicode" mode
+    if not util.py3k and isinstance(source_encoding, unicode):
+        source_encoding = source_encoding.encode(source_encoding)
+
+
+    buf = util.FastEncodingBuffer()
+
+    printer = PythonPrinter(buf)
+    _GenerateRenderMethod(printer,
+                            _CompileContext(uri,
+                                            filename,
+                                            default_filters,
+                                            buffer_filters,
+                                            imports,
+                                            source_encoding,
+                                            generate_magic_comment,
+                                            disable_unicode,
+                                            strict_undefined,
+                                            enable_loop,
+                                            reserved_names),
+                                node)
+    return buf.getvalue()
+
+class _CompileContext(object):
+    def __init__(self,
+                    uri,
+                    filename,
+                    default_filters,
+                    buffer_filters,
+                    imports,
+                    source_encoding,
+                    generate_magic_comment,
+                    disable_unicode,
+                    strict_undefined,
+                    enable_loop,
+                    reserved_names):
+        self.uri = uri
+        self.filename = filename
+        self.default_filters = default_filters
+        self.buffer_filters = buffer_filters
+        self.imports = imports
+        self.source_encoding = source_encoding
+        self.generate_magic_comment = generate_magic_comment
+        self.disable_unicode = disable_unicode
+        self.strict_undefined = strict_undefined
+        self.enable_loop = enable_loop
+        self.reserved_names = reserved_names
+
+class _GenerateRenderMethod(object):
+    """A template visitor object which generates the
+       full module source for a template.
+
+    """
+    def __init__(self, printer, compiler, node):
+        self.printer = printer
+        self.last_source_line = -1
+        self.compiler = compiler
+        self.node = node
+        self.identifier_stack = [None]
+
+        self.in_def = isinstance(node, (parsetree.DefTag, parsetree.BlockTag))
+
+        if self.in_def:
+            name = "render_%s" % node.funcname
+            args = node.get_argument_expressions()
+            filtered = len(node.filter_args.args) > 0
+            buffered = eval(node.attributes.get('buffered', 'False'))
+            cached = eval(node.attributes.get('cached', 'False'))
+            defs = None
+            pagetag = None
+            if node.is_block and not node.is_anonymous:
+                args += ['**pageargs']
+        else:
+            defs = self.write_toplevel()
+            pagetag = self.compiler.pagetag
+            name = "render_body"
+            if pagetag is not None:
+                args = pagetag.body_decl.get_argument_expressions()
+                if not pagetag.body_decl.kwargs:
+                    args += ['**pageargs']
+                cached = eval(pagetag.attributes.get('cached', 'False'))
+                self.compiler.enable_loop = self.compiler.enable_loop or eval(
+                                        pagetag.attributes.get(
+                                                'enable_loop', 'False')
+                                    )
+            else:
+                args = ['**pageargs']
+                cached = False
+            buffered = filtered = False
+        if args is None:
+            args = ['context']
+        else:
+            args = [a for a in ['context'] + args]
+
+        self.write_render_callable(
+                            pagetag or node,
+                            name, args,
+                            buffered, filtered, cached)
+
+        if defs is not None:
+            for node in defs:
+                _GenerateRenderMethod(printer, compiler, node)
+
+    @property
+    def identifiers(self):
+        return self.identifier_stack[-1]
+
+    def write_toplevel(self):
+        """Traverse a template structure for module-level directives and
+        generate the start of module-level code.
+
+        """
+        inherit = []
+        namespaces = {}
+        module_code = []
+        encoding = [None]
+
+        self.compiler.pagetag = None
+
+        class FindTopLevel(object):
+            def visitInheritTag(s, node):
+                inherit.append(node)
+            def visitNamespaceTag(s, node):
+                namespaces[node.name] = node
+            def visitPageTag(s, node):
+                self.compiler.pagetag = node
+            def visitCode(s, node):
+                if node.ismodule:
+                    module_code.append(node)
+
+        f = FindTopLevel()
+        for n in self.node.nodes:
+            n.accept_visitor(f)
+
+        self.compiler.namespaces = namespaces
+
+        module_ident = set()
+        for n in module_code:
+            module_ident = module_ident.union(n.declared_identifiers())
+
+        module_identifiers = _Identifiers(self.compiler)
+        module_identifiers.declared = module_ident
+
+        # module-level names, python code
+        if self.compiler.generate_magic_comment and \
+            self.compiler.source_encoding:
+            self.printer.writeline("# -*- encoding:%s -*-" %
+                                    self.compiler.source_encoding)
+
+        self.printer.writeline("from mako import runtime, filters, cache")
+        self.printer.writeline("UNDEFINED = runtime.UNDEFINED")
+        self.printer.writeline("__M_dict_builtin = dict")
+        self.printer.writeline("__M_locals_builtin = locals")
+        self.printer.writeline("_magic_number = %r" % MAGIC_NUMBER)
+        self.printer.writeline("_modified_time = %r" % time.time())
+        self.printer.writeline("_enable_loop = %r" % self.compiler.enable_loop)
+        self.printer.writeline(
+                            "_template_filename = %r" % self.compiler.filename)
+        self.printer.writeline("_template_uri = %r" % self.compiler.uri)
+        self.printer.writeline(
+                    "_source_encoding = %r" % self.compiler.source_encoding)
+        if self.compiler.imports:
+            buf = ''
+            for imp in self.compiler.imports:
+                buf += imp + "\n"
+                self.printer.writeline(imp)
+            impcode = ast.PythonCode(
+                            buf,
+                            source='', lineno=0,
+                            pos=0,
+                            filename='template defined imports')
+        else:
+            impcode = None
+
+        main_identifiers = module_identifiers.branch(self.node)
+        module_identifiers.topleveldefs = \
+            module_identifiers.topleveldefs.\
+                union(main_identifiers.topleveldefs)
+        module_identifiers.declared.add("UNDEFINED")
+        if impcode:
+            module_identifiers.declared.update(impcode.declared_identifiers)
+
+        self.compiler.identifiers = module_identifiers
+        self.printer.writeline("_exports = %r" %
+                            [n.name for n in
+                            main_identifiers.topleveldefs.values()]
+                        )
+        self.printer.write("\n\n")
+
+        if len(module_code):
+            self.write_module_code(module_code)
+
+        if len(inherit):
+            self.write_namespaces(namespaces)
+            self.write_inherit(inherit[-1])
+        elif len(namespaces):
+            self.write_namespaces(namespaces)
+
+        return main_identifiers.topleveldefs.values()
+
+    def write_render_callable(self, node, name, args, buffered, filtered,
+            cached):
+        """write a top-level render callable.
+
+        this could be the main render() method or that of a top-level def."""
+
+        if self.in_def:
+            decorator = node.decorator
+            if decorator:
+                self.printer.writeline(
+                                 "@runtime._decorate_toplevel(%s)" % decorator)
+
+        self.printer.writelines(
+            "def %s(%s):" % (name, ','.join(args)),
+                # push new frame, assign current frame to __M_caller
+                "__M_caller = context.caller_stack._push_frame()",
+                "try:"
+        )
+        if buffered or filtered or cached:
+            self.printer.writeline("context._push_buffer()")
+
+        self.identifier_stack.append(
+                                   self.compiler.identifiers.branch(self.node))
+        if (not self.in_def or self.node.is_block) and '**pageargs' in args:
+            self.identifier_stack[-1].argument_declared.add('pageargs')
+
+        if not self.in_def and (
+                                len(self.identifiers.locally_assigned) > 0 or
+                                len(self.identifiers.argument_declared) > 0
+                                ):
+            self.printer.writeline("__M_locals = __M_dict_builtin(%s)" %
+                                    ','.join([
+                                            "%s=%s" % (x, x) for x in
+                                            self.identifiers.argument_declared
+                                            ]))
+
+        self.write_variable_declares(self.identifiers, toplevel=True)
+
+        for n in self.node.nodes:
+            n.accept_visitor(self)
+
+        self.write_def_finish(self.node, buffered, filtered, cached)
+        self.printer.writeline(None)
+        self.printer.write("\n\n")
+        if cached:
+            self.write_cache_decorator(
+                                node, name,
+                                args, buffered,
+                                self.identifiers, toplevel=True)
+
+    def write_module_code(self, module_code):
+        """write module-level template code, i.e. that which
+        is enclosed in <%! %> tags in the template."""
+        for n in module_code:
+            self.write_source_comment(n)
+            self.printer.write_indented_block(n.text)
+
+    def write_inherit(self, node):
+        """write the module-level inheritance-determination callable."""
+
+        self.printer.writelines(
+            "def _mako_inherit(template, context):",
+                "_mako_generate_namespaces(context)",
+                "return runtime._inherit_from(context, %s, _template_uri)" %
+                 (node.parsed_attributes['file']),
+                None
+            )
+
+    def write_namespaces(self, namespaces):
+        """write the module-level namespace-generating callable."""
+        self.printer.writelines(
+            "def _mako_get_namespace(context, name):",
+                "try:",
+                    "return context.namespaces[(__name__, name)]",
+                "except KeyError:",
+                    "_mako_generate_namespaces(context)",
+                "return context.namespaces[(__name__, name)]",
+            None, None
+            )
+        self.printer.writeline("def _mako_generate_namespaces(context):")
+
+
+        for node in namespaces.values():
+            if node.attributes.has_key('import'):
+                self.compiler.has_ns_imports = True
+            self.write_source_comment(node)
+            if len(node.nodes):
+                self.printer.writeline("def make_namespace():")
+                export = []
+                identifiers = self.compiler.identifiers.branch(node)
+                self.in_def = True
+                class NSDefVisitor(object):
+                    def visitDefTag(s, node):
+                        s.visitDefOrBase(node)
+
+                    def visitBlockTag(s, node):
+                        s.visitDefOrBase(node)
+
+                    def visitDefOrBase(s, node):
+                        if node.is_anonymous:
+                            raise exceptions.CompileException(
+                                "Can't put anonymous blocks inside "
+                                "<%namespace>",
+                                **node.exception_kwargs
+                            )
+                        self.write_inline_def(node, identifiers, nested=False)
+                        export.append(node.funcname)
+                vis = NSDefVisitor()
+                for n in node.nodes:
+                    n.accept_visitor(vis)
+                self.printer.writeline("return [%s]" % (','.join(export)))
+                self.printer.writeline(None)
+                self.in_def = False
+                callable_name = "make_namespace()"
+            else:
+                callable_name = "None"
+
+            if 'file' in node.parsed_attributes:
+                self.printer.writeline(
+                                "ns = runtime.TemplateNamespace(%r,"
+                                " context._clean_inheritance_tokens(),"
+                                " templateuri=%s, callables=%s, "
+                                " calling_uri=_template_uri)" %
+                                (
+                                   node.name,
+                                   node.parsed_attributes.get('file', 'None'),
+                                   callable_name,
+                                )
+                            )
+            elif 'module' in node.parsed_attributes:
+                self.printer.writeline(
+                                "ns = runtime.ModuleNamespace(%r,"
+                                " context._clean_inheritance_tokens(),"
+                                " callables=%s, calling_uri=_template_uri,"
+                                " module=%s)" %
+                                (
+                                   node.name,
+                                   callable_name,
+                                   node.parsed_attributes.get('module', 'None')
+                                )
+                            )
+            else:
+                self.printer.writeline(
+                                "ns = runtime.Namespace(%r,"
+                                " context._clean_inheritance_tokens(),"
+                                " callables=%s, calling_uri=_template_uri)" %
+                                (
+                                    node.name,
+                                    callable_name,
+                                )
+                            )
+            if eval(node.attributes.get('inheritable', "False")):
+                self.printer.writeline("context['self'].%s = ns" % (node.name))
+
+            self.printer.writeline(
+                   "context.namespaces[(__name__, %s)] = ns" % repr(node.name))
+            self.printer.write("\n")
+        if not len(namespaces):
+            self.printer.writeline("pass")
+        self.printer.writeline(None)
+
+    def write_variable_declares(self, identifiers, toplevel=False, limit=None):
+        """write variable declarations at the top of a function.
+
+        the variable declarations are in the form of callable
+        definitions for defs and/or name lookup within the
+        function's context argument. the names declared are based
+        on the names that are referenced in the function body,
+        which don't otherwise have any explicit assignment
+        operation. names that are assigned within the body are
+        assumed to be locally-scoped variables and are not
+        separately declared.
+
+        for def callable definitions, if the def is a top-level
+        callable then a 'stub' callable is generated which wraps
+        the current Context into a closure. if the def is not
+        top-level, it is fully rendered as a local closure.
+
+        """
+
+        # collection of all defs available to us in this scope
+        comp_idents = dict([(c.funcname, c) for c in identifiers.defs])
+        to_write = set()
+
+        # write "context.get()" for all variables we are going to
+        # need that arent in the namespace yet
+        to_write = to_write.union(identifiers.undeclared)
+
+        # write closure functions for closures that we define
+        # right here
+        to_write = to_write.union(
+                        [c.funcname for c in identifiers.closuredefs.values()])
+
+        # remove identifiers that are declared in the argument
+        # signature of the callable
+        to_write = to_write.difference(identifiers.argument_declared)
+
+        # remove identifiers that we are going to assign to.
+        # in this way we mimic Python's behavior,
+        # i.e. assignment to a variable within a block
+        # means that variable is now a "locally declared" var,
+        # which cannot be referenced beforehand.
+        to_write = to_write.difference(identifiers.locally_declared)
+
+        if self.compiler.enable_loop:
+            has_loop = "loop" in to_write
+            to_write.discard("loop")
+        else:
+            has_loop = False
+
+        # if a limiting set was sent, constraint to those items in that list
+        # (this is used for the caching decorator)
+        if limit is not None:
+            to_write = to_write.intersection(limit)
+
+        if toplevel and getattr(self.compiler, 'has_ns_imports', False):
+            self.printer.writeline("_import_ns = {}")
+            self.compiler.has_imports = True
+            for ident, ns in self.compiler.namespaces.iteritems():
+                if ns.attributes.has_key('import'):
+                    self.printer.writeline(
+                            "_mako_get_namespace(context, %r)."\
+                                    "_populate(_import_ns, %r)" %
+                            (
+                                ident,
+                                re.split(r'\s*,\s*', ns.attributes['import'])
+                            ))
+
+        if has_loop:
+            self.printer.writeline(
+                'loop = __M_loop = runtime.LoopStack()'
+            )
+
+        for ident in to_write:
+            if ident in comp_idents:
+                comp = comp_idents[ident]
+                if comp.is_block:
+                    if not comp.is_anonymous:
+                        self.write_def_decl(comp, identifiers)
+                    else:
+                        self.write_inline_def(comp, identifiers, nested=True)
+                else:
+                    if comp.is_root():
+                        self.write_def_decl(comp, identifiers)
+                    else:
+                        self.write_inline_def(comp, identifiers, nested=True)
+
+            elif ident in self.compiler.namespaces:
+                self.printer.writeline(
+                            "%s = _mako_get_namespace(context, %r)" %
+                                (ident, ident)
+                            )
+            else:
+                if getattr(self.compiler, 'has_ns_imports', False):
+                    if self.compiler.strict_undefined:
+                        self.printer.writelines(
+                        "%s = _import_ns.get(%r, UNDEFINED)" %
+                        (ident, ident),
+                        "if %s is UNDEFINED:" % ident,
+                            "try:",
+                                "%s = context[%r]" % (ident, ident),
+                            "except KeyError:",
+                                "raise NameError(\"'%s' is not defined\")" %
+                                    ident,
+                            None, None
+                        )
+                    else:
+                        self.printer.writeline(
+                        "%s = _import_ns.get(%r, context.get(%r, UNDEFINED))" %
+                        (ident, ident, ident))
+                else:
+                    if self.compiler.strict_undefined:
+                        self.printer.writelines(
+                            "try:",
+                                "%s = context[%r]" % (ident, ident),
+                            "except KeyError:",
+                                "raise NameError(\"'%s' is not defined\")" %
+                                    ident,
+                            None
+                        )
+                    else:
+                        self.printer.writeline(
+                            "%s = context.get(%r, UNDEFINED)" % (ident, ident)
+                        )
+
+        self.printer.writeline("__M_writer = context.writer()")
+
+    def write_source_comment(self, node):
+        """write a source comment containing the line number of the
+        corresponding template line."""
+        if self.last_source_line != node.lineno:
+            self.printer.writeline("# SOURCE LINE %d" % node.lineno)
+            self.last_source_line = node.lineno
+
+    def write_def_decl(self, node, identifiers):
+        """write a locally-available callable referencing a top-level def"""
+        funcname = node.funcname
+        namedecls = node.get_argument_expressions()
+        nameargs = node.get_argument_expressions(include_defaults=False)
+
+        if not self.in_def and (
+                                len(self.identifiers.locally_assigned) > 0 or
+                                len(self.identifiers.argument_declared) > 0):
+            nameargs.insert(0, 'context.locals_(__M_locals)')
+        else:
+            nameargs.insert(0, 'context')
+        self.printer.writeline("def %s(%s):" % (funcname, ",".join(namedecls)))
+        self.printer.writeline(
+                       "return render_%s(%s)" % (funcname, ",".join(nameargs)))
+        self.printer.writeline(None)
+
+    def write_inline_def(self, node, identifiers, nested):
+        """write a locally-available def callable inside an enclosing def."""
+
+        namedecls = node.get_argument_expressions()
+
+        decorator = node.decorator
+        if decorator:
+            self.printer.writeline(
+                          "@runtime._decorate_inline(context, %s)" % decorator)
+        self.printer.writeline(
+                          "def %s(%s):" % (node.funcname, ",".join(namedecls)))
+        filtered = len(node.filter_args.args) > 0
+        buffered = eval(node.attributes.get('buffered', 'False'))
+        cached = eval(node.attributes.get('cached', 'False'))
+        self.printer.writelines(
+            # push new frame, assign current frame to __M_caller
+            "__M_caller = context.caller_stack._push_frame()",
+            "try:"
+            )
+        if buffered or filtered or cached:
+            self.printer.writelines(
+                "context._push_buffer()",
+                )
+
+        identifiers = identifiers.branch(node, nested=nested)
+
+        self.write_variable_declares(identifiers)
+
+        self.identifier_stack.append(identifiers)
+        for n in node.nodes:
+            n.accept_visitor(self)
+        self.identifier_stack.pop()
+
+        self.write_def_finish(node, buffered, filtered, cached)
+        self.printer.writeline(None)
+        if cached:
+            self.write_cache_decorator(node, node.funcname,
+                                        namedecls, False, identifiers,
+                                        inline=True, toplevel=False)
+
+    def write_def_finish(self, node, buffered, filtered, cached,
+            callstack=True):
+        """write the end section of a rendering function, either outermost or
+        inline.
+
+        this takes into account if the rendering function was filtered,
+        buffered, etc.  and closes the corresponding try: block if any, and
+        writes code to retrieve captured content, apply filters, send proper
+        return value."""
+
+        if not buffered and not cached and not filtered:
+            self.printer.writeline("return ''")
+            if callstack:
+                self.printer.writelines(
+                    "finally:",
+                        "context.caller_stack._pop_frame()",
+                    None
+                )
+
+        if buffered or filtered or cached:
+            if buffered or cached:
+                # in a caching scenario, don't try to get a writer
+                # from the context after popping; assume the caching
+                # implemenation might be using a context with no
+                # extra buffers
+                self.printer.writelines(
+                    "finally:",
+                        "__M_buf = context._pop_buffer()"
+                )
+            else:
+                self.printer.writelines(
+                   "finally:",
+                       "__M_buf, __M_writer = context._pop_buffer_and_writer()"
+                )
+
+            if callstack:
+                self.printer.writeline("context.caller_stack._pop_frame()")
+
+            s = "__M_buf.getvalue()"
+            if filtered:
+                s = self.create_filter_callable(node.filter_args.args, s,
+                                                False)
+            self.printer.writeline(None)
+            if buffered and not cached:
+                s = self.create_filter_callable(self.compiler.buffer_filters,
+                                                s, False)
+            if buffered or cached:
+                self.printer.writeline("return %s" % s)
+            else:
+                self.printer.writelines(
+                    "__M_writer(%s)" % s,
+                    "return ''"
+                )
+
+    def write_cache_decorator(self, node_or_pagetag, name,
+                                    args, buffered, identifiers,
+                                    inline=False, toplevel=False):
+        """write a post-function decorator to replace a rendering
+            callable with a cached version of itself."""
+
+        self.printer.writeline("__M_%s = %s" % (name, name))
+        cachekey = node_or_pagetag.parsed_attributes.get('cache_key',
+                                                         repr(name))
+
+        cache_args = {}
+        if self.compiler.pagetag is not None:
+            cache_args.update(
+                (
+                    pa[6:],
+                    self.compiler.pagetag.parsed_attributes[pa]
+                )
+                for pa in self.compiler.pagetag.parsed_attributes
+                if pa.startswith('cache_') and pa != 'cache_key'
+            )
+        cache_args.update(
+            (
+                pa[6:],
+                node_or_pagetag.parsed_attributes[pa]
+            ) for pa in node_or_pagetag.parsed_attributes
+            if pa.startswith('cache_') and pa != 'cache_key'
+        )
+        if 'timeout' in cache_args:
+            cache_args['timeout'] = int(eval(cache_args['timeout']))
+
+        self.printer.writeline("def %s(%s):" % (name, ','.join(args)))
+
+        # form "arg1, arg2, arg3=arg3, arg4=arg4", etc.
+        pass_args = [
+                        '=' in a and "%s=%s" % ((a.split('=')[0],)*2) or a
+                        for a in args
+                    ]
+
+        self.write_variable_declares(
+                            identifiers,
+                            toplevel=toplevel,
+                            limit=node_or_pagetag.undeclared_identifiers()
+                        )
+        if buffered:
+            s = "context.get('local')."\
+                "cache._ctx_get_or_create("\
+                "%s, lambda:__M_%s(%s),  context, %s__M_defname=%r)" % \
+                            (cachekey, name, ','.join(pass_args),
+                            ''.join(["%s=%s, " % (k,v)
+                            for k, v in cache_args.items()]),
+                            name
+                            )
+            # apply buffer_filters
+            s = self.create_filter_callable(self.compiler.buffer_filters, s,
+                                            False)
+            self.printer.writelines("return " + s,None)
+        else:
+            self.printer.writelines(
+                    "__M_writer(context.get('local')."
+                    "cache._ctx_get_or_create("\
+                    "%s, lambda:__M_%s(%s), context, %s__M_defname=%r))" %
+                    (cachekey, name, ','.join(pass_args),
+                    ''.join(["%s=%s, " % (k,v)
+                        for k, v in cache_args.items()]),
+                    name,
+                    ),
+                    "return ''",
+                None
+            )
+
+    def create_filter_callable(self, args, target, is_expression):
+        """write a filter-applying expression based on the filters
+        present in the given filter names, adjusting for the global
+        'default' filter aliases as needed."""
+
+        def locate_encode(name):
+            if re.match(r'decode\..+', name):
+                return "filters." + name
+            elif self.compiler.disable_unicode:
+                return filters.NON_UNICODE_ESCAPES.get(name, name)
+            else:
+                return filters.DEFAULT_ESCAPES.get(name, name)
+
+        if 'n' not in args:
+            if is_expression:
+                if self.compiler.pagetag:
+                    args = self.compiler.pagetag.filter_args.args + args
+                if self.compiler.default_filters:
+                    args = self.compiler.default_filters + args
+        for e in args:
+            # if filter given as a function, get just the identifier portion
+            if e == 'n':
+                continue
+            m = re.match(r'(.+?)(\(.*\))', e)
+            if m:
+                (ident, fargs) = m.group(1,2)
+                f = locate_encode(ident)
+                e = f + fargs
+            else:
+                x = e
+                e = locate_encode(e)
+                assert e is not None
+            target = "%s(%s)" % (e, target)
+        return target
+
+    def visitExpression(self, node):
+        self.write_source_comment(node)
+        if len(node.escapes) or \
+                (
+                    self.compiler.pagetag is not None and
+                    len(self.compiler.pagetag.filter_args.args)
+                ) or \
+                len(self.compiler.default_filters):
+
+            s = self.create_filter_callable(node.escapes_code.args,
+                                            "%s" % node.text, True)
+            self.printer.writeline("__M_writer(%s)" % s)
+        else:
+            self.printer.writeline("__M_writer(%s)" % node.text)
+
+    def visitControlLine(self, node):
+        if node.isend:
+            self.printer.writeline(None)
+            if node.has_loop_context:
+                self.printer.writeline('finally:')
+                self.printer.writeline("loop = __M_loop._exit()")
+                self.printer.writeline(None)
+        else:
+            self.write_source_comment(node)
+            if self.compiler.enable_loop and node.keyword == 'for':
+                text = mangle_mako_loop(node, self.printer)
+            else:
+                text = node.text
+            self.printer.writeline(text)
+            children = node.get_children()
+            # this covers the three situations where we want to insert a pass:
+            #    1) a ternary control line with no children,
+            #    2) a primary control line with nothing but its own ternary
+            #          and end control lines, and
+            #    3) any control line with no content other than comments
+            if not children or (
+                    util.all(isinstance(c, (parsetree.Comment,
+                                            parsetree.ControlLine))
+                             for c in children) and
+                    util.all((node.is_ternary(c.keyword) or c.isend)
+                             for c in children
+                             if isinstance(c, parsetree.ControlLine))):
+                self.printer.writeline("pass")
+
+    def visitText(self, node):
+        self.write_source_comment(node)
+        self.printer.writeline("__M_writer(%s)" % repr(node.content))
+
+    def visitTextTag(self, node):
+        filtered = len(node.filter_args.args) > 0
+        if filtered:
+            self.printer.writelines(
+                "__M_writer = context._push_writer()",
+                "try:",
+            )
+        for n in node.nodes:
+            n.accept_visitor(self)
+        if filtered:
+            self.printer.writelines(
+                "finally:",
+                "__M_buf, __M_writer = context._pop_buffer_and_writer()",
+                "__M_writer(%s)" %
+                self.create_filter_callable(
+                                node.filter_args.args,
+                                "__M_buf.getvalue()",
+                                False),
+                None
+                )
+
+    def visitCode(self, node):
+        if not node.ismodule:
+            self.write_source_comment(node)
+            self.printer.write_indented_block(node.text)
+
+            if not self.in_def and len(self.identifiers.locally_assigned) > 0:
+                # if we are the "template" def, fudge locally
+                # declared/modified variables into the "__M_locals" dictionary,
+                # which is used for def calls within the same template,
+                # to simulate "enclosing scope"
+                self.printer.writeline(
+                      '__M_locals_builtin_stored = __M_locals_builtin()')
+                self.printer.writeline(
+                      '__M_locals.update(__M_dict_builtin([(__M_key,'
+                      ' __M_locals_builtin_stored[__M_key]) for __M_key in'
+                      ' [%s] if __M_key in __M_locals_builtin_stored]))' %
+                      ','.join([repr(x) for x in node.declared_identifiers()]))
+
+    def visitIncludeTag(self, node):
+        self.write_source_comment(node)
+        args = node.attributes.get('args')
+        if args:
+            self.printer.writeline(
+                      "runtime._include_file(context, %s, _template_uri, %s)" %
+                      (node.parsed_attributes['file'], args))
+        else:
+            self.printer.writeline(
+                        "runtime._include_file(context, %s, _template_uri)" %
+                        (node.parsed_attributes['file']))
+
+    def visitNamespaceTag(self, node):
+        pass
+
+    def visitDefTag(self, node):
+        pass
+
+    def visitBlockTag(self, node):
+        if node.is_anonymous:
+            self.printer.writeline("%s()" % node.funcname)
+        else:
+            nameargs = node.get_argument_expressions(include_defaults=False)
+            nameargs += ['**pageargs']
+            self.printer.writeline("if 'parent' not in context._data or "
+                                  "not hasattr(context._data['parent'], '%s'):"
+                                  % node.funcname)
+            self.printer.writeline(
+                "context['self'].%s(%s)" % (node.funcname, ",".join(nameargs)))
+            self.printer.writeline("\n")
+
+    def visitCallNamespaceTag(self, node):
+        # TODO: we can put namespace-specific checks here, such
+        # as ensure the given namespace will be imported,
+        # pre-import the namespace, etc.
+        self.visitCallTag(node)
+
+    def visitCallTag(self, node):
+        self.printer.writeline("def ccall(caller):")
+        export = ['body']
+        callable_identifiers = self.identifiers.branch(node, nested=True)
+        body_identifiers = callable_identifiers.branch(node, nested=False)
+        # we want the 'caller' passed to ccall to be used
+        # for the body() function, but for other non-body()
+        # <%def>s within <%call> we want the current caller
+        # off the call stack (if any)
+        body_identifiers.add_declared('caller')
+
+        self.identifier_stack.append(body_identifiers)
+        class DefVisitor(object):
+            def visitDefTag(s, node):
+                s.visitDefOrBase(node)
+
+            def visitBlockTag(s, node):
+                s.visitDefOrBase(node)
+
+            def visitDefOrBase(s, node):
+                self.write_inline_def(node, callable_identifiers, nested=False)
+                if not node.is_anonymous:
+                    export.append(node.funcname)
+                # remove defs that are within the <%call> from the
+                # "closuredefs" defined in the body, so they dont render twice
+                if node.funcname in body_identifiers.closuredefs:
+                    del body_identifiers.closuredefs[node.funcname]
+
+        vis = DefVisitor()
+        for n in node.nodes:
+            n.accept_visitor(vis)
+        self.identifier_stack.pop()
+
+        bodyargs = node.body_decl.get_argument_expressions()
+        self.printer.writeline("def body(%s):" % ','.join(bodyargs))
+
+        # TODO: figure out best way to specify
+        # buffering/nonbuffering (at call time would be better)
+        buffered = False
+        if buffered:
+            self.printer.writelines(
+                "context._push_buffer()",
+                "try:"
+            )
+        self.write_variable_declares(body_identifiers)
+        self.identifier_stack.append(body_identifiers)
+
+        for n in node.nodes:
+            n.accept_visitor(self)
+        self.identifier_stack.pop()
+
+        self.write_def_finish(node, buffered, False, False, callstack=False)
+        self.printer.writelines(
+            None,
+            "return [%s]" % (','.join(export)),
+            None
+        )
+
+        self.printer.writelines(
+            # push on caller for nested call
+            "context.caller_stack.nextcaller = "
+                "runtime.Namespace('caller', context, "
+                                  "callables=ccall(__M_caller))",
+            "try:")
+        self.write_source_comment(node)
+        self.printer.writelines(
+                "__M_writer(%s)" % self.create_filter_callable(
+                                                    [], node.expression, True),
+            "finally:",
+                "context.caller_stack.nextcaller = None",
+            None
+        )
+
+class _Identifiers(object):
+    """tracks the status of identifier names as template code is rendered."""
+
+    def __init__(self, compiler, node=None, parent=None, nested=False):
+        if parent is not None:
+            # if we are the branch created in write_namespaces(),
+            # we don't share any context from the main body().
+            if isinstance(node, parsetree.NamespaceTag):
+                self.declared = set()
+                self.topleveldefs = util.SetLikeDict()
+            else:
+                # things that have already been declared
+                # in an enclosing namespace (i.e. names we can just use)
+                self.declared = set(parent.declared).\
+                         union([c.name for c in parent.closuredefs.values()]).\
+                         union(parent.locally_declared).\
+                         union(parent.argument_declared)
+
+                # if these identifiers correspond to a "nested"
+                # scope, it means whatever the parent identifiers
+                # had as undeclared will have been declared by that parent,
+                # and therefore we have them in our scope.
+                if nested:
+                    self.declared = self.declared.union(parent.undeclared)
+
+                # top level defs that are available
+                self.topleveldefs = util.SetLikeDict(**parent.topleveldefs)
+        else:
+            self.declared = set()
+            self.topleveldefs = util.SetLikeDict()
+
+        self.compiler = compiler
+
+        # things within this level that are referenced before they
+        # are declared (e.g. assigned to)
+        self.undeclared = set()
+
+        # things that are declared locally.  some of these things
+        # could be in the "undeclared" list as well if they are
+        # referenced before declared
+        self.locally_declared = set()
+
+        # assignments made in explicit python blocks.
+        # these will be propagated to
+        # the context of local def calls.
+        self.locally_assigned = set()
+
+        # things that are declared in the argument
+        # signature of the def callable
+        self.argument_declared = set()
+
+        # closure defs that are defined in this level
+        self.closuredefs = util.SetLikeDict()
+
+        self.node = node
+
+        if node is not None:
+            node.accept_visitor(self)
+
+        illegal_names = self.compiler.reserved_names.intersection(
+                                                         self.locally_declared)
+        if illegal_names:
+            raise exceptions.NameConflictError(
+                "Reserved words declared in template: %s" %
+                ", ".join(illegal_names))
+
+
+    def branch(self, node, **kwargs):
+        """create a new Identifiers for a new Node, with
+          this Identifiers as the parent."""
+
+        return _Identifiers(self.compiler, node, self, **kwargs)
+
+    @property
+    def defs(self):
+        return set(self.topleveldefs.union(self.closuredefs).values())
+
+    def __repr__(self):
+        return "Identifiers(declared=%r, locally_declared=%r, "\
+                "undeclared=%r, topleveldefs=%r, closuredefs=%r, "\
+                "argumentdeclared=%r)" %\
+                (
+                    list(self.declared),
+                    list(self.locally_declared),
+                    list(self.undeclared),
+                    [c.name for c in self.topleveldefs.values()],
+                    [c.name for c in self.closuredefs.values()],
+                    self.argument_declared)
+
+    def check_declared(self, node):
+        """update the state of this Identifiers with the undeclared
+            and declared identifiers of the given node."""
+
+        for ident in node.undeclared_identifiers():
+            if ident != 'context' and\
+                       ident not in self.declared.union(self.locally_declared):
+                self.undeclared.add(ident)
+        for ident in node.declared_identifiers():
+            self.locally_declared.add(ident)
+
+    def add_declared(self, ident):
+        self.declared.add(ident)
+        if ident in self.undeclared:
+            self.undeclared.remove(ident)
+
+    def visitExpression(self, node):
+        self.check_declared(node)
+
+    def visitControlLine(self, node):
+        self.check_declared(node)
+
+    def visitCode(self, node):
+        if not node.ismodule:
+            self.check_declared(node)
+            self.locally_assigned = self.locally_assigned.union(
+                                                   node.declared_identifiers())
+
+    def visitNamespaceTag(self, node):
+        # only traverse into the sub-elements of a
+        # <%namespace> tag if we are the branch created in
+        # write_namespaces()
+        if self.node is node:
+            for n in node.nodes:
+                n.accept_visitor(self)
+
+    def _check_name_exists(self, collection, node):
+        existing = collection.get(node.funcname)
+        collection[node.funcname] = node
+        if existing is not None and \
+            existing is not node and \
+            (node.is_block or existing.is_block):
+            raise exceptions.CompileException(
+                    "%%def or %%block named '%s' already "
+                    "exists in this template." %
+                    node.funcname, **node.exception_kwargs)
+
+    def visitDefTag(self, node):
+        if node.is_root() and not node.is_anonymous:
+            self._check_name_exists(self.topleveldefs, node)
+        elif node is not self.node:
+            self._check_name_exists(self.closuredefs, node)
+
+        for ident in node.undeclared_identifiers():
+            if ident != 'context' and\
+                       ident not in self.declared.union(self.locally_declared):
+                self.undeclared.add(ident)
+
+        # visit defs only one level deep
+        if node is self.node:
+            for ident in node.declared_identifiers():
+                self.argument_declared.add(ident)
+
+            for n in node.nodes:
+                n.accept_visitor(self)
+
+    def visitBlockTag(self, node):
+        if node is not self.node and \
+            not node.is_anonymous:
+
+            if isinstance(self.node, parsetree.DefTag):
+                raise exceptions.CompileException(
+                        "Named block '%s' not allowed inside of def '%s'"
+                        % (node.name, self.node.name), **node.exception_kwargs)
+            elif isinstance(self.node,
+                            (parsetree.CallTag, parsetree.CallNamespaceTag)):
+                raise exceptions.CompileException(
+                        "Named block '%s' not allowed inside of <%%call> tag"
+                        % (node.name, ), **node.exception_kwargs)
+
+        for ident in node.undeclared_identifiers():
+            if ident != 'context' and \
+                       ident not in self.declared.union(self.locally_declared):
+                self.undeclared.add(ident)
+
+        if not node.is_anonymous:
+            self._check_name_exists(self.topleveldefs, node)
+            self.undeclared.add(node.funcname)
+        elif node is not self.node:
+            self._check_name_exists(self.closuredefs, node)
+        for ident in node.declared_identifiers():
+            self.argument_declared.add(ident)
+        for n in node.nodes:
+            n.accept_visitor(self)
+
+    def visitTextTag(self, node):
+        for ident in node.undeclared_identifiers():
+            if ident != 'context' and \
+                ident not in self.declared.union(self.locally_declared):
+                self.undeclared.add(ident)
+
+    def visitIncludeTag(self, node):
+        self.check_declared(node)
+
+    def visitPageTag(self, node):
+        for ident in node.declared_identifiers():
+            self.argument_declared.add(ident)
+        self.check_declared(node)
+
+    def visitCallNamespaceTag(self, node):
+        self.visitCallTag(node)
+
+    def visitCallTag(self, node):
+        if node is self.node:
+            for ident in node.undeclared_identifiers():
+                if ident != 'context' and\
+                       ident not in self.declared.union(self.locally_declared):
+                    self.undeclared.add(ident)
+            for ident in node.declared_identifiers():
+                self.argument_declared.add(ident)
+            for n in node.nodes:
+                n.accept_visitor(self)
+        else:
+            for ident in node.undeclared_identifiers():
+                if ident != 'context' and\
+                       ident not in self.declared.union(self.locally_declared):
+                    self.undeclared.add(ident)
+
+
+_FOR_LOOP = re.compile(
+        r'^for\s+((?:\(?)\s*[A-Za-z_][A-Za-z_0-9]*'
+        r'(?:\s*,\s*(?:[A-Za-z_][A-Za-z0-9_]*),??)*\s*(?:\)?))\s+in\s+(.*):'
+    )
+
+def mangle_mako_loop(node, printer):
+    """converts a for loop into a context manager wrapped around a for loop
+    when access to the `loop` variable has been detected in the for loop body
+    """
+    loop_variable = LoopVariable()
+    node.accept_visitor(loop_variable)
+    if loop_variable.detected:
+        node.nodes[-1].has_loop_context = True
+        match = _FOR_LOOP.match(node.text)
+        if match:
+            printer.writelines(
+                    'loop = __M_loop._enter(%s)' % match.group(2),
+                    'try:'
+                    #'with __M_loop(%s) as loop:' % match.group(2)
+                )
+            text = 'for %s in loop:' % match.group(1)
+        else:
+            raise SyntaxError("Couldn't apply loop context: %s" % node.text)
+    else:
+        text = node.text
+    return text
+
+
+class LoopVariable(object):
+    """A node visitor which looks for the name 'loop' within undeclared
+    identifiers."""
+
+    def __init__(self):
+        self.detected = False
+
+    def _loop_reference_detected(self, node):
+        if 'loop' in node.undeclared_identifiers():
+            self.detected = True
+        else:
+            for n in node.get_children():
+                n.accept_visitor(self)
+
+    def visitControlLine(self, node):
+        self._loop_reference_detected(node)
+
+    def visitCode(self, node):
+        self._loop_reference_detected(node)
+
+    def visitExpression(self, node):
+        self._loop_reference_detected(node)
diff --git a/lib/Mako-0.7.3/mako/exceptions.py b/lib/Mako-0.7.3/mako/exceptions.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/exceptions.py
@@ -0,0 +1,362 @@
+# mako/exceptions.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""exception classes"""
+
+import traceback, sys, re
+from mako import util
+
+class MakoException(Exception):
+    pass
+
+class RuntimeException(MakoException):
+    pass
+
+def _format_filepos(lineno, pos, filename):
+    if filename is None:
+        return " at line: %d char: %d" % (lineno, pos)
+    else:
+        return " in file '%s' at line: %d char: %d" % (filename, lineno, pos)
+
+
+class CompileException(MakoException):
+    def __init__(self, message, source, lineno, pos, filename):
+        MakoException.__init__(self,
+                              message + _format_filepos(lineno, pos, filename))
+        self.lineno =lineno
+        self.pos = pos
+        self.filename = filename
+        self.source = source
+
+class SyntaxException(MakoException):
+    def __init__(self, message, source, lineno, pos, filename):
+        MakoException.__init__(self,
+                              message + _format_filepos(lineno, pos, filename))
+        self.lineno =lineno
+        self.pos = pos
+        self.filename = filename
+        self.source = source
+
+class UnsupportedError(MakoException):
+    """raised when a retired feature is used."""
+
+class NameConflictError(MakoException):
+    """raised when a reserved word is used inappropriately"""
+
+class TemplateLookupException(MakoException):
+    pass
+
+class TopLevelLookupException(TemplateLookupException):
+    pass
+
+class RichTraceback(object):
+    """Pull the current exception from the ``sys`` traceback and extracts
+    Mako-specific template information.
+
+    See the usage examples in :ref:`handling_exceptions`.
+
+    """
+    def __init__(self, error=None, traceback=None):
+        self.source, self.lineno = "", 0
+
+        if error is None or traceback is None:
+            t, value, tback = sys.exc_info()
+
+        if error is None:
+            error = value or t
+
+        if traceback is None:
+            traceback = tback
+
+        self.error = error
+        self.records = self._init(traceback)
+
+        if isinstance(self.error, (CompileException, SyntaxException)):
+            import mako.template
+            self.source = self.error.source
+            self.lineno = self.error.lineno
+            self._has_source = True
+
+        self._init_message()
+
+    @property
+    def errorname(self):
+        return util.exception_name(self.error)
+
+    def _init_message(self):
+        """Find a unicode representation of self.error"""
+        try:
+            self.message = unicode(self.error)
+        except UnicodeError:
+            try:
+                self.message = str(self.error)
+            except UnicodeEncodeError:
+                # Fallback to args as neither unicode nor
+                # str(Exception(u'\xe6')) work in Python < 2.6
+                self.message = self.error.args[0]
+        if not isinstance(self.message, unicode):
+            self.message = unicode(self.message, 'ascii', 'replace')
+
+    def _get_reformatted_records(self, records):
+        for rec in records:
+            if rec[6] is not None:
+                yield (rec[4], rec[5], rec[2], rec[6])
+            else:
+                yield tuple(rec[0:4])
+
+    @property
+    def traceback(self):
+        """Return a list of 4-tuple traceback records (i.e. normal python
+        format) with template-corresponding lines remapped to the originating
+        template.
+
+        """
+        return list(self._get_reformatted_records(self.records))
+
+    @property
+    def reverse_records(self):
+        return reversed(self.records)
+
+    @property
+    def reverse_traceback(self):
+        """Return the same data as traceback, except in reverse order.
+        """
+
+        return list(self._get_reformatted_records(self.reverse_records))
+
+    def _init(self, trcback):
+        """format a traceback from sys.exc_info() into 7-item tuples,
+        containing the regular four traceback tuple items, plus the original
+        template filename, the line number adjusted relative to the template
+        source, and code line from that line number of the template."""
+
+        import mako.template
+        mods = {}
+        rawrecords = traceback.extract_tb(trcback)
+        new_trcback = []
+        for filename, lineno, function, line in rawrecords:
+            if not line:
+                line = ''
+            try:
+                (line_map, template_lines) = mods[filename]
+            except KeyError:
+                try:
+                    info = mako.template._get_module_info(filename)
+                    module_source = info.code
+                    template_source = info.source
+                    template_filename = info.template_filename or filename
+                except KeyError:
+                    # A normal .py file (not a Template)
+                    if not util.py3k:
+                        try:
+                            fp = open(filename, 'rb')
+                            encoding = util.parse_encoding(fp)
+                            fp.close()
+                        except IOError:
+                            encoding = None
+                        if encoding:
+                            line = line.decode(encoding)
+                        else:
+                            line = line.decode('ascii', 'replace')
+                    new_trcback.append((filename, lineno, function, line,
+                                            None, None, None, None))
+                    continue
+
+                template_ln = module_ln = 1
+                line_map = {}
+                for line in module_source.split("\n"):
+                    match = re.match(r'\s*# SOURCE LINE (\d+)', line)
+                    if match:
+                        template_ln = int(match.group(1))
+                    module_ln += 1
+                    line_map[module_ln] = template_ln
+                template_lines = [line for line in
+                                    template_source.split("\n")]
+                mods[filename] = (line_map, template_lines)
+
+            template_ln = line_map[lineno]
+            if template_ln <= len(template_lines):
+                template_line = template_lines[template_ln - 1]
+            else:
+                template_line = None
+            new_trcback.append((filename, lineno, function,
+                                line, template_filename, template_ln,
+                                template_line, template_source))
+        if not self.source:
+            for l in range(len(new_trcback)-1, 0, -1):
+                if new_trcback[l][5]:
+                    self.source = new_trcback[l][7]
+                    self.lineno = new_trcback[l][5]
+                    break
+            else:
+                if new_trcback:
+                    try:
+                        # A normal .py file (not a Template)
+                        fp = open(new_trcback[-1][0], 'rb')
+                        encoding = util.parse_encoding(fp)
+                        fp.seek(0)
+                        self.source = fp.read()
+                        fp.close()
+                        if encoding:
+                            self.source = self.source.decode(encoding)
+                    except IOError:
+                        self.source = ''
+                    self.lineno = new_trcback[-1][1]
+        return new_trcback
+
+
+def text_error_template(lookup=None):
+    """Provides a template that renders a stack trace in a similar format to
+    the Python interpreter, substituting source template filenames, line
+    numbers and code for that of the originating source template, as
+    applicable.
+
+    """
+    import mako.template
+    return mako.template.Template(r"""
+<%page args="error=None, traceback=None"/>
+<%!
+    from mako.exceptions import RichTraceback
+%>\
+<%
+    tback = RichTraceback(error=error, traceback=traceback)
+%>\
+Traceback (most recent call last):
+% for (filename, lineno, function, line) in tback.traceback:
+  File "${filename}", line ${lineno}, in ${function or '?'}
+    ${line | trim}
+% endfor
+${tback.errorname}: ${tback.message}
+""")
+
+
+try:
+    from mako.ext.pygmentplugin import syntax_highlight,\
+            pygments_html_formatter
+except ImportError:
+    from mako.filters import html_escape
+    pygments_html_formatter = None
+    def syntax_highlight(filename='', language=None):
+        return html_escape
+
+def html_error_template():
+    """Provides a template that renders a stack trace in an HTML format,
+    providing an excerpt of code as well as substituting source template
+    filenames, line numbers and code for that of the originating source
+    template, as applicable.
+
+    The template's default ``encoding_errors`` value is ``'htmlentityreplace'``. The
+    template has two options. With the ``full`` option disabled, only a section of
+    an HTML document is returned. With the ``css`` option disabled, the default
+    stylesheet won't be included.
+
+    """
+    import mako.template
+    return mako.template.Template(r"""
+<%!
+    from mako.exceptions import RichTraceback, syntax_highlight,\
+            pygments_html_formatter
+%>
+<%page args="full=True, css=True, error=None, traceback=None"/>
+% if full:
+<html>
+<head>
+    <title>Mako Runtime Error</title>
+% endif
+% if css:
+    <style>
+        body { font-family:verdana; margin:10px 30px 10px 30px;}
+        .stacktrace { margin:5px 5px 5px 5px; }
+        .highlight { padding:0px 10px 0px 10px; background-color:#9F9FDF; }
+        .nonhighlight { padding:0px; background-color:#DFDFDF; }
+        .sample { padding:10px; margin:10px 10px 10px 10px;
+                  font-family:monospace; }
+        .sampleline { padding:0px 10px 0px 10px; }
+        .sourceline { margin:5px 5px 10px 5px; font-family:monospace;}
+        .location { font-size:80%; }
+        .highlight { white-space:pre; }
+        .sampleline { white-space:pre; }
+
+    % if pygments_html_formatter:
+        ${pygments_html_formatter.get_style_defs()}
+        .linenos { min-width: 2.5em; text-align: right; }
+        pre { margin: 0; }
+        .syntax-highlighted { padding: 0 10px; }
+        .syntax-highlightedtable { border-spacing: 1px; }
+        .nonhighlight { border-top: 1px solid #DFDFDF;
+                        border-bottom: 1px solid #DFDFDF; }
+        .stacktrace .nonhighlight { margin: 5px 15px 10px; }
+        .sourceline { margin: 0 0; font-family:monospace; }
+        .code { background-color: #F8F8F8; width: 100%; }
+        .error .code { background-color: #FFBDBD; }
+        .error .syntax-highlighted { background-color: #FFBDBD; }
+    % endif
+
+    </style>
+% endif
+% if full:
+</head>
+<body>
+% endif
+
+<h2>Error !</h2>
+<%
+    tback = RichTraceback(error=error, traceback=traceback)
+    src = tback.source
+    line = tback.lineno
+    if src:
+        lines = src.split('\n')
+    else:
+        lines = None
+%>
+<h3>${tback.errorname}: ${tback.message|h}</h3>
+
+% if lines:
+    <div class="sample">
+    <div class="nonhighlight">
+% for index in range(max(0, line-4),min(len(lines), line+5)):
+    <%
+       if pygments_html_formatter:
+           pygments_html_formatter.linenostart = index + 1
+    %>
+    % if index + 1 == line:
+    <%
+       if pygments_html_formatter:
+           old_cssclass = pygments_html_formatter.cssclass
+           pygments_html_formatter.cssclass = 'error ' + old_cssclass
+    %>
+        ${lines[index] | syntax_highlight(language='mako')}
+    <%
+       if pygments_html_formatter:
+           pygments_html_formatter.cssclass = old_cssclass
+    %>
+    % else:
+        ${lines[index] | syntax_highlight(language='mako')}
+    % endif
+% endfor
+    </div>
+    </div>
+% endif
+
+<div class="stacktrace">
+% for (filename, lineno, function, line) in tback.reverse_traceback:
+    <div class="location">${filename}, line ${lineno}:</div>
+    <div class="nonhighlight">
+    <%
+       if pygments_html_formatter:
+           pygments_html_formatter.linenostart = lineno
+    %>
+      <div class="sourceline">${line | syntax_highlight(filename)}</div>
+    </div>
+% endfor
+</div>
+
+% if full:
+</body>
+</html>
+% endif
+""", output_encoding=sys.getdefaultencoding(),
+        encoding_errors='htmlentityreplace')
diff --git a/lib/Mako-0.7.3/mako/ext/__init__.py b/lib/Mako-0.7.3/mako/ext/__init__.py
new file mode 100644
diff --git a/lib/Mako-0.7.3/mako/ext/autohandler.py b/lib/Mako-0.7.3/mako/ext/autohandler.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/ext/autohandler.py
@@ -0,0 +1,65 @@
+# ext/autohandler.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""adds autohandler functionality to Mako templates.
+
+requires that the TemplateLookup class is used with templates.
+
+usage:
+
+<%!
+    from mako.ext.autohandler import autohandler
+%>
+<%inherit file="${autohandler(template, context)}"/>
+
+
+or with custom autohandler filename:
+
+<%!
+    from mako.ext.autohandler import autohandler
+%>
+<%inherit file="${autohandler(template, context, name='somefilename')}"/>
+
+"""
+
+import posixpath, os, re
+
+def autohandler(template, context, name='autohandler'):
+    lookup = context.lookup
+    _template_uri = template.module._template_uri
+    if not lookup.filesystem_checks:
+        try:
+            return lookup._uri_cache[(autohandler, _template_uri, name)]
+        except KeyError:
+            pass
+
+    tokens = re.findall(r'([^/]+)', posixpath.dirname(_template_uri)) + [name]
+    while len(tokens):
+        path = '/' + '/'.join(tokens)
+        if path != _template_uri and _file_exists(lookup, path):
+            if not lookup.filesystem_checks:
+                return lookup._uri_cache.setdefault(
+                            (autohandler, _template_uri, name), path)
+            else:
+                return path
+        if len(tokens) == 1:
+            break
+        tokens[-2:] = [name]
+ 
+    if not lookup.filesystem_checks:
+        return lookup._uri_cache.setdefault(
+                            (autohandler, _template_uri, name), None)
+    else:
+        return None
+
+def _file_exists(lookup, path):
+    psub = re.sub(r'^/', '',path)
+    for d in lookup.directories:
+        if os.path.exists(d + '/' + psub):
+            return True
+    else:
+        return False
+ 
diff --git a/lib/Mako-0.7.3/mako/ext/babelplugin.py b/lib/Mako-0.7.3/mako/ext/babelplugin.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/ext/babelplugin.py
@@ -0,0 +1,132 @@
+# ext/babelplugin.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""gettext message extraction via Babel: http://babel.edgewall.org/"""
+from StringIO import StringIO
+
+from babel.messages.extract import extract_python
+
+from mako import lexer, parsetree, util
+
+def extract(fileobj, keywords, comment_tags, options):
+    """Extract messages from Mako templates.
+
+    :param fileobj: the file-like object the messages should be extracted from
+    :param keywords: a list of keywords (i.e. function names) that should be
+                     recognized as translation functions
+    :param comment_tags: a list of translator tags to search for and include
+                         in the results
+    :param options: a dictionary of additional options (optional)
+    :return: an iterator over ``(lineno, funcname, message, comments)`` tuples
+    :rtype: ``iterator``
+    """
+    encoding = options.get('input_encoding', options.get('encoding', None))
+
+    template_node = lexer.Lexer(fileobj.read(),
+                                input_encoding=encoding).parse()
+    for extracted in extract_nodes(template_node.get_children(),
+                                   keywords, comment_tags, options):
+        yield extracted
+
+def extract_nodes(nodes, keywords, comment_tags, options):
+    """Extract messages from Mako's lexer node objects
+
+    :param nodes: an iterable of Mako parsetree.Node objects to extract from
+    :param keywords: a list of keywords (i.e. function names) that should be
+                     recognized as translation functions
+    :param comment_tags: a list of translator tags to search for and include
+                         in the results
+    :param options: a dictionary of additional options (optional)
+    :return: an iterator over ``(lineno, funcname, message, comments)`` tuples
+    :rtype: ``iterator``
+    """
+    translator_comments = []
+    in_translator_comments = False
+
+    for node in nodes:
+        child_nodes = None
+        if in_translator_comments and isinstance(node, parsetree.Text) and \
+                not node.content.strip():
+            # Ignore whitespace within translator comments
+            continue
+
+        if isinstance(node, parsetree.Comment):
+            value = node.text.strip()
+            if in_translator_comments:
+                translator_comments.extend(_split_comment(node.lineno, value))
+                continue
+            for comment_tag in comment_tags:
+                if value.startswith(comment_tag):
+                    in_translator_comments = True
+                    translator_comments.extend(_split_comment(node.lineno,
+                                                              value))
+            continue
+
+        if isinstance(node, parsetree.DefTag):
+            code = node.function_decl.code
+            child_nodes = node.nodes
+        elif isinstance(node, parsetree.BlockTag):
+            code = node.body_decl.code
+            child_nodes = node.nodes
+        elif isinstance(node, parsetree.CallTag):
+            code = node.code.code
+            child_nodes = node.nodes
+        elif isinstance(node, parsetree.PageTag):
+            code = node.body_decl.code
+        elif isinstance(node, parsetree.CallNamespaceTag):
+            attribs = ', '.join(['%s=%s' % (key, val)
+                                 for key, val in node.attributes.iteritems()])
+            code = '{%s}' % attribs
+            child_nodes = node.nodes
+        elif isinstance(node, parsetree.ControlLine):
+            if node.isend:
+                translator_comments = []
+                in_translator_comments = False
+                continue
+            code = node.text
+        elif isinstance(node, parsetree.Code):
+            # <% and <%! blocks would provide their own translator comments
+            translator_comments = []
+            in_translator_comments = False
+
+            code = node.code.code
+        elif isinstance(node, parsetree.Expression):
+            code = node.code.code
+        else:
+            translator_comments = []
+            in_translator_comments = False
+            continue
+
+        # Comments don't apply unless they immediately preceed the message
+        if translator_comments and \
+                translator_comments[-1][0] < node.lineno - 1:
+            translator_comments = []
+        else:
+            translator_comments = \
+                [comment[1] for comment in translator_comments]
+
+        if not util.py3k and isinstance(code, unicode):
+            code = code.encode('ascii', 'backslashreplace')
+        code = StringIO(code)
+        for lineno, funcname, messages, python_translator_comments \
+                in extract_python(code, keywords, comment_tags, options):
+            yield (node.lineno + (lineno - 1), funcname, messages,
+                   translator_comments + python_translator_comments)
+
+        translator_comments = []
+        in_translator_comments = False
+
+        if child_nodes:
+            for extracted in extract_nodes(child_nodes, keywords, comment_tags,
+                                           options):
+                yield extracted
+
+
+def _split_comment(lineno, comment):
+    """Return the multiline comment at lineno split into a list of comment line
+    numbers and the accompanying comment line"""
+    return [(lineno + index, line) for index, line in
+            enumerate(comment.splitlines())]
diff --git a/lib/Mako-0.7.3/mako/ext/beaker_cache.py b/lib/Mako-0.7.3/mako/ext/beaker_cache.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/ext/beaker_cache.py
@@ -0,0 +1,70 @@
+"""Provide a :class:`.CacheImpl` for the Beaker caching system."""
+
+from mako import exceptions
+
+from mako.cache import CacheImpl
+
+_beaker_cache = None
+class BeakerCacheImpl(CacheImpl):
+    """A :class:`.CacheImpl` provided for the Beaker caching system.
+    
+    This plugin is used by default, based on the default
+    value of ``'beaker'`` for the ``cache_impl`` parameter of the
+    :class:`.Template` or :class:`.TemplateLookup` classes.
+    
+    """
+
+    def __init__(self, cache):
+        global _beaker_cache
+        if _beaker_cache is None:
+            try:
+                from beaker import cache as beaker_cache
+            except ImportError, e:
+                raise exceptions.RuntimeException(
+                            "the Beaker package is required to use cache "
+                            "functionality.")
+
+            if 'manager' in cache.template.cache_args:
+                _beaker_cache = cache.template.cache_args['manager']
+            else:
+                _beaker_cache = beaker_cache.CacheManager()
+        super(BeakerCacheImpl, self).__init__(cache)
+
+    def _get_cache(self, **kw):
+        expiretime = kw.pop('timeout', None)
+        if 'dir' in kw:
+            kw['data_dir'] = kw.pop('dir')
+        elif self.cache.template.module_directory:
+            kw['data_dir'] = self.cache.template.module_directory
+
+        if 'manager' in kw:
+            kw.pop('manager')
+
+        if kw.get('type') == 'memcached':
+            kw['type'] = 'ext:memcached'
+
+        if 'region' in kw:
+            region = kw.pop('region')
+            cache = _beaker_cache.get_cache_region(self.cache.id, region, **kw)
+        else:
+            cache = _beaker_cache.get_cache(self.cache.id, **kw)
+        cache_args = {'starttime':self.cache.starttime}
+        if expiretime:
+            cache_args['expiretime'] = expiretime
+        return cache, cache_args
+
+    def get_or_create(self, key, creation_function, **kw):
+        cache, kw = self._get_cache(**kw)
+        return cache.get(key, createfunc=creation_function, **kw)
+
+    def put(self, key, value, **kw):
+        cache, kw = self._get_cache(**kw)
+        cache.put(key, value, **kw)
+ 
+    def get(self, key, **kw):
+        cache, kw = self._get_cache(**kw)
+        return cache.get(key, **kw)
+ 
+    def invalidate(self, key, **kw):
+        cache, kw = self._get_cache(**kw)
+        cache.remove_value(key, **kw)
diff --git a/lib/Mako-0.7.3/mako/ext/preprocessors.py b/lib/Mako-0.7.3/mako/ext/preprocessors.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/ext/preprocessors.py
@@ -0,0 +1,20 @@
+# ext/preprocessors.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""preprocessing functions, used with the 'preprocessor' 
+argument on Template, TemplateLookup"""
+
+import re
+
+def convert_comments(text):
+    """preprocess old style comments.
+ 
+    example:
+ 
+    from mako.ext.preprocessors import convert_comments
+    t = Template(..., preprocessor=preprocess_comments)"""
+    return re.sub(r'(?<=\n)\s*#[^#]', "##", text)
+
diff --git a/lib/Mako-0.7.3/mako/ext/pygmentplugin.py b/lib/Mako-0.7.3/mako/ext/pygmentplugin.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/ext/pygmentplugin.py
@@ -0,0 +1,122 @@
+# ext/pygmentplugin.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+from pygments.lexers.web import \
+     HtmlLexer, XmlLexer, JavascriptLexer, CssLexer
+from pygments.lexers.agile import PythonLexer, Python3Lexer
+from pygments.lexer import DelegatingLexer, RegexLexer, bygroups, \
+     include, using
+from pygments.token import \
+     Text, Comment, Operator, Keyword, Name, String, Other
+from pygments.formatters.html import HtmlFormatter
+from pygments import highlight
+from mako import util
+
+class MakoLexer(RegexLexer):
+    name = 'Mako'
+    aliases = ['mako']
+    filenames = ['*.mao']
+
+    tokens = {
+        'root': [
+            (r'(\s*)(\%)(\s*end(?:\w+))(\n|\Z)',
+             bygroups(Text, Comment.Preproc, Keyword, Other)),
+            (r'(\s*)(\%(?!%))([^\n]*)(\n|\Z)',
+             bygroups(Text, Comment.Preproc, using(PythonLexer), Other)),
+            (r'(\s*)(##[^\n]*)(\n|\Z)',
+              bygroups(Text, Comment.Preproc, Other)),
+            (r'''(?s)<%doc>.*?</%doc>''', Comment.Preproc),
+            (r'(<%)([\w\.\:]+)',
+              bygroups(Comment.Preproc, Name.Builtin), 'tag'),
+            (r'(</%)([\w\.\:]+)(>)',
+              bygroups(Comment.Preproc, Name.Builtin, Comment.Preproc)),
+            (r'<%(?=([\w\.\:]+))', Comment.Preproc, 'ondeftags'),
+            (r'(<%(?:!?))(.*?)(%>)(?s)',
+              bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc)),
+            (r'(\$\{)(.*?)(\})',
+             bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc)),
+            (r'''(?sx)
+                (.+?)               # anything, followed by:
+                (?:
+                 (?<=\n)(?=%(?!%)|\#\#) |  # an eval or comment line
+                 (?=\#\*) |          # multiline comment
+                 (?=</?%) |         # a python block
+                                    # call start or end
+                 (?=\$\{) |         # a substitution
+                 (?<=\n)(?=\s*%) |
+                                    # - don't consume
+                 (\\\n) |           # an escaped newline
+                 \Z                 # end of string
+                )
+            ''', bygroups(Other, Operator)),
+            (r'\s+', Text),
+        ],
+        'ondeftags': [
+            (r'<%', Comment.Preproc),
+            (r'(?<=<%)(include|inherit|namespace|page)', Name.Builtin),
+            include('tag'),
+        ],
+        'tag': [
+            (r'((?:\w+)\s*=)\s*(".*?")',
+             bygroups(Name.Attribute, String)),
+            (r'/?\s*>', Comment.Preproc, '#pop'),
+            (r'\s+', Text),
+        ],
+        'attr': [
+            ('".*?"', String, '#pop'),
+            ("'.*?'", String, '#pop'),
+            (r'[^\s>]+', String, '#pop'),
+        ],
+    }
+
+
+class MakoHtmlLexer(DelegatingLexer):
+    name = 'HTML+Mako'
+    aliases = ['html+mako']
+
+    def __init__(self, **options):
+        super(MakoHtmlLexer, self).__init__(HtmlLexer, MakoLexer,
+                                              **options)
+
+class MakoXmlLexer(DelegatingLexer):
+    name = 'XML+Mako'
+    aliases = ['xml+mako']
+
+    def __init__(self, **options):
+        super(MakoXmlLexer, self).__init__(XmlLexer, MakoLexer,
+                                             **options)
+
+class MakoJavascriptLexer(DelegatingLexer):
+    name = 'JavaScript+Mako'
+    aliases = ['js+mako', 'javascript+mako']
+
+    def __init__(self, **options):
+        super(MakoJavascriptLexer, self).__init__(JavascriptLexer,
+                                                    MakoLexer, **options)
+
+class MakoCssLexer(DelegatingLexer):
+    name = 'CSS+Mako'
+    aliases = ['css+mako']
+
+    def __init__(self, **options):
+        super(MakoCssLexer, self).__init__(CssLexer, MakoLexer,
+                                             **options)
+
+
+pygments_html_formatter = HtmlFormatter(cssclass='syntax-highlighted',
+                                        linenos=True)
+def syntax_highlight(filename='', language=None):
+    mako_lexer = MakoLexer()
+    if util.py3k:
+        python_lexer = Python3Lexer()
+    else:
+        python_lexer = PythonLexer()
+    if filename.startswith('memory:') or language == 'mako':
+        return lambda string: highlight(string, mako_lexer,
+                                        pygments_html_formatter)
+    return lambda string: highlight(string, python_lexer,
+                                    pygments_html_formatter)
+
diff --git a/lib/Mako-0.7.3/mako/ext/turbogears.py b/lib/Mako-0.7.3/mako/ext/turbogears.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/ext/turbogears.py
@@ -0,0 +1,57 @@
+# ext/turbogears.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+import re, inspect
+from mako.lookup import TemplateLookup
+from mako.template import Template
+
+class TGPlugin(object):
+    """TurboGears compatible Template Plugin."""
+
+    def __init__(self, extra_vars_func=None, options=None, extension='mak'):
+        self.extra_vars_func = extra_vars_func
+        self.extension = extension
+        if not options:
+            options = {}
+
+        # Pull the options out and initialize the lookup
+        lookup_options = {}
+        for k, v in options.iteritems():
+            if k.startswith('mako.'):
+                lookup_options[k[5:]] = v
+            elif k in ['directories', 'filesystem_checks', 'module_directory']:
+                lookup_options[k] = v
+        self.lookup = TemplateLookup(**lookup_options)
+ 
+        self.tmpl_options = {}
+        # transfer lookup args to template args, based on those available
+        # in getargspec
+        for kw in inspect.getargspec(Template.__init__)[0]:
+            if kw in lookup_options:
+                self.tmpl_options[kw] = lookup_options[kw]
+
+    def load_template(self, templatename, template_string=None):
+        """Loads a template from a file or a string"""
+        if template_string is not None:
+            return Template(template_string, **self.tmpl_options)
+        # Translate TG dot notation to normal / template path
+        if '/' not in templatename:
+            templatename = '/' + templatename.replace('.', '/') + '.' +\
+                    self.extension
+
+        # Lookup template
+        return self.lookup.get_template(templatename)
+
+    def render(self, info, format="html", fragment=False, template=None):
+        if isinstance(template, basestring):
+            template = self.load_template(template)
+
+        # Load extra vars func if provided
+        if self.extra_vars_func:
+            info.update(self.extra_vars_func())
+
+        return template.render(**info)
+
diff --git a/lib/Mako-0.7.3/mako/filters.py b/lib/Mako-0.7.3/mako/filters.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/filters.py
@@ -0,0 +1,191 @@
+# mako/filters.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+
+import re, urllib, htmlentitydefs, codecs
+from StringIO import StringIO
+from mako import util
+
+xml_escapes = {
+    '&' : '&',
+    '>' : '>',
+    '<' : '<',
+    '"' : '"',   # also " in html-only
+    "'" : '''    # also ' in html-only
+}
+
+# XXX: " is valid in HTML and XML
+#      ' is not valid HTML, but is valid XML
+
+LEGACY_HTML_ESCAPE_RE = re.compile(r'([&<"\'>])')
+
+def legacy_html_escape(string):
+    """legacy HTML escape for non-unicode mode."""
+
+    return LEGACY_HTML_ESCAPE_RE.sub(lambda m: xml_escapes[m.group()], string)
+
+try:
+    import markupsafe
+    html_escape = markupsafe.escape
+except ImportError:
+    html_escape = legacy_html_escape
+
+
+def xml_escape(string):
+    return re.sub(r'([&<"\'>])', lambda m: xml_escapes[m.group()], string)
+
+def url_escape(string):
+    # convert into a list of octets
+    string = string.encode("utf8")
+    return urllib.quote_plus(string)
+
+def url_unescape(string):
+    text = urllib.unquote_plus(string)
+    if not is_ascii_str(text):
+        text = text.decode("utf8")
+    return text
+
+def trim(string):
+    return string.strip()
+
+
+class Decode(object):
+    def __getattr__(self, key):
+        def decode(x):
+            if isinstance(x, unicode):
+                return x
+            elif not isinstance(x, str):
+                return unicode(str(x), encoding=key)
+            else:
+                return unicode(x, encoding=key)
+        return decode
+decode = Decode()
+
+
+_ASCII_re = re.compile(r'\A[\x00-\x7f]*\Z')
+
+def is_ascii_str(text):
+    return isinstance(text, str) and _ASCII_re.match(text)
+
+################################################################
+
+class XMLEntityEscaper(object):
+    def __init__(self, codepoint2name, name2codepoint):
+        self.codepoint2entity = dict([(c, u'&%s;' % n)
+                                      for c,n in codepoint2name.iteritems()])
+        self.name2codepoint = name2codepoint
+
+    def escape_entities(self, text):
+        """Replace characters with their character entity references.
+
+        Only characters corresponding to a named entity are replaced.
+        """
+        return unicode(text).translate(self.codepoint2entity)
+
+    def __escape(self, m):
+        codepoint = ord(m.group())
+        try:
+            return self.codepoint2entity[codepoint]
+        except (KeyError, IndexError):
+            return '&#x%X;' % codepoint
+
+
+    __escapable = re.compile(r'["&<>]|[^\x00-\x7f]')
+
+    def escape(self, text):
+        """Replace characters with their character references.
+
+        Replace characters by their named entity references.
+        Non-ASCII characters, if they do not have a named entity reference,
+        are replaced by numerical character references.
+
+        The return value is guaranteed to be ASCII.
+        """
+        return self.__escapable.sub(self.__escape, unicode(text)
+                                    ).encode('ascii')
+
+    # XXX: This regexp will not match all valid XML entity names__.
+    # (It punts on details involving involving CombiningChars and Extenders.)
+    #
+    # .. __: http://www.w3.org/TR/2000/REC-xml-20001006#NT-EntityRef
+    __characterrefs = re.compile(r'''& (?:
+                                          \#(\d+)
+                                          | \#x([\da-f]+)
+                                          | ( (?!\d) [:\w] [-.:\w]+ )
+                                          ) ;''',
+                                 re.X | re.UNICODE)
+
+    def __unescape(self, m):
+        dval, hval, name = m.groups()
+        if dval:
+            codepoint = int(dval)
+        elif hval:
+            codepoint = int(hval, 16)
+        else:
+            codepoint = self.name2codepoint.get(name, 0xfffd)
+            # U+FFFD = "REPLACEMENT CHARACTER"
+        if codepoint < 128:
+            return chr(codepoint)
+        return unichr(codepoint)
+
+    def unescape(self, text):
+        """Unescape character references.
+
+        All character references (both entity references and numerical
+        character references) are unescaped.
+        """
+        return self.__characterrefs.sub(self.__unescape, text)
+
+
+_html_entities_escaper = XMLEntityEscaper(htmlentitydefs.codepoint2name,
+                                          htmlentitydefs.name2codepoint)
+
+html_entities_escape = _html_entities_escaper.escape_entities
+html_entities_unescape = _html_entities_escaper.unescape
+
+
+def htmlentityreplace_errors(ex):
+    """An encoding error handler.
+
+    This python `codecs`_ error handler replaces unencodable
+    characters with HTML entities, or, if no HTML entity exists for
+    the character, XML character references.
+
+    >>> u'The cost was \u20ac12.'.encode('latin1', 'htmlentityreplace')
+    'The cost was €12.'
+    """
+    if isinstance(ex, UnicodeEncodeError):
+        # Handle encoding errors
+        bad_text = ex.object[ex.start:ex.end]
+        text = _html_entities_escaper.escape(bad_text)
+        return (unicode(text), ex.end)
+    raise ex
+
+codecs.register_error('htmlentityreplace', htmlentityreplace_errors)
+
+
+# TODO: options to make this dynamic per-compilation will be added in a later
+# release
+DEFAULT_ESCAPES = {
+    'x':'filters.xml_escape',
+    'h':'filters.html_escape',
+    'u':'filters.url_escape',
+    'trim':'filters.trim',
+    'entity':'filters.html_entities_escape',
+    'unicode':'unicode',
+    'decode':'decode',
+    'str':'str',
+    'n':'n'
+}
+
+if util.py3k:
+    DEFAULT_ESCAPES.update({
+        'unicode':'str'
+    })
+
+NON_UNICODE_ESCAPES = DEFAULT_ESCAPES.copy()
+NON_UNICODE_ESCAPES['h'] = 'filters.legacy_html_escape'
+
diff --git a/lib/Mako-0.7.3/mako/lexer.py b/lib/Mako-0.7.3/mako/lexer.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/lexer.py
@@ -0,0 +1,442 @@
+# mako/lexer.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""provides the Lexer class for parsing template strings into parse trees."""
+
+import re, codecs
+from mako import parsetree, exceptions, util
+from mako.pygen import adjust_whitespace
+
+_regexp_cache = {}
+
+class Lexer(object):
+    def __init__(self, text, filename=None,
+                        disable_unicode=False,
+                        input_encoding=None, preprocessor=None):
+        self.text = text
+        self.filename = filename
+        self.template = parsetree.TemplateNode(self.filename)
+        self.matched_lineno = 1
+        self.matched_charpos = 0
+        self.lineno = 1
+        self.match_position = 0
+        self.tag = []
+        self.control_line = []
+        self.ternary_stack = []
+        self.disable_unicode = disable_unicode
+        self.encoding = input_encoding
+
+        if util.py3k and disable_unicode:
+            raise exceptions.UnsupportedError(
+                                    "Mako for Python 3 does not "
+                                    "support disabling Unicode")
+
+        if preprocessor is None:
+            self.preprocessor = []
+        elif not hasattr(preprocessor, '__iter__'):
+            self.preprocessor = [preprocessor]
+        else:
+            self.preprocessor = preprocessor
+
+    @property
+    def exception_kwargs(self):
+        return {'source':self.text,
+                'lineno':self.matched_lineno,
+                'pos':self.matched_charpos,
+                'filename':self.filename}
+
+    def match(self, regexp, flags=None):
+        """compile the given regexp, cache the reg, and call match_reg()."""
+
+        try:
+            reg = _regexp_cache[(regexp, flags)]
+        except KeyError:
+            if flags:
+                reg = re.compile(regexp, flags)
+            else:
+                reg = re.compile(regexp)
+            _regexp_cache[(regexp, flags)] = reg
+
+        return self.match_reg(reg)
+
+    def match_reg(self, reg):
+        """match the given regular expression object to the current text
+        position.
+
+        if a match occurs, update the current text and line position.
+
+        """
+
+        mp = self.match_position
+
+        match = reg.match(self.text, self.match_position)
+        if match:
+            (start, end) = match.span()
+            if end == start:
+                self.match_position = end + 1
+            else:
+                self.match_position = end
+            self.matched_lineno = self.lineno
+            lines = re.findall(r"\n", self.text[mp:self.match_position])
+            cp = mp - 1
+            while (cp >= 0 and cp<self.textlength and self.text[cp] != '\n'):
+                cp -=1
+            self.matched_charpos = mp - cp
+            self.lineno += len(lines)
+            #print "MATCHED:", match.group(0), "LINE START:",
+            # self.matched_lineno, "LINE END:", self.lineno
+        #print "MATCH:", regexp, "\n", self.text[mp : mp + 15], \
+        #          (match and "TRUE" or "FALSE")
+        return match
+
+    def parse_until_text(self, *text):
+        startpos = self.match_position
+        text_re = r'|'.join(text)
+        brace_level = 0
+        while True:
+            match = self.match(r'#.*\n')
+            if match:
+                continue
+            match = self.match(r'(\"\"\"|\'\'\'|\"|\')((?<!\\)\\\1|.)*?\1',
+                               re.S)
+            if match:
+                continue
+            match = self.match(r'(%s)' % text_re)
+            if match:
+                if match.group(1) == '}' and brace_level > 0:
+                    brace_level -= 1
+                    continue
+                return \
+                    self.text[startpos:\
+                              self.match_position-len(match.group(1))],\
+                    match.group(1)
+            match = self.match(r"(.*?)(?=\"|\'|#|%s)" % text_re, re.S)
+            if match:
+                brace_level += match.group(1).count('{')
+                brace_level -= match.group(1).count('}')
+                continue
+            raise exceptions.SyntaxException(
+                        "Expected: %s" %
+                        ','.join(text),
+                        **self.exception_kwargs)
+
+    def append_node(self, nodecls, *args, **kwargs):
+        kwargs.setdefault('source', self.text)
+        kwargs.setdefault('lineno', self.matched_lineno)
+        kwargs.setdefault('pos', self.matched_charpos)
+        kwargs['filename'] = self.filename
+        node = nodecls(*args, **kwargs)
+        if len(self.tag):
+            self.tag[-1].nodes.append(node)
+        else:
+            self.template.nodes.append(node)
+        # build a set of child nodes for the control line
+        # (used for loop variable detection)
+        # also build a set of child nodes on ternary control lines
+        # (used for determining if a pass needs to be auto-inserted
+        if self.control_line:
+            control_frame = self.control_line[-1]
+            control_frame.nodes.append(node)
+            if not (isinstance(node, parsetree.ControlLine) and
+                    control_frame.is_ternary(node.keyword)):
+                if self.ternary_stack and self.ternary_stack[-1]:
+                    self.ternary_stack[-1][-1].nodes.append(node)
+        if isinstance(node, parsetree.Tag):
+            if len(self.tag):
+                node.parent = self.tag[-1]
+            self.tag.append(node)
+        elif isinstance(node, parsetree.ControlLine):
+            if node.isend:
+                self.control_line.pop()
+                self.ternary_stack.pop()
+            elif node.is_primary:
+                self.control_line.append(node)
+                self.ternary_stack.append([])
+            elif self.control_line and \
+                    self.control_line[-1].is_ternary(node.keyword):
+                self.ternary_stack[-1].append(node)
+            elif self.control_line and \
+                    not self.control_line[-1].is_ternary(node.keyword):
+                raise exceptions.SyntaxException(
+                          "Keyword '%s' not a legal ternary for keyword '%s'" %
+                          (node.keyword, self.control_line[-1].keyword),
+                          **self.exception_kwargs)
+
+    _coding_re = re.compile(r'#.*coding[:=]\s*([-\w.]+).*\r?\n')
+
+    def decode_raw_stream(self, text, decode_raw, known_encoding, filename):
+        """given string/unicode or bytes/string, determine encoding
+           from magic encoding comment, return body as unicode
+           or raw if decode_raw=False
+
+        """
+        if isinstance(text, unicode):
+            m = self._coding_re.match(text)
+            encoding = m and m.group(1) or known_encoding or 'ascii'
+            return encoding, text
+
+        if text.startswith(codecs.BOM_UTF8):
+            text = text[len(codecs.BOM_UTF8):]
+            parsed_encoding = 'utf-8'
+            m = self._coding_re.match(text.decode('utf-8', 'ignore'))
+            if m is not None and m.group(1) != 'utf-8':
+                raise exceptions.CompileException(
+                                "Found utf-8 BOM in file, with conflicting "
+                                "magic encoding comment of '%s'" % m.group(1),
+                                text.decode('utf-8', 'ignore'),
+                                0, 0, filename)
+        else:
+            m = self._coding_re.match(text.decode('utf-8', 'ignore'))
+            if m:
+                parsed_encoding = m.group(1)
+            else:
+                parsed_encoding = known_encoding or 'ascii'
+
+        if decode_raw:
+            try:
+                text = text.decode(parsed_encoding)
+            except UnicodeDecodeError, e:
+                raise exceptions.CompileException(
+                           "Unicode decode operation of encoding '%s' failed" %
+                           parsed_encoding,
+                           text.decode('utf-8', 'ignore'),
+                           0, 0, filename)
+
+        return parsed_encoding, text
+
+    def parse(self):
+        self.encoding, self.text = self.decode_raw_stream(self.text,
+                                        not self.disable_unicode,
+                                        self.encoding,
+                                        self.filename,)
+
+        for preproc in self.preprocessor:
+            self.text = preproc(self.text)
+
+        # push the match marker past the
+        # encoding comment.
+        self.match_reg(self._coding_re)
+
+        self.textlength = len(self.text)
+
+        while (True):
+            if self.match_position > self.textlength:
+                break
+
+            if self.match_end():
+                break
+            if self.match_expression():
+                continue
+            if self.match_control_line():
+                continue
+            if self.match_comment():
+                continue
+            if self.match_tag_start():
+                continue
+            if self.match_tag_end():
+                continue
+            if self.match_python_block():
+                continue
+            if self.match_text():
+                continue
+
+            if self.match_position > self.textlength:
+                break
+            raise exceptions.CompileException("assertion failed")
+
+        if len(self.tag):
+            raise exceptions.SyntaxException("Unclosed tag: <%%%s>" %
+                                                self.tag[-1].keyword,
+                                                **self.exception_kwargs)
+        if len(self.control_line):
+            raise exceptions.SyntaxException(
+                                      "Unterminated control keyword: '%s'" %
+                                      self.control_line[-1].keyword,
+                                      self.text,
+                                      self.control_line[-1].lineno,
+                                      self.control_line[-1].pos, self.filename)
+        return self.template
+
+    def match_tag_start(self):
+        match = self.match(r'''
+            \<%     # opening tag
+
+            ([\w\.\:]+)   # keyword
+
+            ((?:\s+\w+|\s*=\s*|".*?"|'.*?')*)  # attrname, = \
+                                               #        sign, string expression
+
+            \s*     # more whitespace
+
+            (/)?>   # closing
+
+            ''',
+
+            re.I | re.S | re.X)
+
+        if match:
+            keyword, attr, isend = match.groups()
+            self.keyword = keyword
+            attributes = {}
+            if attr:
+                for att in re.findall(
+                           r"\s*(\w+)\s*=\s*(?:'([^']*)'|\"([^\"]*)\")", attr):
+                    key, val1, val2 = att
+                    text = val1 or val2
+                    text = text.replace('\r\n', '\n')
+                    attributes[key] = text
+            self.append_node(parsetree.Tag, keyword, attributes)
+            if isend:
+                self.tag.pop()
+            else:
+                if keyword == 'text':
+                    match = self.match(r'(.*?)(?=\</%text>)',  re.S)
+                    if not match:
+                        raise exceptions.SyntaxException(
+                                            "Unclosed tag: <%%%s>" %
+                                            self.tag[-1].keyword,
+                                            **self.exception_kwargs)
+                    self.append_node(parsetree.Text, match.group(1))
+                    return self.match_tag_end()
+            return True
+        else:
+            return False
+
+    def match_tag_end(self):
+        match = self.match(r'\</%[\t ]*(.+?)[\t ]*>')
+        if match:
+            if not len(self.tag):
+                raise exceptions.SyntaxException(
+                                   "Closing tag without opening tag: </%%%s>" %
+                                    match.group(1),
+                                    **self.exception_kwargs)
+            elif self.tag[-1].keyword != match.group(1):
+                raise exceptions.SyntaxException(
+                             "Closing tag </%%%s> does not match tag: <%%%s>" %
+                             (match.group(1), self.tag[-1].keyword),
+                             **self.exception_kwargs)
+            self.tag.pop()
+            return True
+        else:
+            return False
+
+    def match_end(self):
+        match = self.match(r'\Z', re.S)
+        if match:
+            string = match.group()
+            if string:
+                return string
+            else:
+                return True
+        else:
+            return False
+
+    def match_text(self):
+        match = self.match(r"""
+                (.*?)         # anything, followed by:
+                (
+                 (?<=\n)(?=[ \t]*(?=%|\#\#)) # an eval or line-based
+                                             # comment preceded by a
+                                             # consumed newline and whitespace
+                 |
+                 (?=\${)      # an expression
+                 |
+                 (?=\#\*)     # multiline comment
+                 |
+                 (?=</?[%&])  # a substitution or block or call start or end
+                              # - don't consume
+                 |
+                 (\\\r?\n)    # an escaped newline  - throw away
+                 |
+                 \Z           # end of string
+                )""", re.X | re.S)
+
+        if match:
+            text = match.group(1)
+            if text:
+                self.append_node(parsetree.Text, text)
+            return True
+        else:
+            return False
+
+    def match_python_block(self):
+        match = self.match(r"<%(!)?")
+        if match:
+            line, pos = self.matched_lineno, self.matched_charpos
+            text, end = self.parse_until_text(r'%>')
+            # the trailing newline helps
+            # compiler.parse() not complain about indentation
+            text = adjust_whitespace(text) + "\n"
+            self.append_node(
+                            parsetree.Code,
+                            text,
+                            match.group(1)=='!', lineno=line, pos=pos)
+            return True
+        else:
+            return False
+
+    def match_expression(self):
+        match = self.match(r"\${")
+        if match:
+            line, pos = self.matched_lineno, self.matched_charpos
+            text, end = self.parse_until_text(r'\|', r'}')
+            if end == '|':
+                escapes, end = self.parse_until_text(r'}')
+            else:
+                escapes = ""
+            text = text.replace('\r\n', '\n')
+            self.append_node(
+                            parsetree.Expression,
+                            text, escapes.strip(),
+                            lineno=line, pos=pos)
+            return True
+        else:
+            return False
+
+    def match_control_line(self):
+        match = self.match(
+                      r"(?<=^)[\t ]*(%(?!%)|##)[\t ]*((?:(?:\\r?\n)|[^\r\n])*)"
+                      r"(?:\r?\n|\Z)", re.M)
+        if match:
+            operator = match.group(1)
+            text = match.group(2)
+            if operator == '%':
+                m2 = re.match(r'(end)?(\w+)\s*(.*)', text)
+                if not m2:
+                    raise exceptions.SyntaxException(
+                                "Invalid control line: '%s'" %
+                                text,
+                                **self.exception_kwargs)
+                isend, keyword = m2.group(1, 2)
+                isend = (isend is not None)
+
+                if isend:
+                    if not len(self.control_line):
+                        raise exceptions.SyntaxException(
+                                "No starting keyword '%s' for '%s'" %
+                                (keyword, text),
+                                **self.exception_kwargs)
+                    elif self.control_line[-1].keyword != keyword:
+                        raise exceptions.SyntaxException(
+                                "Keyword '%s' doesn't match keyword '%s'" %
+                                (text, self.control_line[-1].keyword),
+                                **self.exception_kwargs)
+                self.append_node(parsetree.ControlLine, keyword, isend, text)
+            else:
+                self.append_node(parsetree.Comment, text)
+            return True
+        else:
+            return False
+
+    def match_comment(self):
+        """matches the multiline version of a comment"""
+        match = self.match(r"<%doc>(.*?)</%doc>", re.S)
+        if match:
+            self.append_node(parsetree.Comment, match.group(1))
+            return True
+        else:
+            return False
+
diff --git a/lib/Mako-0.7.3/mako/lookup.py b/lib/Mako-0.7.3/mako/lookup.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/lookup.py
@@ -0,0 +1,354 @@
+# mako/lookup.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+import os, stat, posixpath, re
+from mako import exceptions, util
+from mako.template import Template
+
+try:
+    import threading
+except:
+    import dummy_threading as threading
+
+class TemplateCollection(object):
+    """Represent a collection of :class:`.Template` objects,
+    identifiable via URI.
+
+    A :class:`.TemplateCollection` is linked to the usage of
+    all template tags that address other templates, such
+    as ``<%include>``, ``<%namespace>``, and ``<%inherit>``.
+    The ``file`` attribute of each of those tags refers
+    to a string URI that is passed to that :class:`.Template`
+    object's :class:`.TemplateCollection` for resolution.
+
+    :class:`.TemplateCollection` is an abstract class,
+    with the usual default implementation being :class:`.TemplateLookup`.
+
+     """
+
+    def has_template(self, uri):
+        """Return ``True`` if this :class:`.TemplateLookup` is
+        capable of returning a :class:`.Template` object for the
+        given ``uri``.
+
+        :param uri: String URI of the template to be resolved.
+
+        """
+        try:
+            self.get_template(uri)
+            return True
+        except exceptions.TemplateLookupException:
+            return False
+
+    def get_template(self, uri, relativeto=None):
+        """Return a :class:`.Template` object corresponding to the given
+        ``uri``.
+
+        The default implementation raises
+        :class:`.NotImplementedError`. Implementations should
+        raise :class:`.TemplateLookupException` if the given ``uri``
+        cannot be resolved.
+
+        :param uri: String URI of the template to be resolved.
+        :param relativeto: if present, the given ``uri`` is assumed to
+         be relative to this URI.
+
+        """
+        raise NotImplementedError()
+
+    def filename_to_uri(self, uri, filename):
+        """Convert the given ``filename`` to a URI relative to
+           this :class:`.TemplateCollection`."""
+
+        return uri
+
+    def adjust_uri(self, uri, filename):
+        """Adjust the given ``uri`` based on the calling ``filename``.
+
+        When this method is called from the runtime, the
+        ``filename`` parameter is taken directly to the ``filename``
+        attribute of the calling template. Therefore a custom
+        :class:`.TemplateCollection` subclass can place any string
+        identifier desired in the ``filename`` parameter of the
+        :class:`.Template` objects it constructs and have them come back
+        here.
+
+        """
+        return uri
+
+class TemplateLookup(TemplateCollection):
+    """Represent a collection of templates that locates template source files
+    from the local filesystem.
+
+    The primary argument is the ``directories`` argument, the list of
+    directories to search:
+
+    .. sourcecode:: python
+
+        lookup = TemplateLookup(["/path/to/templates"])
+        some_template = lookup.get_template("/index.html")
+
+    The :class:`.TemplateLookup` can also be given :class:`.Template` objects
+    programatically using :meth:`.put_string` or :meth:`.put_template`:
+
+    .. sourcecode:: python
+
+        lookup = TemplateLookup()
+        lookup.put_string("base.html", '''
+            <html><body>${self.next()}</body></html>
+        ''')
+        lookup.put_string("hello.html", '''
+            <%include file='base.html'/>
+
+            Hello, world !
+        ''')
+
+
+    :param directories: A list of directory names which will be
+     searched for a particular template URI. The URI is appended
+     to each directory and the filesystem checked.
+
+    :param collection_size: Approximate size of the collection used
+     to store templates. If left at its default of ``-1``, the size
+     is unbounded, and a plain Python dictionary is used to
+     relate URI strings to :class:`.Template` instances.
+     Otherwise, a least-recently-used cache object is used which
+     will maintain the size of the collection approximately to
+     the number given.
+
+    :param filesystem_checks: When at its default value of ``True``,
+     each call to :meth:`.TemplateLookup.get_template()` will
+     compare the filesystem last modified time to the time in
+     which an existing :class:`.Template` object was created.
+     This allows the :class:`.TemplateLookup` to regenerate a
+     new :class:`.Template` whenever the original source has
+     been updated. Set this to ``False`` for a very minor
+     performance increase.
+
+    :param modulename_callable: A callable which, when present,
+     is passed the path of the source file as well as the
+     requested URI, and then returns the full path of the
+     generated Python module file. This is used to inject
+     alternate schemes for Python module location. If left at
+     its default of ``None``, the built in system of generation
+     based on ``module_directory`` plus ``uri`` is used.
+
+    All other keyword parameters available for
+    :class:`.Template` are mirrored here. When new
+    :class:`.Template` objects are created, the keywords
+    established with this :class:`.TemplateLookup` are passed on
+    to each new :class:`.Template`.
+
+    """
+
+    def __init__(self,
+                        directories=None,
+                        module_directory=None,
+                        filesystem_checks=True,
+                        collection_size=-1,
+                        format_exceptions=False,
+                        error_handler=None,
+                        disable_unicode=False,
+                        bytestring_passthrough=False,
+                        output_encoding=None,
+                        encoding_errors='strict',
+
+                        cache_args=None,
+                        cache_impl='beaker',
+                        cache_enabled=True,
+                        cache_type=None,
+                        cache_dir=None,
+                        cache_url=None,
+
+                        modulename_callable=None,
+                        module_writer=None,
+                        default_filters=None,
+                        buffer_filters=(),
+                        strict_undefined=False,
+                        imports=None,
+                        enable_loop=True,
+                        input_encoding=None,
+                        preprocessor=None):
+
+        self.directories = [posixpath.normpath(d) for d in
+                            util.to_list(directories, ())
+                            ]
+        self.module_directory = module_directory
+        self.modulename_callable = modulename_callable
+        self.filesystem_checks = filesystem_checks
+        self.collection_size = collection_size
+
+        if cache_args is None:
+            cache_args = {}
+        # transfer deprecated cache_* args
+        if cache_dir:
+            cache_args.setdefault('dir', cache_dir)
+        if cache_url:
+            cache_args.setdefault('url', cache_url)
+        if cache_type:
+            cache_args.setdefault('type', cache_type)
+
+        self.template_args = {
+            'format_exceptions':format_exceptions,
+            'error_handler':error_handler,
+            'disable_unicode':disable_unicode,
+            'bytestring_passthrough':bytestring_passthrough,
+            'output_encoding':output_encoding,
+            'cache_impl':cache_impl,
+            'encoding_errors':encoding_errors,
+            'input_encoding':input_encoding,
+            'module_directory':module_directory,
+            'module_writer':module_writer,
+            'cache_args':cache_args,
+            'cache_enabled':cache_enabled,
+            'default_filters':default_filters,
+            'buffer_filters':buffer_filters,
+            'strict_undefined':strict_undefined,
+            'imports':imports,
+            'enable_loop':enable_loop,
+            'preprocessor':preprocessor}
+
+        if collection_size == -1:
+            self._collection = {}
+            self._uri_cache = {}
+        else:
+            self._collection = util.LRUCache(collection_size)
+            self._uri_cache = util.LRUCache(collection_size)
+        self._mutex = threading.Lock()
+
+    def get_template(self, uri):
+        """Return a :class:`.Template` object corresponding to the given
+        ``uri``.
+
+        .. note:: The ``relativeto`` argument is not supported here at the moment.
+
+        """
+
+        try:
+            if self.filesystem_checks:
+                return self._check(uri, self._collection[uri])
+            else:
+                return self._collection[uri]
+        except KeyError:
+            u = re.sub(r'^\/+', '', uri)
+            for dir in self.directories:
+                srcfile = posixpath.normpath(posixpath.join(dir, u))
+                if os.path.isfile(srcfile):
+                    return self._load(srcfile, uri)
+            else:
+                raise exceptions.TopLevelLookupException(
+                                    "Cant locate template for uri %r" % uri)
+
+    def adjust_uri(self, uri, relativeto):
+        """Adjust the given ``uri`` based on the given relative URI."""
+
+        key = (uri, relativeto)
+        if key in self._uri_cache:
+            return self._uri_cache[key]
+
+        if uri[0] != '/':
+            if relativeto is not None:
+                v = self._uri_cache[key] = posixpath.join(
+                                            posixpath.dirname(relativeto), uri)
+            else:
+                v = self._uri_cache[key] = '/' + uri
+        else:
+            v = self._uri_cache[key] = uri
+        return v
+
+
+    def filename_to_uri(self, filename):
+        """Convert the given ``filename`` to a URI relative to
+           this :class:`.TemplateCollection`."""
+
+        try:
+            return self._uri_cache[filename]
+        except KeyError:
+            value = self._relativeize(filename)
+            self._uri_cache[filename] = value
+            return value
+
+    def _relativeize(self, filename):
+        """Return the portion of a filename that is 'relative'
+           to the directories in this lookup.
+
+        """
+
+        filename = posixpath.normpath(filename)
+        for dir in self.directories:
+            if filename[0:len(dir)] == dir:
+                return filename[len(dir):]
+        else:
+            return None
+
+    def _load(self, filename, uri):
+        self._mutex.acquire()
+        try:
+            try:
+                # try returning from collection one
+                # more time in case concurrent thread already loaded
+                return self._collection[uri]
+            except KeyError:
+                pass
+            try:
+                if self.modulename_callable is not None:
+                    module_filename = self.modulename_callable(filename, uri)
+                else:
+                    module_filename = None
+                self._collection[uri] = template = Template(
+                                        uri=uri,
+                                        filename=posixpath.normpath(filename),
+                                        lookup=self,
+                                        module_filename=module_filename,
+                                        **self.template_args)
+                return template
+            except:
+                # if compilation fails etc, ensure
+                # template is removed from collection,
+                # re-raise
+                self._collection.pop(uri, None)
+                raise
+        finally:
+            self._mutex.release()
+
+    def _check(self, uri, template):
+        if template.filename is None:
+            return template
+
+        try:
+            template_stat = os.stat(template.filename)
+            if template.module._modified_time < \
+                        template_stat[stat.ST_MTIME]:
+                self._collection.pop(uri, None)
+                return self._load(template.filename, uri)
+            else:
+                return template
+        except OSError:
+            self._collection.pop(uri, None)
+            raise exceptions.TemplateLookupException(
+                                "Cant locate template for uri %r" % uri)
+
+
+    def put_string(self, uri, text):
+        """Place a new :class:`.Template` object into this
+        :class:`.TemplateLookup`, based on the given string of
+        ``text``.
+
+        """
+        self._collection[uri] = Template(
+                                    text,
+                                    lookup=self,
+                                    uri=uri,
+                                    **self.template_args)
+
+    def put_template(self, uri, template):
+        """Place a new :class:`.Template` object into this
+        :class:`.TemplateLookup`, based on the given
+        :class:`.Template` object.
+
+        """
+        self._collection[uri] = template
+
diff --git a/lib/Mako-0.7.3/mako/parsetree.py b/lib/Mako-0.7.3/mako/parsetree.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/parsetree.py
@@ -0,0 +1,596 @@
+# mako/parsetree.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""defines the parse tree components for Mako templates."""
+
+from mako import exceptions, ast, util, filters
+import re
+
+class Node(object):
+    """base class for a Node in the parse tree."""
+
+    def __init__(self, source, lineno, pos, filename):
+        self.source = source
+        self.lineno = lineno
+        self.pos = pos
+        self.filename = filename
+
+    @property
+    def exception_kwargs(self):
+        return {'source':self.source, 'lineno':self.lineno,
+                'pos':self.pos, 'filename':self.filename}
+
+    def get_children(self):
+        return []
+
+    def accept_visitor(self, visitor):
+        def traverse(node):
+            for n in node.get_children():
+                n.accept_visitor(visitor)
+
+        method = getattr(visitor, "visit" + self.__class__.__name__, traverse)
+        method(self)
+
+class TemplateNode(Node):
+    """a 'container' node that stores the overall collection of nodes."""
+
+    def __init__(self, filename):
+        super(TemplateNode, self).__init__('', 0, 0, filename)
+        self.nodes = []
+        self.page_attributes = {}
+
+    def get_children(self):
+        return self.nodes
+
+    def __repr__(self):
+        return "TemplateNode(%s, %r)" % (
+                    util.sorted_dict_repr(self.page_attributes),
+                    self.nodes)
+
+class ControlLine(Node):
+    """defines a control line, a line-oriented python line or end tag.
+
+    e.g.::
+
+        % if foo:
+            (markup)
+        % endif
+
+    """
+
+    has_loop_context = False
+
+    def __init__(self, keyword, isend, text, **kwargs):
+        super(ControlLine, self).__init__(**kwargs)
+        self.text = text
+        self.keyword = keyword
+        self.isend = isend
+        self.is_primary = keyword in ['for', 'if', 'while', 'try', 'with']
+        self.nodes = []
+        if self.isend:
+            self._declared_identifiers = []
+            self._undeclared_identifiers = []
+        else:
+            code = ast.PythonFragment(text, **self.exception_kwargs)
+            self._declared_identifiers = code.declared_identifiers
+            self._undeclared_identifiers = code.undeclared_identifiers
+
+    def get_children(self):
+        return self.nodes
+
+    def declared_identifiers(self):
+        return self._declared_identifiers
+
+    def undeclared_identifiers(self):
+        return self._undeclared_identifiers
+
+    def is_ternary(self, keyword):
+        """return true if the given keyword is a ternary keyword
+        for this ControlLine"""
+
+        return keyword in {
+            'if':set(['else', 'elif']),
+            'try':set(['except', 'finally']),
+            'for':set(['else'])
+        }.get(self.keyword, [])
+
+    def __repr__(self):
+        return "ControlLine(%r, %r, %r, %r)" % (
+            self.keyword,
+            self.text,
+            self.isend,
+            (self.lineno, self.pos)
+        )
+
+class Text(Node):
+    """defines plain text in the template."""
+
+    def __init__(self, content, **kwargs):
+        super(Text, self).__init__(**kwargs)
+        self.content = content
+
+    def __repr__(self):
+        return "Text(%r, %r)" % (self.content, (self.lineno, self.pos))
+
+class Code(Node):
+    """defines a Python code block, either inline or module level.
+
+    e.g.::
+
+        inline:
+        <%
+            x = 12
+        %>
+
+        module level:
+        <%!
+            import logger
+        %>
+
+    """
+
+    def __init__(self, text, ismodule, **kwargs):
+        super(Code, self).__init__(**kwargs)
+        self.text = text
+        self.ismodule = ismodule
+        self.code = ast.PythonCode(text, **self.exception_kwargs)
+
+    def declared_identifiers(self):
+        return self.code.declared_identifiers
+
+    def undeclared_identifiers(self):
+        return self.code.undeclared_identifiers
+
+    def __repr__(self):
+        return "Code(%r, %r, %r)" % (
+            self.text,
+            self.ismodule,
+            (self.lineno, self.pos)
+        )
+
+class Comment(Node):
+    """defines a comment line.
+
+    # this is a comment
+
+    """
+
+    def __init__(self, text, **kwargs):
+        super(Comment, self).__init__(**kwargs)
+        self.text = text
+
+    def __repr__(self):
+        return "Comment(%r, %r)" % (self.text, (self.lineno, self.pos))
+
+class Expression(Node):
+    """defines an inline expression.
+
+    ${x+y}
+
+    """
+
+    def __init__(self, text, escapes, **kwargs):
+        super(Expression, self).__init__(**kwargs)
+        self.text = text
+        self.escapes = escapes
+        self.escapes_code = ast.ArgumentList(escapes, **self.exception_kwargs)
+        self.code = ast.PythonCode(text, **self.exception_kwargs)
+
+    def declared_identifiers(self):
+        return []
+
+    def undeclared_identifiers(self):
+        # TODO: make the "filter" shortcut list configurable at parse/gen time
+        return self.code.undeclared_identifiers.union(
+                self.escapes_code.undeclared_identifiers.difference(
+                    set(filters.DEFAULT_ESCAPES.keys())
+                )
+            ).difference(self.code.declared_identifiers)
+
+    def __repr__(self):
+        return "Expression(%r, %r, %r)" % (
+            self.text,
+            self.escapes_code.args,
+            (self.lineno, self.pos)
+        )
+
+class _TagMeta(type):
+    """metaclass to allow Tag to produce a subclass according to
+    its keyword"""
+
+    _classmap = {}
+
+    def __init__(cls, clsname, bases, dict):
+        if cls.__keyword__ is not None:
+            cls._classmap[cls.__keyword__] = cls
+            super(_TagMeta, cls).__init__(clsname, bases, dict)
+
+    def __call__(cls, keyword, attributes, **kwargs):
+        if ":" in keyword:
+            ns, defname = keyword.split(':')
+            return type.__call__(CallNamespaceTag, ns, defname,
+                                        attributes, **kwargs)
+
+        try:
+            cls = _TagMeta._classmap[keyword]
+        except KeyError:
+            raise exceptions.CompileException(
+                "No such tag: '%s'" % keyword,
+                source=kwargs['source'],
+                lineno=kwargs['lineno'],
+                pos=kwargs['pos'],
+                filename=kwargs['filename']
+            )
+        return type.__call__(cls, keyword, attributes, **kwargs)
+
+class Tag(Node):
+    """abstract base class for tags.
+
+    <%sometag/>
+
+    <%someothertag>
+        stuff
+    </%someothertag>
+
+    """
+
+    __metaclass__ = _TagMeta
+    __keyword__ = None
+
+    def __init__(self, keyword, attributes, expressions,
+                        nonexpressions, required, **kwargs):
+        """construct a new Tag instance.
+
+        this constructor not called directly, and is only called
+        by subclasses.
+
+        :param keyword: the tag keyword
+
+        :param attributes: raw dictionary of attribute key/value pairs
+
+        :param expressions: a set of identifiers that are legal attributes,
+         which can also contain embedded expressions
+
+        :param nonexpressions: a set of identifiers that are legal
+         attributes, which cannot contain embedded expressions
+
+        :param \**kwargs:
+         other arguments passed to the Node superclass (lineno, pos)
+
+        """
+        super(Tag, self).__init__(**kwargs)
+        self.keyword = keyword
+        self.attributes = attributes
+        self._parse_attributes(expressions, nonexpressions)
+        missing = [r for r in required if r not in self.parsed_attributes]
+        if len(missing):
+            raise exceptions.CompileException(
+                "Missing attribute(s): %s" %
+                    ",".join([repr(m) for m in missing]),
+                **self.exception_kwargs)
+        self.parent = None
+        self.nodes = []
+
+    def is_root(self):
+        return self.parent is None
+
+    def get_children(self):
+        return self.nodes
+
+    def _parse_attributes(self, expressions, nonexpressions):
+        undeclared_identifiers = set()
+        self.parsed_attributes = {}
+        for key in self.attributes:
+            if key in expressions:
+                expr = []
+                for x in re.compile(r'(\${.+?})',
+                                    re.S).split(self.attributes[key]):
+                    m = re.compile(r'^\${(.+?)}$', re.S).match(x)
+                    if m:
+                        code = ast.PythonCode(m.group(1).rstrip(),
+                                **self.exception_kwargs)
+                        # we aren't discarding "declared_identifiers" here,
+                        # which we do so that list comprehension-declared
+                        # variables aren't counted.   As yet can't find a
+                        # condition that requires it here.
+                        undeclared_identifiers = \
+                            undeclared_identifiers.union(
+                                    code.undeclared_identifiers)
+                        expr.append('(%s)' % m.group(1))
+                    else:
+                        if x:
+                            expr.append(repr(x))
+                self.parsed_attributes[key] = " + ".join(expr) or repr('')
+            elif key in nonexpressions:
+                if re.search(r'\${.+?}', self.attributes[key]):
+                    raise exceptions.CompileException(
+                           "Attibute '%s' in tag '%s' does not allow embedded "
+                           "expressions"  % (key, self.keyword),
+                           **self.exception_kwargs)
+                self.parsed_attributes[key] = repr(self.attributes[key])
+            else:
+                raise exceptions.CompileException(
+                                    "Invalid attribute for tag '%s': '%s'" %
+                                    (self.keyword, key),
+                                    **self.exception_kwargs)
+        self.expression_undeclared_identifiers = undeclared_identifiers
+
+    def declared_identifiers(self):
+        return []
+
+    def undeclared_identifiers(self):
+        return self.expression_undeclared_identifiers
+
+    def __repr__(self):
+        return "%s(%r, %s, %r, %r)" % (self.__class__.__name__,
+                                    self.keyword,
+                                    util.sorted_dict_repr(self.attributes),
+                                    (self.lineno, self.pos),
+                                    self.nodes
+                                )
+
+class IncludeTag(Tag):
+    __keyword__ = 'include'
+
+    def __init__(self, keyword, attributes, **kwargs):
+        super(IncludeTag, self).__init__(
+                                    keyword,
+                                    attributes,
+                                    ('file', 'import', 'args'),
+                                    (), ('file',), **kwargs)
+        self.page_args = ast.PythonCode(
+                                "__DUMMY(%s)" % attributes.get('args', ''),
+                                 **self.exception_kwargs)
+
+    def declared_identifiers(self):
+        return []
+
+    def undeclared_identifiers(self):
+        identifiers = self.page_args.undeclared_identifiers.\
+                            difference(set(["__DUMMY"])).\
+                            difference(self.page_args.declared_identifiers)
+        return identifiers.union(super(IncludeTag, self).
+                                    undeclared_identifiers())
+
+class NamespaceTag(Tag):
+    __keyword__ = 'namespace'
+
+    def __init__(self, keyword, attributes, **kwargs):
+        super(NamespaceTag, self).__init__(
+                                        keyword, attributes,
+                                        ('file',),
+                                        ('name','inheritable',
+                                        'import','module'),
+                                        (), **kwargs)
+
+        self.name = attributes.get('name', '__anon_%s' % hex(abs(id(self))))
+        if not 'name' in attributes and not 'import' in attributes:
+            raise exceptions.CompileException(
+                "'name' and/or 'import' attributes are required "
+                "for <%namespace>",
+                **self.exception_kwargs)
+        if 'file' in attributes and 'module' in attributes:
+            raise exceptions.CompileException(
+                "<%namespace> may only have one of 'file' or 'module'",
+                **self.exception_kwargs
+            )
+
+    def declared_identifiers(self):
+        return []
+
+class TextTag(Tag):
+    __keyword__ = 'text'
+
+    def __init__(self, keyword, attributes, **kwargs):
+        super(TextTag, self).__init__(
+                                    keyword,
+                                    attributes, (),
+                                    ('filter'), (), **kwargs)
+        self.filter_args = ast.ArgumentList(
+                                    attributes.get('filter', ''),
+                                    **self.exception_kwargs)
+
+    def undeclared_identifiers(self):
+        return self.filter_args.\
+                            undeclared_identifiers.\
+                            difference(filters.DEFAULT_ESCAPES.keys()).union(
+                        self.expression_undeclared_identifiers
+                    )
+
+class DefTag(Tag):
+    __keyword__ = 'def'
+
+    def __init__(self, keyword, attributes, **kwargs):
+        expressions = ['buffered', 'cached'] + [
+                c for c in attributes if c.startswith('cache_')]
+
+
+        super(DefTag, self).__init__(
+                keyword,
+                attributes,
+                expressions,
+                ('name', 'filter', 'decorator'),
+                ('name',),
+                **kwargs)
+        name = attributes['name']
+        if re.match(r'^[\w_]+$', name):
+            raise exceptions.CompileException(
+                                "Missing parenthesis in %def",
+                                **self.exception_kwargs)
+        self.function_decl = ast.FunctionDecl("def " + name + ":pass",
+                                                    **self.exception_kwargs)
+        self.name = self.function_decl.funcname
+        self.decorator = attributes.get('decorator', '')
+        self.filter_args = ast.ArgumentList(
+                                attributes.get('filter', ''),
+                                **self.exception_kwargs)
+
+    is_anonymous = False
+    is_block = False
+
+    @property
+    def funcname(self):
+        return self.function_decl.funcname
+
+    def get_argument_expressions(self, **kw):
+        return self.function_decl.get_argument_expressions(**kw)
+
+    def declared_identifiers(self):
+        return self.function_decl.argnames
+
+    def undeclared_identifiers(self):
+        res = []
+        for c in self.function_decl.defaults:
+            res += list(ast.PythonCode(c, **self.exception_kwargs).
+                                    undeclared_identifiers)
+        return set(res).union(
+            self.filter_args.\
+                            undeclared_identifiers.\
+                            difference(filters.DEFAULT_ESCAPES.keys())
+        ).union(
+            self.expression_undeclared_identifiers
+        ).difference(
+            self.function_decl.argnames
+        )
+
+class BlockTag(Tag):
+    __keyword__ = 'block'
+
+    def __init__(self, keyword, attributes, **kwargs):
+        expressions = ['buffered', 'cached', 'args'] + [
+                 c for c in attributes if c.startswith('cache_')]
+
+        super(BlockTag, self).__init__(
+                keyword,
+                attributes,
+                expressions,
+                ('name','filter', 'decorator'),
+                (),
+                **kwargs)
+        name = attributes.get('name')
+        if name and not re.match(r'^[\w_]+$',name):
+            raise exceptions.CompileException(
+                               "%block may not specify an argument signature",
+                               **self.exception_kwargs)
+        if not name and attributes.get('args', None):
+            raise exceptions.CompileException(
+                                "Only named %blocks may specify args",
+                                **self.exception_kwargs
+                                )
+        self.body_decl = ast.FunctionArgs(attributes.get('args', ''),
+                                            **self.exception_kwargs)
+
+        self.name = name
+        self.decorator = attributes.get('decorator', '')
+        self.filter_args = ast.ArgumentList(
+                                attributes.get('filter', ''),
+                                **self.exception_kwargs)
+
+
+    is_block = True
+
+    @property
+    def is_anonymous(self):
+        return self.name is None
+
+    @property
+    def funcname(self):
+        return self.name or "__M_anon_%d" % (self.lineno, )
+
+    def get_argument_expressions(self, **kw):
+        return self.body_decl.get_argument_expressions(**kw)
+
+    def declared_identifiers(self):
+        return self.body_decl.argnames
+
+    def undeclared_identifiers(self):
+        return (self.filter_args.\
+                            undeclared_identifiers.\
+                            difference(filters.DEFAULT_ESCAPES.keys())
+                ).union(self.expression_undeclared_identifiers)
+
+
+
+class CallTag(Tag):
+    __keyword__ = 'call'
+
+    def __init__(self, keyword, attributes, **kwargs):
+        super(CallTag, self).__init__(keyword, attributes,
+                                    ('args'), ('expr',), ('expr',), **kwargs)
+        self.expression = attributes['expr']
+        self.code = ast.PythonCode(self.expression, **self.exception_kwargs)
+        self.body_decl = ast.FunctionArgs(attributes.get('args', ''),
+                                            **self.exception_kwargs)
+
+    def declared_identifiers(self):
+        return self.code.declared_identifiers.union(self.body_decl.argnames)
+
+    def undeclared_identifiers(self):
+        return self.code.undeclared_identifiers.\
+                    difference(self.code.declared_identifiers)
+
+class CallNamespaceTag(Tag):
+
+    def __init__(self, namespace, defname, attributes, **kwargs):
+        super(CallNamespaceTag, self).__init__(
+                    namespace + ":" + defname,
+                    attributes,
+                    tuple(attributes.keys()) + ('args', ),
+                    (),
+                    (),
+                    **kwargs)
+
+        self.expression = "%s.%s(%s)" % (
+                                namespace,
+                                defname,
+                                ",".join(["%s=%s" % (k, v) for k, v in
+                                            self.parsed_attributes.iteritems()
+                                            if k != 'args'])
+                            )
+        self.code = ast.PythonCode(self.expression, **self.exception_kwargs)
+        self.body_decl = ast.FunctionArgs(
+                                    attributes.get('args', ''),
+                                    **self.exception_kwargs)
+
+    def declared_identifiers(self):
+        return self.code.declared_identifiers.union(self.body_decl.argnames)
+
+    def undeclared_identifiers(self):
+        return self.code.undeclared_identifiers.\
+                    difference(self.code.declared_identifiers)
+
+class InheritTag(Tag):
+    __keyword__ = 'inherit'
+
+    def __init__(self, keyword, attributes, **kwargs):
+        super(InheritTag, self).__init__(
+                                keyword, attributes,
+                                ('file',), (), ('file',), **kwargs)
+
+class PageTag(Tag):
+    __keyword__ = 'page'
+
+    def __init__(self, keyword, attributes, **kwargs):
+        expressions =   ['cached', 'args', 'expression_filter', 'enable_loop'] + [
+                    c for c in attributes if c.startswith('cache_')]
+
+        super(PageTag, self).__init__(
+                keyword,
+                attributes,
+                expressions,
+                (),
+                (),
+                **kwargs)
+        self.body_decl = ast.FunctionArgs(attributes.get('args', ''),
+                                            **self.exception_kwargs)
+        self.filter_args = ast.ArgumentList(
+                                attributes.get('expression_filter', ''),
+                                **self.exception_kwargs)
+
+    def declared_identifiers(self):
+        return self.body_decl.argnames
+
+
diff --git a/lib/Mako-0.7.3/mako/pygen.py b/lib/Mako-0.7.3/mako/pygen.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/pygen.py
@@ -0,0 +1,283 @@
+# mako/pygen.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""utilities for generating and formatting literal Python code."""
+
+import re, string
+from StringIO import StringIO
+from mako import exceptions
+
+class PythonPrinter(object):
+    def __init__(self, stream):
+        # indentation counter
+        self.indent = 0
+
+        # a stack storing information about why we incremented
+        # the indentation counter, to help us determine if we
+        # should decrement it
+        self.indent_detail = []
+
+        # the string of whitespace multiplied by the indent
+        # counter to produce a line
+        self.indentstring = "    "
+
+        # the stream we are writing to
+        self.stream = stream
+
+        # a list of lines that represents a buffered "block" of code,
+        # which can be later printed relative to an indent level
+        self.line_buffer = []
+
+        self.in_indent_lines = False
+
+        self._reset_multi_line_flags()
+
+    def write(self, text):
+        self.stream.write(text)
+
+    def write_indented_block(self, block):
+        """print a line or lines of python which already contain indentation.
+
+        The indentation of the total block of lines will be adjusted to that of
+        the current indent level."""
+        self.in_indent_lines = False
+        for l in re.split(r'\r?\n', block):
+            self.line_buffer.append(l)
+
+    def writelines(self, *lines):
+        """print a series of lines of python."""
+        for line in lines:
+            self.writeline(line)
+
+    def writeline(self, line):
+        """print a line of python, indenting it according to the current
+        indent level.
+
+        this also adjusts the indentation counter according to the
+        content of the line.
+
+        """
+
+        if not self.in_indent_lines:
+            self._flush_adjusted_lines()
+            self.in_indent_lines = True
+
+        if (line is None or
+            re.match(r"^\s*#",line) or
+            re.match(r"^\s*$", line)
+            ):
+            hastext = False
+        else:
+            hastext = True
+
+        is_comment = line and len(line) and line[0] == '#'
+
+        # see if this line should decrease the indentation level
+        if (not is_comment and
+            (not hastext or self._is_unindentor(line))
+            ):
+
+            if self.indent > 0:
+                self.indent -=1
+                # if the indent_detail stack is empty, the user
+                # probably put extra closures - the resulting
+                # module wont compile.
+                if len(self.indent_detail) == 0:
+                    raise exceptions.SyntaxException(
+                                    "Too many whitespace closures")
+                self.indent_detail.pop()
+
+        if line is None:
+            return
+
+        # write the line
+        self.stream.write(self._indent_line(line) + "\n")
+
+        # see if this line should increase the indentation level.
+        # note that a line can both decrase (before printing) and
+        # then increase (after printing) the indentation level.
+
+        if re.search(r":[ \t]*(?:#.*)?$", line):
+            # increment indentation count, and also
+            # keep track of what the keyword was that indented us,
+            # if it is a python compound statement keyword
+            # where we might have to look for an "unindent" keyword
+            match = re.match(r"^\s*(if|try|elif|while|for|with)", line)
+            if match:
+                # its a "compound" keyword, so we will check for "unindentors"
+                indentor = match.group(1)
+                self.indent +=1
+                self.indent_detail.append(indentor)
+            else:
+                indentor = None
+                # its not a "compound" keyword.  but lets also
+                # test for valid Python keywords that might be indenting us,
+                # else assume its a non-indenting line
+                m2 = re.match(r"^\s*(def|class|else|elif|except|finally)",
+                              line)
+                if m2:
+                    self.indent += 1
+                    self.indent_detail.append(indentor)
+
+    def close(self):
+        """close this printer, flushing any remaining lines."""
+        self._flush_adjusted_lines()
+
+    def _is_unindentor(self, line):
+        """return true if the given line is an 'unindentor',
+        relative to the last 'indent' event received.
+
+        """
+
+        # no indentation detail has been pushed on; return False
+        if len(self.indent_detail) == 0:
+            return False
+
+        indentor = self.indent_detail[-1]
+
+        # the last indent keyword we grabbed is not a
+        # compound statement keyword; return False
+        if indentor is None:
+            return False
+
+        # if the current line doesnt have one of the "unindentor" keywords,
+        # return False
+        match = re.match(r"^\s*(else|elif|except|finally).*\:", line)
+        if not match:
+            return False
+
+        # whitespace matches up, we have a compound indentor,
+        # and this line has an unindentor, this
+        # is probably good enough
+        return True
+
+        # should we decide that its not good enough, heres
+        # more stuff to check.
+        #keyword = match.group(1)
+
+        # match the original indent keyword
+        #for crit in [
+        #   (r'if|elif', r'else|elif'),
+        #   (r'try', r'except|finally|else'),
+        #   (r'while|for', r'else'),
+        #]:
+        #   if re.match(crit[0], indentor) and re.match(crit[1], keyword):
+        #        return True
+
+        #return False
+
+    def _indent_line(self, line, stripspace=''):
+        """indent the given line according to the current indent level.
+
+        stripspace is a string of space that will be truncated from the
+        start of the line before indenting."""
+
+        return re.sub(r"^%s" % stripspace, self.indentstring
+                      * self.indent, line)
+
+    def _reset_multi_line_flags(self):
+        """reset the flags which would indicate we are in a backslashed
+        or triple-quoted section."""
+
+        self.backslashed, self.triplequoted = False, False
+
+    def _in_multi_line(self, line):
+        """return true if the given line is part of a multi-line block,
+        via backslash or triple-quote."""
+
+        # we are only looking for explicitly joined lines here, not
+        # implicit ones (i.e. brackets, braces etc.).  this is just to
+        # guard against the possibility of modifying the space inside of
+        # a literal multiline string with unfortunately placed
+        # whitespace
+
+        current_state = (self.backslashed or self.triplequoted)
+
+        if re.search(r"\\$", line):
+            self.backslashed = True
+        else:
+            self.backslashed = False
+
+        triples = len(re.findall(r"\"\"\"|\'\'\'", line))
+        if triples == 1 or triples % 2 != 0:
+            self.triplequoted = not self.triplequoted
+
+        return current_state
+
+    def _flush_adjusted_lines(self):
+        stripspace = None
+        self._reset_multi_line_flags()
+
+        for entry in self.line_buffer:
+            if self._in_multi_line(entry):
+                self.stream.write(entry + "\n")
+            else:
+                entry = entry.expandtabs()
+                if stripspace is None and re.search(r"^[ \t]*[^# \t]", entry):
+                    stripspace = re.match(r"^([ \t]*)", entry).group(1)
+                self.stream.write(self._indent_line(entry, stripspace) + "\n")
+
+        self.line_buffer = []
+        self._reset_multi_line_flags()
+
+
+def adjust_whitespace(text):
+    """remove the left-whitespace margin of a block of Python code."""
+
+    state = [False, False]
+    (backslashed, triplequoted) = (0, 1)
+
+    def in_multi_line(line):
+        start_state = (state[backslashed] or state[triplequoted])
+
+        if re.search(r"\\$", line):
+            state[backslashed] = True
+        else:
+            state[backslashed] = False
+
+        def match(reg, t):
+            m = re.match(reg, t)
+            if m:
+                return m, t[len(m.group(0)):]
+            else:
+                return None, t
+
+        while line:
+            if state[triplequoted]:
+                m, line = match(r"%s" % state[triplequoted], line)
+                if m:
+                    state[triplequoted] = False
+                else:
+                    m, line = match(r".*?(?=%s|$)" % state[triplequoted], line)
+            else:
+                m, line = match(r'#', line)
+                if m:
+                    return start_state
+
+                m, line = match(r"\"\"\"|\'\'\'", line)
+                if m:
+                    state[triplequoted] = m.group(0)
+                    continue
+
+                m, line = match(r".*?(?=\"\"\"|\'\'\'|#|$)", line)
+
+        return start_state
+
+    def _indent_line(line, stripspace = ''):
+        return re.sub(r"^%s" % stripspace, '', line)
+
+    lines = []
+    stripspace = None
+
+    for line in re.split(r'\r?\n', text):
+        if in_multi_line(line):
+            lines.append(line)
+        else:
+            line = line.expandtabs()
+            if stripspace is None and re.search(r"^[ \t]*[^# \t]", line):
+                stripspace = re.match(r"^([ \t]*)", line).group(1)
+            lines.append(_indent_line(line, stripspace))
+    return "\n".join(lines)
diff --git a/lib/Mako-0.7.3/mako/pyparser.py b/lib/Mako-0.7.3/mako/pyparser.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/pyparser.py
@@ -0,0 +1,551 @@
+# mako/pyparser.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""Handles parsing of Python code.
+
+Parsing to AST is done via _ast on Python > 2.5, otherwise the compiler
+module is used.
+"""
+
+from StringIO import StringIO
+from mako import exceptions, util
+import operator
+
+if util.py3k:
+    # words that cannot be assigned to (notably
+    # smaller than the total keys in __builtins__)
+    reserved = set(['True', 'False', 'None', 'print'])
+
+    # the "id" attribute on a function node
+    arg_id = operator.attrgetter('arg')
+else:
+    # words that cannot be assigned to (notably
+    # smaller than the total keys in __builtins__)
+    reserved = set(['True', 'False', 'None'])
+
+    # the "id" attribute on a function node
+    arg_id = operator.attrgetter('id')
+
+
+try:
+    import _ast
+    util.restore__ast(_ast)
+    import _ast_util
+except ImportError:
+    _ast = None
+    from compiler import parse as compiler_parse
+    from compiler import visitor
+
+
+def parse(code, mode='exec', **exception_kwargs):
+    """Parse an expression into AST"""
+
+
+    try:
+        if _ast:
+            return _ast_util.parse(code, '<unknown>', mode)
+        else:
+            if isinstance(code, unicode):
+                code = code.encode('ascii', 'backslashreplace')
+            return compiler_parse(code, mode)
+    except Exception, e:
+        raise exceptions.SyntaxException(
+                    "(%s) %s (%r)" % (
+                        e.__class__.__name__,
+                        e,
+                        code[0:50]
+                    ), **exception_kwargs)
+
+
+if _ast:
+    class FindIdentifiers(_ast_util.NodeVisitor):
+
+        def __init__(self, listener, **exception_kwargs):
+            self.in_function = False
+            self.in_assign_targets = False
+            self.local_ident_stack = set()
+            self.listener = listener
+            self.exception_kwargs = exception_kwargs
+
+        def _add_declared(self, name):
+            if not self.in_function:
+                self.listener.declared_identifiers.add(name)
+            else:
+                self.local_ident_stack.add(name)
+
+        def visit_ClassDef(self, node):
+            self._add_declared(node.name)
+
+        def visit_Assign(self, node):
+
+            # flip around the visiting of Assign so the expression gets
+            # evaluated first, in the case of a clause like "x=x+5" (x
+            # is undeclared)
+
+            self.visit(node.value)
+            in_a = self.in_assign_targets
+            self.in_assign_targets = True
+            for n in node.targets:
+                self.visit(n)
+            self.in_assign_targets = in_a
+
+        if util.py3k:
+
+            # ExceptHandler is in Python 2, but this block only works in
+            # Python 3 (and is required there)
+
+            def visit_ExceptHandler(self, node):
+                if node.name is not None:
+                    self._add_declared(node.name)
+                if node.type is not None:
+                    self.listener.undeclared_identifiers.add(node.type.id)
+                for statement in node.body:
+                    self.visit(statement)
+
+        def visit_Lambda(self, node, *args):
+            self._visit_function(node, True)
+
+        def visit_FunctionDef(self, node):
+            self._add_declared(node.name)
+            self._visit_function(node, False)
+
+        def _expand_tuples(self, args):
+            for arg in args:
+                if isinstance(arg, _ast.Tuple):
+                    for n in arg.elts:
+                        yield n
+                else:
+                    yield arg
+
+        def _visit_function(self, node, islambda):
+
+            # push function state onto stack.  dont log any more
+            # identifiers as "declared" until outside of the function,
+            # but keep logging identifiers as "undeclared". track
+            # argument names in each function header so they arent
+            # counted as "undeclared"
+
+            inf = self.in_function
+            self.in_function = True
+
+            local_ident_stack = self.local_ident_stack
+            self.local_ident_stack = local_ident_stack.union([
+                arg_id(arg) for arg in self._expand_tuples(node.args.args)
+            ])
+            if islambda:
+                self.visit(node.body)
+            else:
+                for n in node.body:
+                    self.visit(n)
+            self.in_function = inf
+            self.local_ident_stack = local_ident_stack
+
+        def visit_For(self, node):
+
+            # flip around visit
+
+            self.visit(node.iter)
+            self.visit(node.target)
+            for statement in node.body:
+                self.visit(statement)
+            for statement in node.orelse:
+                self.visit(statement)
+
+        def visit_Name(self, node):
+            if isinstance(node.ctx, _ast.Store):
+                # this is eqiuvalent to visit_AssName in
+                # compiler
+                self._add_declared(node.id)
+            elif node.id not in reserved and node.id \
+                not in self.listener.declared_identifiers and node.id \
+                not in self.local_ident_stack:
+                self.listener.undeclared_identifiers.add(node.id)
+
+        def visit_Import(self, node):
+            for name in node.names:
+                if name.asname is not None:
+                    self._add_declared(name.asname)
+                else:
+                    self._add_declared(name.name.split('.')[0])
+
+        def visit_ImportFrom(self, node):
+            for name in node.names:
+                if name.asname is not None:
+                    self._add_declared(name.asname)
+                else:
+                    if name.name == '*':
+                        raise exceptions.CompileException(
+                          "'import *' is not supported, since all identifier "
+                          "names must be explicitly declared.  Please use the "
+                          "form 'from <modulename> import <name1>, <name2>, "
+                          "...' instead.", **self.exception_kwargs)
+                    self._add_declared(name.name)
+
+
+    class FindTuple(_ast_util.NodeVisitor):
+
+        def __init__(self, listener, code_factory, **exception_kwargs):
+            self.listener = listener
+            self.exception_kwargs = exception_kwargs
+            self.code_factory = code_factory
+
+        def visit_Tuple(self, node):
+            for n in node.elts:
+                p = self.code_factory(n, **self.exception_kwargs)
+                self.listener.codeargs.append(p)
+                self.listener.args.append(ExpressionGenerator(n).value())
+                self.listener.declared_identifiers = \
+                    self.listener.declared_identifiers.union(
+                                                    p.declared_identifiers)
+                self.listener.undeclared_identifiers = \
+                    self.listener.undeclared_identifiers.union(
+                                                    p.undeclared_identifiers)
+
+
+    class ParseFunc(_ast_util.NodeVisitor):
+
+        def __init__(self, listener, **exception_kwargs):
+            self.listener = listener
+            self.exception_kwargs = exception_kwargs
+
+        def visit_FunctionDef(self, node):
+            self.listener.funcname = node.name
+            argnames = [arg_id(arg) for arg in node.args.args]
+            if node.args.vararg:
+                argnames.append(node.args.vararg)
+            if node.args.kwarg:
+                argnames.append(node.args.kwarg)
+            self.listener.argnames = argnames
+            self.listener.defaults = node.args.defaults  # ast
+            self.listener.varargs = node.args.vararg
+            self.listener.kwargs = node.args.kwarg
+
+
+    class ExpressionGenerator(object):
+
+        def __init__(self, astnode):
+            self.generator = _ast_util.SourceGenerator(' ' * 4)
+            self.generator.visit(astnode)
+
+        def value(self):
+            return ''.join(self.generator.result)
+else:
+    class FindIdentifiers(object):
+
+        def __init__(self, listener, **exception_kwargs):
+            self.in_function = False
+            self.local_ident_stack = set()
+            self.listener = listener
+            self.exception_kwargs = exception_kwargs
+
+        def _add_declared(self, name):
+            if not self.in_function:
+                self.listener.declared_identifiers.add(name)
+            else:
+                self.local_ident_stack.add(name)
+
+        def visitClass(self, node, *args):
+            self._add_declared(node.name)
+
+        def visitAssName(self, node, *args):
+            self._add_declared(node.name)
+
+        def visitAssign(self, node, *args):
+
+            # flip around the visiting of Assign so the expression gets
+            # evaluated first, in the case of a clause like "x=x+5" (x
+            # is undeclared)
+            self.visit(node.expr, *args)
+            for n in node.nodes:
+                self.visit(n, *args)
+
+        def visitLambda(self, node, *args):
+            self._visit_function(node, args)
+
+        def visitFunction(self, node, *args):
+            self._add_declared(node.name)
+            self._visit_function(node, args)
+
+        def _expand_tuples(self, args):
+            for arg in args:
+                if isinstance(arg, tuple):
+                    for n in arg:
+                        yield n
+                else:
+                    yield arg
+
+        def _visit_function(self, node, args):
+
+            # push function state onto stack.  dont log any more
+            # identifiers as "declared" until outside of the function,
+            # but keep logging identifiers as "undeclared". track
+            # argument names in each function header so they arent
+            # counted as "undeclared"
+
+            inf = self.in_function
+            self.in_function = True
+
+            local_ident_stack = self.local_ident_stack
+            self.local_ident_stack = local_ident_stack.union([
+                arg for arg in self._expand_tuples(node.argnames)
+            ])
+
+            for n in node.getChildNodes():
+                self.visit(n, *args)
+            self.in_function = inf
+            self.local_ident_stack = local_ident_stack
+
+        def visitFor(self, node, *args):
+
+            # flip around visit
+
+            self.visit(node.list, *args)
+            self.visit(node.assign, *args)
+            self.visit(node.body, *args)
+
+        def visitName(self, node, *args):
+            if node.name not in reserved and node.name \
+                not in self.listener.declared_identifiers and node.name \
+                not in self.local_ident_stack:
+                self.listener.undeclared_identifiers.add(node.name)
+
+        def visitImport(self, node, *args):
+            for mod, alias in node.names:
+                if alias is not None:
+                    self._add_declared(alias)
+                else:
+                    self._add_declared(mod.split('.')[0])
+
+        def visitFrom(self, node, *args):
+            for mod, alias in node.names:
+                if alias is not None:
+                    self._add_declared(alias)
+                else:
+                    if mod == '*':
+                        raise exceptions.CompileException(
+                        "'import *' is not supported, since all identifier "
+                        "names must be explicitly declared.  Please use the "
+                        "form 'from <modulename> import <name1>, <name2>, "
+                        "...' instead.", **self.exception_kwargs)
+                    self._add_declared(mod)
+
+        def visit(self, expr):
+            visitor.walk(expr, self)  # , walker=walker())
+
+
+    class FindTuple(object):
+
+        def __init__(self, listener, code_factory, **exception_kwargs):
+            self.listener = listener
+            self.exception_kwargs = exception_kwargs
+            self.code_factory = code_factory
+
+        def visitTuple(self, node, *args):
+            for n in node.nodes:
+                p = self.code_factory(n, **self.exception_kwargs)
+                self.listener.codeargs.append(p)
+                self.listener.args.append(ExpressionGenerator(n).value())
+                self.listener.declared_identifiers = \
+                    self.listener.declared_identifiers.union(
+                                                      p.declared_identifiers)
+                self.listener.undeclared_identifiers = \
+                    self.listener.undeclared_identifiers.union(
+                                                      p.undeclared_identifiers)
+
+        def visit(self, expr):
+            visitor.walk(expr, self)  # , walker=walker())
+
+
+    class ParseFunc(object):
+
+        def __init__(self, listener, **exception_kwargs):
+            self.listener = listener
+            self.exception_kwargs = exception_kwargs
+
+        def visitFunction(self, node, *args):
+            self.listener.funcname = node.name
+            self.listener.argnames = node.argnames
+            self.listener.defaults = node.defaults
+            self.listener.varargs = node.varargs
+            self.listener.kwargs = node.kwargs
+
+        def visit(self, expr):
+            visitor.walk(expr, self)
+
+
+    class ExpressionGenerator(object):
+
+        """given an AST node, generates an equivalent literal Python
+        expression."""
+
+        def __init__(self, astnode):
+            self.buf = StringIO()
+            visitor.walk(astnode, self)  # , walker=walker())
+
+        def value(self):
+            return self.buf.getvalue()
+
+        def operator(self, op, node, *args):
+            self.buf.write('(')
+            self.visit(node.left, *args)
+            self.buf.write(' %s ' % op)
+            self.visit(node.right, *args)
+            self.buf.write(')')
+
+        def booleanop(self, op, node, *args):
+            self.visit(node.nodes[0])
+            for n in node.nodes[1:]:
+                self.buf.write(' ' + op + ' ')
+                self.visit(n, *args)
+
+        def visitConst(self, node, *args):
+            self.buf.write(repr(node.value))
+
+        def visitAssName(self, node, *args):
+
+            # TODO: figure out OP_ASSIGN, other OP_s
+
+            self.buf.write(node.name)
+
+        def visitName(self, node, *args):
+            self.buf.write(node.name)
+
+        def visitMul(self, node, *args):
+            self.operator('*', node, *args)
+
+        def visitAnd(self, node, *args):
+            self.booleanop('and', node, *args)
+
+        def visitOr(self, node, *args):
+            self.booleanop('or', node, *args)
+
+        def visitBitand(self, node, *args):
+            self.booleanop('&', node, *args)
+
+        def visitBitor(self, node, *args):
+            self.booleanop('|', node, *args)
+
+        def visitBitxor(self, node, *args):
+            self.booleanop('^', node, *args)
+
+        def visitAdd(self, node, *args):
+            self.operator('+', node, *args)
+
+        def visitGetattr(self, node, *args):
+            self.visit(node.expr, *args)
+            self.buf.write('.%s' % node.attrname)
+
+        def visitSub(self, node, *args):
+            self.operator('-', node, *args)
+
+        def visitNot(self, node, *args):
+            self.buf.write('not ')
+            self.visit(node.expr)
+
+        def visitDiv(self, node, *args):
+            self.operator('/', node, *args)
+
+        def visitFloorDiv(self, node, *args):
+            self.operator('//', node, *args)
+
+        def visitSubscript(self, node, *args):
+            self.visit(node.expr)
+            self.buf.write('[')
+            [self.visit(x) for x in node.subs]
+            self.buf.write(']')
+
+        def visitUnarySub(self, node, *args):
+            self.buf.write('-')
+            self.visit(node.expr)
+
+        def visitUnaryAdd(self, node, *args):
+            self.buf.write('-')
+            self.visit(node.expr)
+
+        def visitSlice(self, node, *args):
+            self.visit(node.expr)
+            self.buf.write('[')
+            if node.lower is not None:
+                self.visit(node.lower)
+            self.buf.write(':')
+            if node.upper is not None:
+                self.visit(node.upper)
+            self.buf.write(']')
+
+        def visitDict(self, node):
+            self.buf.write('{')
+            c = node.getChildren()
+            for i in range(0, len(c), 2):
+                self.visit(c[i])
+                self.buf.write(': ')
+                self.visit(c[i + 1])
+                if i < len(c) - 2:
+                    self.buf.write(', ')
+            self.buf.write('}')
+
+        def visitTuple(self, node):
+            self.buf.write('(')
+            c = node.getChildren()
+            for i in range(0, len(c)):
+                self.visit(c[i])
+                if i < len(c) - 1:
+                    self.buf.write(', ')
+            self.buf.write(')')
+
+        def visitList(self, node):
+            self.buf.write('[')
+            c = node.getChildren()
+            for i in range(0, len(c)):
+                self.visit(c[i])
+                if i < len(c) - 1:
+                    self.buf.write(', ')
+            self.buf.write(']')
+
+        def visitListComp(self, node):
+            self.buf.write('[')
+            self.visit(node.expr)
+            self.buf.write(' ')
+            for n in node.quals:
+                self.visit(n)
+            self.buf.write(']')
+
+        def visitListCompFor(self, node):
+            self.buf.write(' for ')
+            self.visit(node.assign)
+            self.buf.write(' in ')
+            self.visit(node.list)
+            for n in node.ifs:
+                self.visit(n)
+
+        def visitListCompIf(self, node):
+            self.buf.write(' if ')
+            self.visit(node.test)
+
+        def visitCompare(self, node):
+            self.visit(node.expr)
+            for tup in node.ops:
+                self.buf.write(tup[0])
+                self.visit(tup[1])
+
+        def visitCallFunc(self, node, *args):
+            self.visit(node.node)
+            self.buf.write('(')
+            if len(node.args):
+                self.visit(node.args[0])
+                for a in node.args[1:]:
+                    self.buf.write(', ')
+                    self.visit(a)
+            self.buf.write(')')
+
+
+    class walker(visitor.ASTVisitor):
+
+        def dispatch(self, node, *args):
+            print 'Node:', str(node)
+
+            # print "dir:", dir(node)
+
+            return visitor.ASTVisitor.dispatch(self, node, *args)
diff --git a/lib/Mako-0.7.3/mako/runtime.py b/lib/Mako-0.7.3/mako/runtime.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/runtime.py
@@ -0,0 +1,841 @@
+# mako/runtime.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""provides runtime services for templates, including Context,
+Namespace, and various helper functions."""
+
+from mako import exceptions, util
+import __builtin__, inspect, sys
+
+
+class Context(object):
+    """Provides runtime namespace, output buffer, and various
+    callstacks for templates.
+
+    See :ref:`runtime_toplevel` for detail on the usage of
+    :class:`.Context`.
+
+     """
+
+    def __init__(self, buffer, **data):
+        self._buffer_stack = [buffer]
+
+        self._data = data
+
+        self._kwargs = data.copy()
+        self._with_template = None
+        self._outputting_as_unicode = None
+        self.namespaces = {}
+
+        # "capture" function which proxies to the
+        # generic "capture" function
+        self._data['capture'] = util.partial(capture, self)
+
+        # "caller" stack used by def calls with content
+        self.caller_stack = self._data['caller'] = CallerStack()
+
+    def _set_with_template(self, t):
+        self._with_template = t
+        illegal_names = t.reserved_names.intersection(self._data)
+        if illegal_names:
+            raise exceptions.NameConflictError(
+                "Reserved words passed to render(): %s" %
+                ", ".join(illegal_names))
+
+    @property
+    def lookup(self):
+        """Return the :class:`.TemplateLookup` associated
+        with this :class:`.Context`.
+
+        """
+        return self._with_template.lookup
+
+    @property
+    def kwargs(self):
+        """Return the dictionary of keyword arguments associated with this
+        :class:`.Context`.
+
+        """
+        return self._kwargs.copy()
+
+    def push_caller(self, caller):
+        """Push a ``caller`` callable onto the callstack for
+        this :class:`.Context`."""
+
+
+        self.caller_stack.append(caller)
+
+    def pop_caller(self):
+        """Pop a ``caller`` callable onto the callstack for this
+        :class:`.Context`."""
+
+        del self.caller_stack[-1]
+
+    def keys(self):
+        """Return a list of all names established in this :class:`.Context`."""
+
+        return self._data.keys()
+
+    def __getitem__(self, key):
+        if key in self._data:
+            return self._data[key]
+        else:
+            return __builtin__.__dict__[key]
+
+    def _push_writer(self):
+        """push a capturing buffer onto this Context and return
+        the new writer function."""
+
+        buf = util.FastEncodingBuffer()
+        self._buffer_stack.append(buf)
+        return buf.write
+
+    def _pop_buffer_and_writer(self):
+        """pop the most recent capturing buffer from this Context
+        and return the current writer after the pop.
+
+        """
+
+        buf = self._buffer_stack.pop()
+        return buf, self._buffer_stack[-1].write
+
+    def _push_buffer(self):
+        """push a capturing buffer onto this Context."""
+
+        self._push_writer()
+
+    def _pop_buffer(self):
+        """pop the most recent capturing buffer from this Context."""
+
+        return self._buffer_stack.pop()
+
+    def get(self, key, default=None):
+        """Return a value from this :class:`.Context`."""
+
+        return self._data.get(key,
+                __builtin__.__dict__.get(key, default)
+                )
+
+    def write(self, string):
+        """Write a string to this :class:`.Context` object's
+        underlying output buffer."""
+
+        self._buffer_stack[-1].write(string)
+
+    def writer(self):
+        """Return the current writer function."""
+
+        return self._buffer_stack[-1].write
+
+    def _copy(self):
+        c = Context.__new__(Context)
+        c._buffer_stack = self._buffer_stack
+        c._data = self._data.copy()
+        c._kwargs = self._kwargs
+        c._with_template = self._with_template
+        c._outputting_as_unicode = self._outputting_as_unicode
+        c.namespaces = self.namespaces
+        c.caller_stack = self.caller_stack
+        return c
+
+    def locals_(self, d):
+        """Create a new :class:`.Context` with a copy of this
+        :class:`.Context`'s current state, updated with the given dictionary."""
+
+        if len(d) == 0:
+            return self
+        c = self._copy()
+        c._data.update(d)
+        return c
+
+    def _clean_inheritance_tokens(self):
+        """create a new copy of this :class:`.Context`. with
+        tokens related to inheritance state removed."""
+
+        c = self._copy()
+        x = c._data
+        x.pop('self', None)
+        x.pop('parent', None)
+        x.pop('next', None)
+        return c
+
+class CallerStack(list):
+    def __init__(self):
+        self.nextcaller = None
+    def __nonzero__(self):
+        return self._get_caller() and True or False
+    def _get_caller(self):
+        # this method can be removed once
+        # codegen MAGIC_NUMBER moves past 7
+        return self[-1]
+    def __getattr__(self, key):
+        return getattr(self._get_caller(), key)
+    def _push_frame(self):
+        frame = self.nextcaller or None
+        self.append(frame)
+        self.nextcaller = None
+        return frame
+    def _pop_frame(self):
+        self.nextcaller = self.pop()
+
+
+class Undefined(object):
+    """Represents an undefined value in a template.
+
+    All template modules have a constant value
+    ``UNDEFINED`` present which is an instance of this
+    object.
+
+    """
+    def __str__(self):
+        raise NameError("Undefined")
+    def __nonzero__(self):
+        return False
+
+UNDEFINED = Undefined()
+
+class LoopStack(object):
+    """a stack for LoopContexts that implements the context manager protocol
+    to automatically pop off the top of the stack on context exit
+    """
+
+    def __init__(self):
+        self.stack = []
+
+    def _enter(self, iterable):
+        self._push(iterable)
+        return self._top
+
+    def _exit(self):
+        self._pop()
+        return self._top
+
+    @property
+    def _top(self):
+        if self.stack:
+            return self.stack[-1]
+        else:
+            return self
+
+    def _pop(self):
+        return self.stack.pop()
+
+    def _push(self, iterable):
+        new = LoopContext(iterable)
+        if self.stack:
+            new.parent = self.stack[-1]
+        return self.stack.append(new)
+
+    def __getattr__(self, key):
+        raise exceptions.RuntimeException("No loop context is established")
+
+    def __iter__(self):
+        return iter(self._top)
+
+
+class LoopContext(object):
+    """A magic loop variable.
+    Automatically accessible in any ``% for`` block.
+
+    See the section :ref:`loop_context` for usage
+    notes.
+
+    :attr:`parent` -> :class:`.LoopContext` or ``None``
+        The parent loop, if one exists.
+    :attr:`index` -> `int`
+        The 0-based iteration count.
+    :attr:`reverse_index` -> `int`
+        The number of iterations remaining.
+    :attr:`first` -> `bool`
+        ``True`` on the first iteration, ``False`` otherwise.
+    :attr:`last` -> `bool`
+        ``True`` on the last iteration, ``False`` otherwise.
+    :attr:`even` -> `bool`
+        ``True`` when ``index`` is even.
+    :attr:`odd` -> `bool`
+        ``True`` when ``index`` is odd.
+    """
+
+    def __init__(self, iterable):
+        self._iterable = iterable
+        self.index = 0
+        self.parent = None
+
+    def __iter__(self):
+        for i in self._iterable:
+            yield i
+            self.index += 1
+
+    @util.memoized_instancemethod
+    def __len__(self):
+        return len(self._iterable)
+
+    @property
+    def reverse_index(self):
+        return len(self) - self.index - 1
+
+    @property
+    def first(self):
+        return self.index == 0
+
+    @property
+    def last(self):
+        return self.index == len(self) - 1
+
+    @property
+    def even(self):
+        return not self.odd
+
+    @property
+    def odd(self):
+        return bool(self.index % 2)
+
+    def cycle(self, *values):
+        """Cycle through values as the loop progresses.
+        """
+        if not values:
+            raise ValueError("You must provide values to cycle through")
+        return values[self.index % len(values)]
+
+
+class _NSAttr(object):
+    def __init__(self, parent):
+        self.__parent = parent
+    def __getattr__(self, key):
+        ns = self.__parent
+        while ns:
+            if hasattr(ns.module, key):
+                return getattr(ns.module, key)
+            else:
+                ns = ns.inherits
+        raise AttributeError(key)
+
+class Namespace(object):
+    """Provides access to collections of rendering methods, which
+      can be local, from other templates, or from imported modules.
+
+      To access a particular rendering method referenced by a
+      :class:`.Namespace`, use plain attribute access:
+
+      .. sourcecode:: mako
+
+        ${some_namespace.foo(x, y, z)}
+
+      :class:`.Namespace` also contains several built-in attributes
+      described here.
+
+      """
+
+    def __init__(self, name, context,
+                            callables=None, inherits=None,
+                            populate_self=True, calling_uri=None):
+        self.name = name
+        self.context = context
+        self.inherits = inherits
+        if callables is not None:
+            self.callables = dict([(c.func_name, c) for c in callables])
+
+    callables = ()
+
+    module = None
+    """The Python module referenced by this :class:`.Namespace`.
+
+    If the namespace references a :class:`.Template`, then
+    this module is the equivalent of ``template.module``,
+    i.e. the generated module for the template.
+
+    """
+
+    template = None
+    """The :class:`.Template` object referenced by this
+        :class:`.Namespace`, if any.
+
+    """
+
+    context = None
+    """The :class:`.Context` object for this :class:`.Namespace`.
+
+    Namespaces are often created with copies of contexts that
+    contain slightly different data, particularly in inheritance
+    scenarios. Using the :class:`.Context` off of a :class:`.Namespace` one
+    can traverse an entire chain of templates that inherit from
+    one-another.
+
+    """
+
+    filename = None
+    """The path of the filesystem file used for this
+    :class:`.Namespace`'s module or template.
+
+    If this is a pure module-based
+    :class:`.Namespace`, this evaluates to ``module.__file__``. If a
+    template-based namespace, it evaluates to the original
+    template file location.
+
+    """
+
+    uri = None
+    """The URI for this :class:`.Namespace`'s template.
+
+    I.e. whatever was sent to :meth:`.TemplateLookup.get_template()`.
+
+    This is the equivalent of :attr:`.Template.uri`.
+
+    """
+
+    _templateuri = None
+
+    @util.memoized_property
+    def attr(self):
+        """Access module level attributes by name.
+
+        This accessor allows templates to supply "scalar"
+        attributes which are particularly handy in inheritance
+        relationships. See the example in
+        :ref:`inheritance_toplevel`.
+
+        """
+        return _NSAttr(self)
+
+    def get_namespace(self, uri):
+        """Return a :class:`.Namespace` corresponding to the given ``uri``.
+
+        If the given ``uri`` is a relative URI (i.e. it does not
+        contain a leading slash ``/``), the ``uri`` is adjusted to
+        be relative to the ``uri`` of the namespace itself. This
+        method is therefore mostly useful off of the built-in
+        ``local`` namespace, described in :ref:`namespace_local`.
+
+        In
+        most cases, a template wouldn't need this function, and
+        should instead use the ``<%namespace>`` tag to load
+        namespaces. However, since all ``<%namespace>`` tags are
+        evaluated before the body of a template ever runs,
+        this method can be used to locate namespaces using
+        expressions that were generated within the body code of
+        the template, or to conditionally use a particular
+        namespace.
+
+        """
+        key = (self, uri)
+        if key in self.context.namespaces:
+            return self.context.namespaces[key]
+        else:
+            ns = TemplateNamespace(uri, self.context._copy(),
+                                templateuri=uri,
+                                calling_uri=self._templateuri)
+            self.context.namespaces[key] = ns
+            return ns
+
+    def get_template(self, uri):
+        """Return a :class:`.Template` from the given ``uri``.
+
+        The ``uri`` resolution is relative to the ``uri`` of this :class:`.Namespace`
+        object's :class:`.Template`.
+
+        """
+        return _lookup_template(self.context, uri, self._templateuri)
+
+    def get_cached(self, key, **kwargs):
+        """Return a value from the :class:`.Cache` referenced by this
+        :class:`.Namespace` object's :class:`.Template`.
+
+        The advantage to this method versus direct access to the
+        :class:`.Cache` is that the configuration parameters
+        declared in ``<%page>`` take effect here, thereby calling
+        up the same configured backend as that configured
+        by ``<%page>``.
+
+        """
+
+        return self.cache.get(key, **kwargs)
+
+    @property
+    def cache(self):
+        """Return the :class:`.Cache` object referenced
+        by this :class:`.Namespace` object's
+        :class:`.Template`.
+
+        """
+        return self.template.cache
+
+    def include_file(self, uri, **kwargs):
+        """Include a file at the given ``uri``."""
+
+        _include_file(self.context, uri, self._templateuri, **kwargs)
+
+    def _populate(self, d, l):
+        for ident in l:
+            if ident == '*':
+                for (k, v) in self._get_star():
+                    d[k] = v
+            else:
+                d[ident] = getattr(self, ident)
+
+    def _get_star(self):
+        if self.callables:
+            for key in self.callables:
+                yield (key, self.callables[key])
+
+    def __getattr__(self, key):
+        if key in self.callables:
+            val = self.callables[key]
+        elif self.inherits:
+            val = getattr(self.inherits, key)
+        else:
+            raise AttributeError(
+                    "Namespace '%s' has no member '%s'" %
+                    (self.name, key))
+        setattr(self, key, val)
+        return val
+
+class TemplateNamespace(Namespace):
+    """A :class:`.Namespace` specific to a :class:`.Template` instance."""
+
+    def __init__(self, name, context, template=None, templateuri=None,
+                            callables=None, inherits=None,
+                            populate_self=True, calling_uri=None):
+        self.name = name
+        self.context = context
+        self.inherits = inherits
+        if callables is not None:
+            self.callables = dict([(c.func_name, c) for c in callables])
+
+        if templateuri is not None:
+            self.template = _lookup_template(context, templateuri,
+                                                calling_uri)
+            self._templateuri = self.template.module._template_uri
+        elif template is not None:
+            self.template = template
+            self._templateuri = template.module._template_uri
+        else:
+            raise TypeError("'template' argument is required.")
+
+        if populate_self:
+            lclcallable, lclcontext = \
+                        _populate_self_namespace(context, self.template,
+                                                    self_ns=self)
+
+    @property
+    def module(self):
+        """The Python module referenced by this :class:`.Namespace`.
+
+        If the namespace references a :class:`.Template`, then
+        this module is the equivalent of ``template.module``,
+        i.e. the generated module for the template.
+
+        """
+        return self.template.module
+
+    @property
+    def filename(self):
+        """The path of the filesystem file used for this
+        :class:`.Namespace`'s module or template.
+        """
+        return self.template.filename
+
+    @property
+    def uri(self):
+        """The URI for this :class:`.Namespace`'s template.
+
+        I.e. whatever was sent to :meth:`.TemplateLookup.get_template()`.
+
+        This is the equivalent of :attr:`.Template.uri`.
+
+        """
+        return self.template.uri
+
+    def _get_star(self):
+        if self.callables:
+            for key in self.callables:
+                yield (key, self.callables[key])
+        def get(key):
+            callable_ = self.template._get_def_callable(key)
+            return util.partial(callable_, self.context)
+        for k in self.template.module._exports:
+            yield (k, get(k))
+
+    def __getattr__(self, key):
+        if key in self.callables:
+            val = self.callables[key]
+        elif self.template.has_def(key):
+            callable_ = self.template._get_def_callable(key)
+            val = util.partial(callable_, self.context)
+        elif self.inherits:
+            val = getattr(self.inherits, key)
+
+        else:
+            raise AttributeError(
+                    "Namespace '%s' has no member '%s'" %
+                    (self.name, key))
+        setattr(self, key, val)
+        return val
+
+class ModuleNamespace(Namespace):
+    """A :class:`.Namespace` specific to a Python module instance."""
+
+    def __init__(self, name, context, module,
+                            callables=None, inherits=None,
+                            populate_self=True, calling_uri=None):
+        self.name = name
+        self.context = context
+        self.inherits = inherits
+        if callables is not None:
+            self.callables = dict([(c.func_name, c) for c in callables])
+
+        mod = __import__(module)
+        for token in module.split('.')[1:]:
+            mod = getattr(mod, token)
+        self.module = mod
+
+    @property
+    def filename(self):
+        """The path of the filesystem file used for this
+        :class:`.Namespace`'s module or template.
+        """
+        return self.module.__file__
+
+    def _get_star(self):
+        if self.callables:
+            for key in self.callables:
+                yield (key, self.callables[key])
+        def get(key):
+            callable_ = getattr(self.module, key)
+            return util.partial(callable_, self.context)
+        for k in dir(self.module):
+            if k[0] != '_':
+                yield (k, get(k))
+
+    def __getattr__(self, key):
+        if key in self.callables:
+            val = self.callables[key]
+        elif hasattr(self.module, key):
+            callable_ = getattr(self.module, key)
+            val = util.partial(callable_, self.context)
+        elif self.inherits:
+            val = getattr(self.inherits, key)
+        else:
+            raise AttributeError(
+                    "Namespace '%s' has no member '%s'" %
+                    (self.name, key))
+        setattr(self, key, val)
+        return val
+
+def supports_caller(func):
+    """Apply a caller_stack compatibility decorator to a plain
+    Python function.
+
+    See the example in :ref:`namespaces_python_modules`.
+
+    """
+
+    def wrap_stackframe(context,  *args, **kwargs):
+        context.caller_stack._push_frame()
+        try:
+            return func(context, *args, **kwargs)
+        finally:
+            context.caller_stack._pop_frame()
+    return wrap_stackframe
+
+def capture(context, callable_, *args, **kwargs):
+    """Execute the given template def, capturing the output into
+    a buffer.
+
+    See the example in :ref:`namespaces_python_modules`.
+
+    """
+
+    if not callable(callable_):
+        raise exceptions.RuntimeException(
+                           "capture() function expects a callable as "
+                           "its argument (i.e. capture(func, *args, **kwargs))"
+                        )
+    context._push_buffer()
+    try:
+        callable_(*args, **kwargs)
+    finally:
+        buf = context._pop_buffer()
+    return buf.getvalue()
+
+def _decorate_toplevel(fn):
+    def decorate_render(render_fn):
+        def go(context, *args, **kw):
+            def y(*args, **kw):
+                return render_fn(context, *args, **kw)
+            try:
+                y.__name__ = render_fn.__name__[7:]
+            except TypeError:
+                # < Python 2.4
+                pass
+            return fn(y)(context, *args, **kw)
+        return go
+    return decorate_render
+
+def _decorate_inline(context, fn):
+    def decorate_render(render_fn):
+        dec = fn(render_fn)
+        def go(*args, **kw):
+            return dec(context, *args, **kw)
+        return go
+    return decorate_render
+
+def _include_file(context, uri, calling_uri, **kwargs):
+    """locate the template from the given uri and include it in
+    the current output."""
+
+    template = _lookup_template(context, uri, calling_uri)
+    (callable_, ctx) = _populate_self_namespace(
+                                context._clean_inheritance_tokens(),
+                                template)
+    callable_(ctx, **_kwargs_for_include(callable_, context._data, **kwargs))
+
+def _inherit_from(context, uri, calling_uri):
+    """called by the _inherit method in template modules to set
+    up the inheritance chain at the start of a template's
+    execution."""
+
+    if uri is None:
+        return None
+    template = _lookup_template(context, uri, calling_uri)
+    self_ns = context['self']
+    ih = self_ns
+    while ih.inherits is not None:
+        ih = ih.inherits
+    lclcontext = context.locals_({'next':ih})
+    ih.inherits = TemplateNamespace("self:%s" % template.uri,
+                                lclcontext,
+                                template = template,
+                                populate_self=False)
+    context._data['parent'] = lclcontext._data['local'] = ih.inherits
+    callable_ = getattr(template.module, '_mako_inherit', None)
+    if callable_ is not None:
+        ret = callable_(template, lclcontext)
+        if ret:
+            return ret
+
+    gen_ns = getattr(template.module, '_mako_generate_namespaces', None)
+    if gen_ns is not None:
+        gen_ns(context)
+    return (template.callable_, lclcontext)
+
+def _lookup_template(context, uri, relativeto):
+    lookup = context._with_template.lookup
+    if lookup is None:
+        raise exceptions.TemplateLookupException(
+                            "Template '%s' has no TemplateLookup associated" %
+                            context._with_template.uri)
+    uri = lookup.adjust_uri(uri, relativeto)
+    try:
+        return lookup.get_template(uri)
+    except exceptions.TopLevelLookupException, e:
+        raise exceptions.TemplateLookupException(str(e))
+
+def _populate_self_namespace(context, template, self_ns=None):
+    if self_ns is None:
+        self_ns = TemplateNamespace('self:%s' % template.uri,
+                                context, template=template,
+                                populate_self=False)
+    context._data['self'] = context._data['local'] = self_ns
+    if hasattr(template.module, '_mako_inherit'):
+        ret = template.module._mako_inherit(template, context)
+        if ret:
+            return ret
+    return (template.callable_, context)
+
+def _render(template, callable_, args, data, as_unicode=False):
+    """create a Context and return the string
+    output of the given template and template callable."""
+
+    if as_unicode:
+        buf = util.FastEncodingBuffer(unicode=True)
+    elif template.bytestring_passthrough:
+        buf = util.StringIO()
+    else:
+        buf = util.FastEncodingBuffer(
+                        unicode=as_unicode,
+                        encoding=template.output_encoding,
+                        errors=template.encoding_errors)
+    context = Context(buf, **data)
+    context._outputting_as_unicode = as_unicode
+    context._set_with_template(template)
+
+    _render_context(template, callable_, context, *args,
+                            **_kwargs_for_callable(callable_, data))
+    return context._pop_buffer().getvalue()
+
+def _kwargs_for_callable(callable_, data):
+    argspec = util.inspect_func_args(callable_)
+    # for normal pages, **pageargs is usually present
+    if argspec[2]:
+        return data
+
+    # for rendering defs from the top level, figure out the args
+    namedargs = argspec[0] + [v for v in argspec[1:3] if v is not None]
+    kwargs = {}
+    for arg in namedargs:
+        if arg != 'context' and arg in data and arg not in kwargs:
+            kwargs[arg] = data[arg]
+    return kwargs
+
+def _kwargs_for_include(callable_, data, **kwargs):
+    argspec = util.inspect_func_args(callable_)
+    namedargs = argspec[0] + [v for v in argspec[1:3] if v is not None]
+    for arg in namedargs:
+        if arg != 'context' and arg in data and arg not in kwargs:
+            kwargs[arg] = data[arg]
+    return kwargs
+
+def _render_context(tmpl, callable_, context, *args, **kwargs):
+    import mako.template as template
+    # create polymorphic 'self' namespace for this
+    # template with possibly updated context
+    if not isinstance(tmpl, template.DefTemplate):
+        # if main render method, call from the base of the inheritance stack
+        (inherit, lclcontext) = _populate_self_namespace(context, tmpl)
+        _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
+    else:
+        # otherwise, call the actual rendering method specified
+        (inherit, lclcontext) = _populate_self_namespace(context, tmpl.parent)
+        _exec_template(callable_, context, args=args, kwargs=kwargs)
+
+def _exec_template(callable_, context, args=None, kwargs=None):
+    """execute a rendering callable given the callable, a
+    Context, and optional explicit arguments
+
+    the contextual Template will be located if it exists, and
+    the error handling options specified on that Template will
+    be interpreted here.
+    """
+    template = context._with_template
+    if template is not None and \
+            (template.format_exceptions or template.error_handler):
+        error = None
+        try:
+            callable_(context, *args, **kwargs)
+        except Exception, e:
+            _render_error(template, context, e)
+        except:
+            e = sys.exc_info()[0]
+            _render_error(template, context, e)
+    else:
+        callable_(context, *args, **kwargs)
+
+def _render_error(template, context, error):
+    if template.error_handler:
+        result = template.error_handler(context, error)
+        if not result:
+            raise error
+    else:
+        error_template = exceptions.html_error_template()
+        if context._outputting_as_unicode:
+            context._buffer_stack[:] = [util.FastEncodingBuffer(unicode=True)]
+        else:
+            context._buffer_stack[:] = [util.FastEncodingBuffer(
+                                            error_template.output_encoding,
+                                            error_template.encoding_errors)]
+
+        context._set_with_template(error_template)
+        error_template.render_context(context, error=error)
diff --git a/lib/Mako-0.7.3/mako/template.py b/lib/Mako-0.7.3/mako/template.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/template.py
@@ -0,0 +1,650 @@
+# mako/template.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""Provides the Template class, a facade for parsing, generating and executing
+template strings, as well as template runtime operations."""
+
+from mako.lexer import Lexer
+from mako import runtime, util, exceptions, codegen, cache
+import os, re, shutil, stat, sys, tempfile, types, weakref
+
+
+class Template(object):
+    """Represents a compiled template.
+
+    :class:`.Template` includes a reference to the original
+    template source (via the :attr:`.source` attribute)
+    as well as the source code of the
+    generated Python module (i.e. the :attr:`.code` attribute),
+    as well as a reference to an actual Python module.
+
+    :class:`.Template` is constructed using either a literal string
+    representing the template text, or a filename representing a filesystem
+    path to a source file.
+
+    :param text: textual template source.  This argument is mutually
+     exclusive versus the ``filename`` parameter.
+
+    :param filename: filename of the source template.  This argument is
+     mutually exclusive versus the ``text`` parameter.
+
+    :param buffer_filters: string list of filters to be applied
+     to the output of ``%def``\ s which are buffered, cached, or otherwise
+     filtered, after all filters
+     defined with the ``%def`` itself have been applied. Allows the
+     creation of default expression filters that let the output
+     of return-valued ``%def``\ s "opt out" of that filtering via
+     passing special attributes or objects.
+
+    :param bytestring_passthrough: When ``True``, and ``output_encoding`` is
+     set to ``None``, and :meth:`.Template.render` is used to render,
+     the `StringIO` or `cStringIO` buffer will be used instead of the
+     default "fast" buffer.   This allows raw bytestrings in the
+     output stream, such as in expressions, to pass straight
+     through to the buffer.  This flag is forced
+     to ``True`` if ``disable_unicode`` is also configured.
+
+     .. versionadded:: 0.4
+        Added to provide the same behavior as that of the previous series.
+
+    :param cache_args: Dictionary of cache configuration arguments that
+     will be passed to the :class:`.CacheImpl`.   See :ref:`caching_toplevel`.
+
+    :param cache_dir:
+
+     .. deprecated:: 0.6
+        Use the ``'dir'`` argument in the ``cache_args`` dictionary.
+        See :ref:`caching_toplevel`.
+
+    :param cache_enabled: Boolean flag which enables caching of this
+     template.  See :ref:`caching_toplevel`.
+
+    :param cache_impl: String name of a :class:`.CacheImpl` caching
+     implementation to use.   Defaults to ``'beaker'``.
+
+    :param cache_type:
+
+     .. deprecated:: 0.6
+        Use the ``'type'`` argument in the ``cache_args`` dictionary.
+        See :ref:`caching_toplevel`.
+
+    :param cache_url:
+
+     .. deprecated:: 0.6
+        Use the ``'url'`` argument in the ``cache_args`` dictionary.
+        See :ref:`caching_toplevel`.
+
+    :param default_filters: List of string filter names that will
+     be applied to all expressions.  See :ref:`filtering_default_filters`.
+
+    :param disable_unicode: Disables all awareness of Python Unicode
+     objects.  See :ref:`unicode_disabled`.
+
+    :param enable_loop: When ``True``, enable the ``loop`` context variable.
+     This can be set to ``False`` to support templates that may
+     be making usage of the name "``loop``".   Individual templates can
+     re-enable the "loop" context by placing the directive
+     ``enable_loop="True"`` inside the ``<%page>`` tag -- see
+     :ref:`migrating_loop`.
+
+    :param encoding_errors: Error parameter passed to ``encode()`` when
+     string encoding is performed. See :ref:`usage_unicode`.
+
+    :param error_handler: Python callable which is called whenever
+     compile or runtime exceptions occur. The callable is passed
+     the current context as well as the exception. If the
+     callable returns ``True``, the exception is considered to
+     be handled, else it is re-raised after the function
+     completes. Is used to provide custom error-rendering
+     functions.
+
+    :param format_exceptions: if ``True``, exceptions which occur during
+     the render phase of this template will be caught and
+     formatted into an HTML error page, which then becomes the
+     rendered result of the :meth:`.render` call. Otherwise,
+     runtime exceptions are propagated outwards.
+
+    :param imports: String list of Python statements, typically individual
+     "import" lines, which will be placed into the module level
+     preamble of all generated Python modules. See the example
+     in :ref:`filtering_default_filters`.
+
+    :param input_encoding: Encoding of the template's source code.  Can
+     be used in lieu of the coding comment. See
+     :ref:`usage_unicode` as well as :ref:`unicode_toplevel` for
+     details on source encoding.
+
+    :param lookup: a :class:`.TemplateLookup` instance that will be used
+     for all file lookups via the ``<%namespace>``,
+     ``<%include>``, and ``<%inherit>`` tags. See
+     :ref:`usage_templatelookup`.
+
+    :param module_directory: Filesystem location where generated
+     Python module files will be placed.
+
+    :param module_filename: Overrides the filename of the generated
+     Python module file. For advanced usage only.
+
+    :param module_writer: A callable which overrides how the Python
+     module is written entirely.  The callable is passed the
+     encoded source content of the module and the destination
+     path to be written to.   The default behavior of module writing
+     uses a tempfile in conjunction with a file move in order
+     to make the operation atomic.   So a user-defined module
+     writing function that mimics the default behavior would be:
+
+     .. sourcecode:: python
+
+         import tempfile
+         import os
+         import shutil
+
+         def module_writer(source, outputpath):
+             (dest, name) = \\
+                 tempfile.mkstemp(
+                     dir=os.path.dirname(outputpath)
+                 )
+
+             os.write(dest, source)
+             os.close(dest)
+             shutil.move(name, outputpath)
+
+         from mako.template import Template
+         mytemplate = Template(
+                         file="index.html",
+                         module_directory="/path/to/modules",
+                         module_writer=module_writer
+                     )
+
+     The function is provided for unusual configurations where
+     certain platform-specific permissions or other special
+     steps are needed.
+
+    :param output_encoding: The encoding to use when :meth:`.render`
+     is called.
+     See :ref:`usage_unicode` as well as :ref:`unicode_toplevel`.
+
+    :param preprocessor: Python callable which will be passed
+     the full template source before it is parsed. The return
+     result of the callable will be used as the template source
+     code.
+
+    :param strict_undefined: Replaces the automatic usage of
+     ``UNDEFINED`` for any undeclared variables not located in
+     the :class:`.Context` with an immediate raise of
+     ``NameError``. The advantage is immediate reporting of
+     missing variables which include the name.
+
+     .. versionadded:: 0.3.6
+
+    :param uri: string URI or other identifier for this template.
+     If not provided, the ``uri`` is generated from the filesystem
+     path, or from the in-memory identity of a non-file-based
+     template. The primary usage of the ``uri`` is to provide a key
+     within :class:`.TemplateLookup`, as well as to generate the
+     file path of the generated Python module file, if
+     ``module_directory`` is specified.
+
+    """
+
+    def __init__(self,
+                    text=None,
+                    filename=None,
+                    uri=None,
+                    format_exceptions=False,
+                    error_handler=None,
+                    lookup=None,
+                    output_encoding=None,
+                    encoding_errors='strict',
+                    module_directory=None,
+                    cache_args=None,
+                    cache_impl='beaker',
+                    cache_enabled=True,
+                    cache_type=None,
+                    cache_dir=None,
+                    cache_url=None,
+                    module_filename=None,
+                    input_encoding=None,
+                    disable_unicode=False,
+                    module_writer=None,
+                    bytestring_passthrough=False,
+                    default_filters=None,
+                    buffer_filters=(),
+                    strict_undefined=False,
+                    imports=None,
+                    enable_loop=True,
+                    preprocessor=None):
+        if uri:
+            self.module_id = re.sub(r'\W', "_", uri)
+            self.uri = uri
+        elif filename:
+            self.module_id = re.sub(r'\W', "_", filename)
+            drive, path = os.path.splitdrive(filename)
+            path = os.path.normpath(path).replace(os.path.sep, "/")
+            self.uri = path
+        else:
+            self.module_id = "memory:" + hex(id(self))
+            self.uri = self.module_id
+
+        u_norm = self.uri
+        if u_norm.startswith("/"):
+            u_norm = u_norm[1:]
+        u_norm = os.path.normpath(u_norm)
+        if u_norm.startswith(".."):
+            raise exceptions.TemplateLookupException(
+                    "Template uri \"%s\" is invalid - "
+                    "it cannot be relative outside "
+                    "of the root path." % self.uri)
+
+        self.input_encoding = input_encoding
+        self.output_encoding = output_encoding
+        self.encoding_errors = encoding_errors
+        self.disable_unicode = disable_unicode
+        self.bytestring_passthrough = bytestring_passthrough or disable_unicode
+        self.enable_loop = enable_loop
+        self.strict_undefined = strict_undefined
+        self.module_writer = module_writer
+
+        if util.py3k and disable_unicode:
+            raise exceptions.UnsupportedError(
+                                    "Mako for Python 3 does not "
+                                    "support disabling Unicode")
+        elif output_encoding and disable_unicode:
+            raise exceptions.UnsupportedError(
+                                    "output_encoding must be set to "
+                                    "None when disable_unicode is used.")
+        if default_filters is None:
+            if util.py3k or self.disable_unicode:
+                self.default_filters = ['str']
+            else:
+                self.default_filters = ['unicode']
+        else:
+            self.default_filters = default_filters
+        self.buffer_filters = buffer_filters
+
+        self.imports = imports
+        self.preprocessor = preprocessor
+
+        # if plain text, compile code in memory only
+        if text is not None:
+            (code, module) = _compile_text(self, text, filename)
+            self._code = code
+            self._source = text
+            ModuleInfo(module, None, self, filename, code, text)
+        elif filename is not None:
+            # if template filename and a module directory, load
+            # a filesystem-based module file, generating if needed
+            if module_filename is not None:
+                path = module_filename
+            elif module_directory is not None:
+                path = os.path.abspath(
+                        os.path.join(
+                            os.path.normpath(module_directory),
+                            u_norm + ".py"
+                            )
+                        )
+            else:
+                path = None
+            module = self._compile_from_file(path, filename)
+        else:
+            raise exceptions.RuntimeException(
+                                "Template requires text or filename")
+
+        self.module = module
+        self.filename = filename
+        self.callable_ = self.module.render_body
+        self.format_exceptions = format_exceptions
+        self.error_handler = error_handler
+        self.lookup = lookup
+
+        self.module_directory = module_directory
+
+        self._setup_cache_args(
+            cache_impl, cache_enabled, cache_args,
+            cache_type, cache_dir, cache_url
+        )
+
+    @util.memoized_property
+    def reserved_names(self):
+        if self.enable_loop:
+            return codegen.RESERVED_NAMES
+        else:
+            return codegen.RESERVED_NAMES.difference(['loop'])
+
+    def _setup_cache_args(self,
+                cache_impl, cache_enabled, cache_args,
+                cache_type, cache_dir, cache_url):
+        self.cache_impl = cache_impl
+        self.cache_enabled = cache_enabled
+        if cache_args:
+            self.cache_args = cache_args
+        else:
+            self.cache_args = {}
+
+        # transfer deprecated cache_* args
+        if cache_type:
+            self.cache_args['type'] = cache_type
+        if cache_dir:
+            self.cache_args['dir'] = cache_dir
+        if cache_url:
+            self.cache_args['url'] = cache_url
+
+    def _compile_from_file(self, path, filename):
+        if path is not None:
+            util.verify_directory(os.path.dirname(path))
+            filemtime = os.stat(filename)[stat.ST_MTIME]
+            if not os.path.exists(path) or \
+                        os.stat(path)[stat.ST_MTIME] < filemtime:
+                data = util.read_file(filename)
+                _compile_module_file(
+                            self,
+                            data,
+                            filename,
+                            path,
+                            self.module_writer)
+            module = util.load_module(self.module_id, path)
+            del sys.modules[self.module_id]
+            if module._magic_number != codegen.MAGIC_NUMBER:
+                data = util.read_file(filename)
+                _compile_module_file(
+                            self,
+                            data,
+                            filename,
+                            path,
+                            self.module_writer)
+                module = util.load_module(self.module_id, path)
+                del sys.modules[self.module_id]
+            ModuleInfo(module, path, self, filename, None, None)
+        else:
+            # template filename and no module directory, compile code
+            # in memory
+            data = util.read_file(filename)
+            code, module = _compile_text(
+                                self,
+                                data,
+                                filename)
+            self._source = None
+            self._code = code
+            ModuleInfo(module, None, self, filename, code, None)
+        return module
+
+    @property
+    def source(self):
+        """Return the template source code for this :class:`.Template`."""
+
+        return _get_module_info_from_callable(self.callable_).source
+
+    @property
+    def code(self):
+        """Return the module source code for this :class:`.Template`."""
+
+        return _get_module_info_from_callable(self.callable_).code
+
+    @util.memoized_property
+    def cache(self):
+        return cache.Cache(self)
+
+    @property
+    def cache_dir(self):
+        return self.cache_args['dir']
+    @property
+    def cache_url(self):
+        return self.cache_args['url']
+    @property
+    def cache_type(self):
+        return self.cache_args['type']
+
+    def render(self, *args, **data):
+        """Render the output of this template as a string.
+
+        If the template specifies an output encoding, the string
+        will be encoded accordingly, else the output is raw (raw
+        output uses `cStringIO` and can't handle multibyte
+        characters). A :class:`.Context` object is created corresponding
+        to the given data. Arguments that are explicitly declared
+        by this template's internal rendering method are also
+        pulled from the given ``*args``, ``**data`` members.
+
+        """
+        return runtime._render(self, self.callable_, args, data)
+
+    def render_unicode(self, *args, **data):
+        """Render the output of this template as a unicode object."""
+
+        return runtime._render(self,
+                                self.callable_,
+                                args,
+                                data,
+                                as_unicode=True)
+
+    def render_context(self, context, *args, **kwargs):
+        """Render this :class:`.Template` with the given context.
+
+        The data is written to the context's buffer.
+
+        """
+        if getattr(context, '_with_template', None) is None:
+            context._set_with_template(self)
+        runtime._render_context(self,
+                                self.callable_,
+                                context,
+                                *args,
+                                **kwargs)
+
+    def has_def(self, name):
+        return hasattr(self.module, "render_%s" % name)
+
+    def get_def(self, name):
+        """Return a def of this template as a :class:`.DefTemplate`."""
+
+        return DefTemplate(self, getattr(self.module, "render_%s" % name))
+
+    def _get_def_callable(self, name):
+        return getattr(self.module, "render_%s" % name)
+
+    @property
+    def last_modified(self):
+        return self.module._modified_time
+
+class ModuleTemplate(Template):
+    """A Template which is constructed given an existing Python module.
+
+        e.g.::
+
+        t = Template("this is a template")
+        f = file("mymodule.py", "w")
+        f.write(t.code)
+        f.close()
+
+        import mymodule
+
+        t = ModuleTemplate(mymodule)
+        print t.render()
+
+    """
+
+    def __init__(self, module,
+                        module_filename=None,
+                        template=None,
+                        template_filename=None,
+                        module_source=None,
+                        template_source=None,
+                        output_encoding=None,
+                        encoding_errors='strict',
+                        disable_unicode=False,
+                        bytestring_passthrough=False,
+                        format_exceptions=False,
+                        error_handler=None,
+                        lookup=None,
+                        cache_args=None,
+                        cache_impl='beaker',
+                        cache_enabled=True,
+                        cache_type=None,
+                        cache_dir=None,
+                        cache_url=None,
+    ):
+        self.module_id = re.sub(r'\W', "_", module._template_uri)
+        self.uri = module._template_uri
+        self.input_encoding = module._source_encoding
+        self.output_encoding = output_encoding
+        self.encoding_errors = encoding_errors
+        self.disable_unicode = disable_unicode
+        self.bytestring_passthrough = bytestring_passthrough or disable_unicode
+        self.enable_loop = module._enable_loop
+
+        if util.py3k and disable_unicode:
+            raise exceptions.UnsupportedError(
+                                    "Mako for Python 3 does not "
+                                    "support disabling Unicode")
+        elif output_encoding and disable_unicode:
+            raise exceptions.UnsupportedError(
+                                    "output_encoding must be set to "
+                                    "None when disable_unicode is used.")
+
+        self.module = module
+        self.filename = template_filename
+        ModuleInfo(module,
+                        module_filename,
+                        self,
+                        template_filename,
+                        module_source,
+                        template_source)
+
+        self.callable_ = self.module.render_body
+        self.format_exceptions = format_exceptions
+        self.error_handler = error_handler
+        self.lookup = lookup
+        self._setup_cache_args(
+            cache_impl, cache_enabled, cache_args,
+            cache_type, cache_dir, cache_url
+        )
+
+class DefTemplate(Template):
+    """A :class:`.Template` which represents a callable def in a parent
+    template."""
+
+    def __init__(self, parent, callable_):
+        self.parent = parent
+        self.callable_ = callable_
+        self.output_encoding = parent.output_encoding
+        self.module = parent.module
+        self.encoding_errors = parent.encoding_errors
+        self.format_exceptions = parent.format_exceptions
+        self.error_handler = parent.error_handler
+        self.enable_loop = parent.enable_loop
+        self.lookup = parent.lookup
+        self.bytestring_passthrough = parent.bytestring_passthrough
+
+    def get_def(self, name):
+        return self.parent.get_def(name)
+
+class ModuleInfo(object):
+    """Stores information about a module currently loaded into
+    memory, provides reverse lookups of template source, module
+    source code based on a module's identifier.
+
+     """
+    _modules = weakref.WeakValueDictionary()
+
+    def __init__(self,
+                    module,
+                    module_filename,
+                    template,
+                    template_filename,
+                    module_source,
+                    template_source):
+        self.module = module
+        self.module_filename = module_filename
+        self.template_filename = template_filename
+        self.module_source = module_source
+        self.template_source = template_source
+        self._modules[module.__name__] = template._mmarker = self
+        if module_filename:
+            self._modules[module_filename] = self
+
+    @property
+    def code(self):
+        if self.module_source is not None:
+            return self.module_source
+        else:
+            return util.read_file(self.module_filename)
+
+    @property
+    def source(self):
+        if self.template_source is not None:
+            if self.module._source_encoding and \
+                    not isinstance(self.template_source, unicode):
+                return self.template_source.decode(
+                                self.module._source_encoding)
+            else:
+                return self.template_source
+        else:
+            data = util.read_file(self.template_filename)
+            if self.module._source_encoding:
+                return data.decode(self.module._source_encoding)
+            else:
+                return data
+
+def _compile(template, text, filename, generate_magic_comment):
+    lexer = Lexer(text,
+                    filename,
+                    disable_unicode=template.disable_unicode,
+                    input_encoding=template.input_encoding,
+                    preprocessor=template.preprocessor)
+    node = lexer.parse()
+    source = codegen.compile(node,
+                            template.uri,
+                            filename,
+                            default_filters=template.default_filters,
+                            buffer_filters=template.buffer_filters,
+                            imports=template.imports,
+                            source_encoding=lexer.encoding,
+                            generate_magic_comment=generate_magic_comment,
+                            disable_unicode=template.disable_unicode,
+                            strict_undefined=template.strict_undefined,
+                            enable_loop=template.enable_loop,
+                            reserved_names=template.reserved_names)
+    return source, lexer
+
+def _compile_text(template, text, filename):
+    identifier = template.module_id
+    source, lexer = _compile(template, text, filename,
+                        generate_magic_comment=template.disable_unicode)
+
+    cid = identifier
+    if not util.py3k and isinstance(cid, unicode):
+        cid = cid.encode()
+    module = types.ModuleType(cid)
+    code = compile(source, cid, 'exec')
+    exec code in module.__dict__, module.__dict__
+    return (source, module)
+
+def _compile_module_file(template, text, filename, outputpath, module_writer):
+    identifier = template.module_id
+    source, lexer = _compile(template, text, filename,
+                        generate_magic_comment=True)
+
+    if isinstance(source, unicode):
+        source = source.encode(lexer.encoding or 'ascii')
+
+    if module_writer:
+        module_writer(source, outputpath)
+    else:
+        # make tempfiles in the same location as the ultimate
+        # location.   this ensures they're on the same filesystem,
+        # avoiding synchronization issues.
+        (dest, name) = tempfile.mkstemp(dir=os.path.dirname(outputpath))
+
+        os.write(dest, source)
+        os.close(dest)
+        shutil.move(name, outputpath)
+
+def _get_module_info_from_callable(callable_):
+    return _get_module_info(callable_.func_globals['__name__'])
+
+def _get_module_info(filename):
+    return ModuleInfo._modules[filename]
+
diff --git a/lib/Mako-0.7.3/mako/util.py b/lib/Mako-0.7.3/mako/util.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/mako/util.py
@@ -0,0 +1,438 @@
+# mako/util.py
+# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+import imp
+import sys
+
+
+py3k = getattr(sys, 'py3kwarning', False) or sys.version_info >= (3, 0)
+py26 = sys.version_info >= (2, 6)
+py25 = sys.version_info >= (2, 5)
+jython = sys.platform.startswith('java')
+win32 = sys.platform.startswith('win')
+pypy = hasattr(sys, 'pypy_version_info')
+
+if py3k:
+    from io import StringIO
+else:
+    try:
+        from cStringIO import StringIO
+    except:
+        from StringIO import StringIO
+
+import codecs, re, weakref, os, time, operator
+import collections
+
+try:
+    import threading
+    import thread
+except ImportError:
+    import dummy_threading as threading
+    import dummy_thread as thread
+
+if win32 or jython:
+    time_func = time.clock
+else:
+    time_func = time.time
+
+def function_named(fn, name):
+    """Return a function with a given __name__.
+
+    Will assign to __name__ and return the original function if possible on
+    the Python implementation, otherwise a new function will be constructed.
+
+    """
+    fn.__name__ = name
+    return fn
+
+try:
+    from functools import partial
+except:
+    def partial(func, *args, **keywords):
+        def newfunc(*fargs, **fkeywords):
+            newkeywords = keywords.copy()
+            newkeywords.update(fkeywords)
+            return func(*(args + fargs), **newkeywords)
+        return newfunc
+
+if not py25:
+    def all(iterable):
+        for i in iterable:
+            if not i:
+                return False
+        return True
+
+    def exception_name(exc):
+        try:
+            return exc.__class__.__name__
+        except AttributeError:
+            return exc.__name__
+else:
+    all = all
+
+    def exception_name(exc):
+        return exc.__class__.__name__
+
+
+class PluginLoader(object):
+    def __init__(self, group):
+        self.group = group
+        self.impls = {}
+
+    def load(self, name):
+        if name in self.impls:
+            return self.impls[name]()
+        else:
+            import pkg_resources
+            for impl in pkg_resources.iter_entry_points(
+                                self.group,
+                                name):
+                self.impls[name] = impl.load
+                return impl.load()
+            else:
+                from mako import exceptions
+                raise exceptions.RuntimeException(
+                        "Can't load plugin %s %s" %
+                        (self.group, name))
+
+    def register(self, name, modulepath, objname):
+        def load():
+            mod = __import__(modulepath)
+            for token in modulepath.split(".")[1:]:
+                mod = getattr(mod, token)
+            return getattr(mod, objname)
+        self.impls[name] = load
+
+def verify_directory(dir):
+    """create and/or verify a filesystem directory."""
+
+    tries = 0
+
+    while not os.path.exists(dir):
+        try:
+            tries += 1
+            os.makedirs(dir, 0775)
+        except:
+            if tries > 5:
+                raise
+
+def to_list(x, default=None):
+    if x is None:
+        return default
+    if not isinstance(x, (list, tuple)):
+        return [x]
+    else:
+        return x
+
+
+class memoized_property(object):
+    """A read-only @property that is only evaluated once."""
+    def __init__(self, fget, doc=None):
+        self.fget = fget
+        self.__doc__ = doc or fget.__doc__
+        self.__name__ = fget.__name__
+
+    def __get__(self, obj, cls):
+        if obj is None:
+            return self
+        obj.__dict__[self.__name__] = result = self.fget(obj)
+        return result
+
+class memoized_instancemethod(object):
+    """Decorate a method memoize its return value.
+
+    Best applied to no-arg methods: memoization is not sensitive to
+    argument values, and will always return the same value even when
+    called with different arguments.
+
+    """
+    def __init__(self, fget, doc=None):
+        self.fget = fget
+        self.__doc__ = doc or fget.__doc__
+        self.__name__ = fget.__name__
+
+    def __get__(self, obj, cls):
+        if obj is None:
+            return self
+        def oneshot(*args, **kw):
+            result = self.fget(obj, *args, **kw)
+            memo = lambda *a, **kw: result
+            memo.__name__ = self.__name__
+            memo.__doc__ = self.__doc__
+            obj.__dict__[self.__name__] = memo
+            return result
+        oneshot.__name__ = self.__name__
+        oneshot.__doc__ = self.__doc__
+        return oneshot
+
+class SetLikeDict(dict):
+    """a dictionary that has some setlike methods on it"""
+    def union(self, other):
+        """produce a 'union' of this dict and another (at the key level).
+
+        values in the second dict take precedence over that of the first"""
+        x = SetLikeDict(**self)
+        x.update(other)
+        return x
+
+class FastEncodingBuffer(object):
+    """a very rudimentary buffer that is faster than StringIO,
+    but doesn't crash on unicode data like cStringIO."""
+
+    def __init__(self, encoding=None, errors='strict', unicode=False):
+        self.data = collections.deque()
+        self.encoding = encoding
+        if unicode:
+            self.delim = u''
+        else:
+            self.delim = ''
+        self.unicode = unicode
+        self.errors = errors
+        self.write = self.data.append
+
+    def truncate(self):
+        self.data = collections.deque()
+        self.write = self.data.append
+
+    def getvalue(self):
+        if self.encoding:
+            return self.delim.join(self.data).encode(self.encoding,
+                                                     self.errors)
+        else:
+            return self.delim.join(self.data)
+
+class LRUCache(dict):
+    """A dictionary-like object that stores a limited number of items,
+    discarding lesser used items periodically.
+
+    this is a rewrite of LRUCache from Myghty to use a periodic timestamp-based
+    paradigm so that synchronization is not really needed.  the size management
+    is inexact.
+    """
+
+    class _Item(object):
+        def __init__(self, key, value):
+            self.key = key
+            self.value = value
+            self.timestamp = time_func()
+        def __repr__(self):
+            return repr(self.value)
+
+    def __init__(self, capacity, threshold=.5):
+        self.capacity = capacity
+        self.threshold = threshold
+
+    def __getitem__(self, key):
+        item = dict.__getitem__(self, key)
+        item.timestamp = time_func()
+        return item.value
+
+    def values(self):
+        return [i.value for i in dict.values(self)]
+
+    def setdefault(self, key, value):
+        if key in self:
+            return self[key]
+        else:
+            self[key] = value
+            return value
+
+    def __setitem__(self, key, value):
+        item = dict.get(self, key)
+        if item is None:
+            item = self._Item(key, value)
+            dict.__setitem__(self, key, item)
+        else:
+            item.value = value
+        self._manage_size()
+
+    def _manage_size(self):
+        while len(self) > self.capacity + self.capacity * self.threshold:
+            bytime = sorted(dict.values(self),
+                            key=operator.attrgetter('timestamp'), reverse=True)
+            for item in bytime[self.capacity:]:
+                try:
+                    del self[item.key]
+                except KeyError:
+                    # if we couldn't find a key, most likely some other thread
+                    # broke in on us. loop around and try again
+                    break
+
+# Regexp to match python magic encoding line
+_PYTHON_MAGIC_COMMENT_re = re.compile(
+    r'[ \t\f]* \# .* coding[=:][ \t]*([-\w.]+)',
+    re.VERBOSE)
+
+def parse_encoding(fp):
+    """Deduce the encoding of a Python source file (binary mode) from magic
+    comment.
+
+    It does this in the same way as the `Python interpreter`__
+
+    .. __: http://docs.python.org/ref/encodings.html
+
+    The ``fp`` argument should be a seekable file object in binary mode.
+    """
+    pos = fp.tell()
+    fp.seek(0)
+    try:
+        line1 = fp.readline()
+        has_bom = line1.startswith(codecs.BOM_UTF8)
+        if has_bom:
+            line1 = line1[len(codecs.BOM_UTF8):]
+
+        m = _PYTHON_MAGIC_COMMENT_re.match(line1.decode('ascii', 'ignore'))
+        if not m:
+            try:
+                import parser
+                parser.suite(line1.decode('ascii', 'ignore'))
+            except (ImportError, SyntaxError):
+                # Either it's a real syntax error, in which case the source
+                # is not valid python source, or line2 is a continuation of
+                # line1, in which case we don't want to scan line2 for a magic
+                # comment.
+                pass
+            else:
+                line2 = fp.readline()
+                m = _PYTHON_MAGIC_COMMENT_re.match(
+                                               line2.decode('ascii', 'ignore'))
+
+        if has_bom:
+            if m:
+                raise SyntaxError, \
+                      "python refuses to compile code with both a UTF8" \
+                      " byte-order-mark and a magic encoding comment"
+            return 'utf_8'
+        elif m:
+            return m.group(1)
+        else:
+            return None
+    finally:
+        fp.seek(pos)
+
+def sorted_dict_repr(d):
+    """repr() a dictionary with the keys in order.
+
+    Used by the lexer unit test to compare parse trees based on strings.
+
+    """
+    keys = d.keys()
+    keys.sort()
+    return "{" + ", ".join(["%r: %r" % (k, d[k]) for k in keys]) + "}"
+
+def restore__ast(_ast):
+    """Attempt to restore the required classes to the _ast module if it
+    appears to be missing them
+    """
+    if hasattr(_ast, 'AST'):
+        return
+    _ast.PyCF_ONLY_AST = 2 << 9
+    m = compile("""\
+def foo(): pass
+class Bar(object): pass
+if False: pass
+baz = 'mako'
+1 + 2 - 3 * 4 / 5
+6 // 7 % 8 << 9 >> 10
+11 & 12 ^ 13 | 14
+15 and 16 or 17
+-baz + (not +18) - ~17
+baz and 'foo' or 'bar'
+(mako is baz == baz) is not baz != mako
+mako > baz < mako >= baz <= mako
+mako in baz not in mako""", '<unknown>', 'exec', _ast.PyCF_ONLY_AST)
+    _ast.Module = type(m)
+
+    for cls in _ast.Module.__mro__:
+        if cls.__name__ == 'mod':
+            _ast.mod = cls
+        elif cls.__name__ == 'AST':
+            _ast.AST = cls
+
+    _ast.FunctionDef = type(m.body[0])
+    _ast.ClassDef = type(m.body[1])
+    _ast.If = type(m.body[2])
+
+    _ast.Name = type(m.body[3].targets[0])
+    _ast.Store = type(m.body[3].targets[0].ctx)
+    _ast.Str = type(m.body[3].value)
+
+    _ast.Sub = type(m.body[4].value.op)
+    _ast.Add = type(m.body[4].value.left.op)
+    _ast.Div = type(m.body[4].value.right.op)
+    _ast.Mult = type(m.body[4].value.right.left.op)
+
+    _ast.RShift = type(m.body[5].value.op)
+    _ast.LShift = type(m.body[5].value.left.op)
+    _ast.Mod = type(m.body[5].value.left.left.op)
+    _ast.FloorDiv = type(m.body[5].value.left.left.left.op)
+
+    _ast.BitOr = type(m.body[6].value.op)
+    _ast.BitXor = type(m.body[6].value.left.op)
+    _ast.BitAnd = type(m.body[6].value.left.left.op)
+
+    _ast.Or = type(m.body[7].value.op)
+    _ast.And = type(m.body[7].value.values[0].op)
+
+    _ast.Invert = type(m.body[8].value.right.op)
+    _ast.Not = type(m.body[8].value.left.right.op)
+    _ast.UAdd = type(m.body[8].value.left.right.operand.op)
+    _ast.USub = type(m.body[8].value.left.left.op)
+
+    _ast.Or = type(m.body[9].value.op)
+    _ast.And = type(m.body[9].value.values[0].op)
+
+    _ast.IsNot = type(m.body[10].value.ops[0])
+    _ast.NotEq = type(m.body[10].value.ops[1])
+    _ast.Is = type(m.body[10].value.left.ops[0])
+    _ast.Eq = type(m.body[10].value.left.ops[1])
+
+    _ast.Gt = type(m.body[11].value.ops[0])
+    _ast.Lt = type(m.body[11].value.ops[1])
+    _ast.GtE = type(m.body[11].value.ops[2])
+    _ast.LtE = type(m.body[11].value.ops[3])
+
+    _ast.In = type(m.body[12].value.ops[0])
+    _ast.NotIn = type(m.body[12].value.ops[1])
+
+
+try:
+    from inspect import CO_VARKEYWORDS, CO_VARARGS
+    def inspect_func_args(fn):
+        co = fn.func_code
+
+        nargs = co.co_argcount
+        names = co.co_varnames
+        args = list(names[:nargs])
+
+        varargs = None
+        if co.co_flags & CO_VARARGS:
+            varargs = co.co_varnames[nargs]
+            nargs = nargs + 1
+        varkw = None
+        if co.co_flags & CO_VARKEYWORDS:
+            varkw = co.co_varnames[nargs]
+
+        return args, varargs, varkw, fn.func_defaults
+except ImportError:
+    import inspect
+    def inspect_func_args(fn):
+        return inspect.getargspec(fn)
+
+def read_file(path, mode='rb'):
+    fp = open(path, mode)
+    try:
+        data = fp.read()
+        return data
+    finally:
+        fp.close()
+
+def load_module(module_id, path):
+    fp = open(path, 'rb')
+    try:
+        return imp.load_source(module_id, path, fp)
+    finally:
+        fp.close()
diff --git a/lib/Mako-0.7.3/scripts/mako-render b/lib/Mako-0.7.3/scripts/mako-render
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/scripts/mako-render
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+
+def render(data, kw):
+    from mako.template import Template
+    from mako.lookup import TemplateLookup
+
+    lookup = TemplateLookup(["."])
+    return Template(data, lookup=lookup).render(**kw)
+
+def varsplit(var):
+    if "=" not in var:
+        return (var, "")
+    return var.split("=", 1)
+
+def main(argv=None):
+    from os.path import isfile
+    from sys import stdin
+
+    if argv is None:
+        import sys
+        argv = sys.argv
+
+    from optparse import OptionParser
+
+    parser = OptionParser("usage: %prog [FILENAME]")
+    parser.add_option("--var", default=[], action="append",
+                  help="variable (can be used multiple times, use name=value)")
+
+    opts, args = parser.parse_args(argv[1:])
+    if len(args) not in (0, 1):
+        parser.error("wrong number of arguments") # Will exit
+
+    if (len(args) == 0) or (args[0] == "-"):
+        fo = stdin
+    else:
+        filename = args[0]
+        if not isfile(filename):
+            raise SystemExit("error: can't find %s" % filename)
+        fo = open(filename)
+
+    kw = dict([varsplit(var) for var in opts.var])
+    data = fo.read()
+    print render(data, kw)
+
+if __name__ == "__main__":
+    main()
diff --git a/lib/Mako-0.7.3/setup.cfg b/lib/Mako-0.7.3/setup.cfg
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/setup.cfg
@@ -0,0 +1,5 @@
+[egg_info]
+tag_build = 
+tag_date = 0
+tag_svn_revision = 0
+
diff --git a/lib/Mako-0.7.3/setup.py b/lib/Mako-0.7.3/setup.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/setup.py
@@ -0,0 +1,62 @@
+from setuptools import setup, find_packages
+import os
+import re
+import sys
+
+extra = {}
+if sys.version_info >= (3, 0):
+    extra.update(
+        use_2to3=True,
+    )
+
+v = open(os.path.join(os.path.dirname(__file__), 'mako', '__init__.py'))
+VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
+v.close()
+
+readme = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
+
+setup(name='Mako',
+      version=VERSION,
+      description="A super-fast templating language that borrows the \
+ best ideas from the existing templating languages.",
+      long_description=readme,
+      classifiers=[
+      'Development Status :: 5 - Production/Stable',
+      'Environment :: Web Environment',
+      'Intended Audience :: Developers',
+      'Programming Language :: Python',
+      'Programming Language :: Python :: 3',
+      "Programming Language :: Python :: Implementation :: CPython",
+      "Programming Language :: Python :: Implementation :: PyPy",
+      'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
+      ],
+      keywords='templates',
+      author='Mike Bayer',
+      author_email='mike at zzzcomputing.com',
+      url='http://www.makotemplates.org/',
+      license='MIT',
+      packages=find_packages('.', exclude=['examples*', 'test*']),
+      scripts=['scripts/mako-render'],
+      tests_require = ['nose >= 0.11'],
+      test_suite = "nose.collector",
+      zip_safe=False,
+      install_requires=[
+          'MarkupSafe>=0.9.2',
+      ],
+      extras_require = {'beaker':['Beaker>=1.1']},
+      entry_points="""
+      [python.templating.engines]
+      mako = mako.ext.turbogears:TGPlugin
+ 
+      [pygments.lexers]
+      mako = mako.ext.pygmentplugin:MakoLexer
+      html+mako = mako.ext.pygmentplugin:MakoHtmlLexer
+      xml+mako = mako.ext.pygmentplugin:MakoXmlLexer
+      js+mako = mako.ext.pygmentplugin:MakoJavascriptLexer
+      css+mako = mako.ext.pygmentplugin:MakoCssLexer
+
+      [babel.extractors]
+      mako = mako.ext.babelplugin:extract
+      """,
+      **extra
+)
diff --git a/lib/Mako-0.7.3/test/__init__.py b/lib/Mako-0.7.3/test/__init__.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/__init__.py
@@ -0,0 +1,145 @@
+from mako.template import Template
+import unittest, os
+from mako.util import py3k, py26, py25
+from mako.util import function_named
+import re
+from mako.cache import CacheImpl, register_plugin
+from nose import SkipTest
+
+
+template_base = os.path.join(os.path.dirname(__file__), 'templates')
+module_base = os.path.join(template_base, 'modules')
+
+class TemplateTest(unittest.TestCase):
+
+    def _file_template(self, filename, **kw):
+        filepath = self._file_path(filename)
+        return Template(uri=filename, filename=filepath,
+                            module_directory=module_base, **kw)
+
+    def _file_path(self, filename):
+        name, ext = os.path.splitext(filename)
+
+        if py3k:
+            py3k_path = os.path.join(template_base, name + "_py3k" + ext)
+            if os.path.exists(py3k_path):
+                return py3k_path
+
+        return os.path.join(template_base, filename)
+
+    def _do_file_test(self, filename, expected, filters=None,
+                        unicode_=True, template_args=None, **kw):
+        t1 = self._file_template(filename, **kw)
+        self._do_test(t1, expected, filters=filters,
+                        unicode_=unicode_, template_args=template_args)
+
+    def _do_memory_test(self, source, expected, filters=None,
+                        unicode_=True, template_args=None, **kw):
+        t1 = Template(text=source, **kw)
+        self._do_test(t1, expected, filters=filters,
+                        unicode_=unicode_, template_args=template_args)
+
+    def _do_test(self, template, expected, filters=None, template_args=None,
+                                unicode_=True):
+        if template_args is None:
+            template_args = {}
+        if unicode_:
+            output = template.render_unicode(**template_args)
+        else:
+            output = template.render(**template_args)
+
+        if filters:
+            output = filters(output)
+        eq_(output, expected)
+
+def eq_(a, b, msg=None):
+    """Assert a == b, with repr messaging on failure."""
+    assert a == b, msg or "%r != %r" % (a, b)
+
+def teardown():
+    import shutil
+    shutil.rmtree(module_base, True)
+
+def assert_raises(except_cls, callable_, *args, **kw):
+    try:
+        callable_(*args, **kw)
+        success = False
+    except except_cls, e:
+        success = True
+
+    # assert outside the block so it works for AssertionError too !
+    assert success, "Callable did not raise an exception"
+
+def assert_raises_message(except_cls, msg, callable_, *args, **kwargs):
+    try:
+        callable_(*args, **kwargs)
+        assert False, "Callable did not raise an exception"
+    except except_cls, e:
+        assert re.search(msg, str(e)), "%r !~ %s" % (msg, e)
+        print str(e)
+
+def skip_if(predicate, reason=None):
+    """Skip a test if predicate is true."""
+    reason = reason or predicate.__name__
+
+    def decorate(fn):
+        fn_name = fn.__name__
+        def maybe(*args, **kw):
+            if predicate():
+                msg = "'%s' skipped: %s" % (
+                    fn_name, reason)
+                raise SkipTest(msg)
+            else:
+                return fn(*args, **kw)
+        return function_named(maybe, fn_name)
+    return decorate
+
+def requires_python_2(fn):
+    return skip_if(lambda: py3k, "Requires Python 2.xx")(fn)
+
+def requires_python_26_or_greater(fn):
+    return skip_if(lambda: not py26, "Requires Python 2.6 or greater")(fn)
+
+def requires_python_25_or_greater(fn):
+    return skip_if(lambda: not py25, "Requires Python 2.5 or greater")(fn)
+
+def requires_pygments_14(fn):
+    try:
+        import pygments
+        version = pygments.__version__
+    except:
+        version = "0"
+    return skip_if(lambda: version < "1.4")(fn)
+
+def requires_no_pygments(fn):
+    try:
+        import pygments
+    except:
+        pygments = None
+    return skip_if(lambda: pygments is not None)(fn)
+
+class PlainCacheImpl(CacheImpl):
+    """Simple memory cache impl so that tests which
+    use caching can run without beaker.  """
+
+    def __init__(self, cache):
+        self.cache = cache
+        self.data = {}
+
+    def get_or_create(self, key, creation_function, **kw):
+        if key in self.data:
+            return self.data[key]
+        else:
+            self.data[key] = data = creation_function(**kw)
+            return data
+
+    def put(self, key, value, **kw):
+        self.data[key] = value
+
+    def get(self, key, **kw):
+        return self.data[key]
+
+    def invalidate(self, key, **kw):
+        del self.data[key]
+
+register_plugin("plain", __name__, "PlainCacheImpl")
diff --git a/lib/Mako-0.7.3/test/foo/__init__.py b/lib/Mako-0.7.3/test/foo/__init__.py
new file mode 100644
diff --git a/lib/Mako-0.7.3/test/foo/test_ns.py b/lib/Mako-0.7.3/test/foo/test_ns.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/foo/test_ns.py
@@ -0,0 +1,7 @@
+def foo1(context):
+    context.write("this is foo1.")
+    return ''
+ 
+def foo2(context, x):
+    context.write("this is foo2, x is " + x)
+    return ''
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/test/sample_module_namespace.py b/lib/Mako-0.7.3/test/sample_module_namespace.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/sample_module_namespace.py
@@ -0,0 +1,7 @@
+def foo1(context):
+    context.write("this is foo1.")
+    return ''
+ 
+def foo2(context, x):
+    context.write("this is foo2, x is " + x)
+    return ''
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/test/templates/badbom.html b/lib/Mako-0.7.3/test/templates/badbom.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/badbom.html
@@ -0,0 +1,2 @@
+## -*- coding: ascii -*-
+Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/test/templates/bom.html b/lib/Mako-0.7.3/test/templates/bom.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/bom.html
@@ -0,0 +1,1 @@
+Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/test/templates/bommagic.html b/lib/Mako-0.7.3/test/templates/bommagic.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/bommagic.html
@@ -0,0 +1,2 @@
+## -*- coding: utf-8 -*-
+Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/test/templates/chs_unicode.html b/lib/Mako-0.7.3/test/templates/chs_unicode.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/chs_unicode.html
@@ -0,0 +1,11 @@
+## -*- encoding:utf8 -*-
+<%
+ msg = u'新中国的主席'
+%>
+
+<%def name="welcome(who, place=u'北京')">
+Welcome ${who} to ${place}.
+</%def>
+
+${name} 是 ${msg}<br/>
+${welcome(u'你')}
diff --git a/lib/Mako-0.7.3/test/templates/chs_unicode_py3k.html b/lib/Mako-0.7.3/test/templates/chs_unicode_py3k.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/chs_unicode_py3k.html
@@ -0,0 +1,11 @@
+## -*- encoding:utf8 -*-
+<%
+ msg = '新中国的主席'
+%>
+
+<%def name="welcome(who, place='北京')">
+Welcome ${who} to ${place}.
+</%def>
+
+${name} 是 ${msg}<br/>
+${welcome('你')}
diff --git a/lib/Mako-0.7.3/test/templates/chs_utf8.html b/lib/Mako-0.7.3/test/templates/chs_utf8.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/chs_utf8.html
@@ -0,0 +1,17 @@
+## -*- encoding:utf8 -*-
+<%
+ msg = '新中国的主席'
+%>
+
+<%def name="welcome(who, place='北京')">
+Welcome ${who} to ${place}.
+</%def>
+
+<%def name="welcome_buffered(who, place='北京')" buffered="True">
+Welcome ${who} to ${place}.
+</%def>
+
+${name} 是 ${msg}<br/>
+${welcome('你')}
+${welcome_buffered('你')}
+
diff --git a/lib/Mako-0.7.3/test/templates/crlf.html b/lib/Mako-0.7.3/test/templates/crlf.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/crlf.html
@@ -0,0 +1,19 @@
+<html>
+
+<%page args="a=['foo',
+                'bar']"/>
+
+like the name says.
+
+    % for x in [1,2,3]:
+        ${x}\
+    % endfor
+
+${trumpeter == 'Miles' and trumpeter or \
+      'Dizzy'}
+
+<%def name="hi()">
+    hi!
+</%def>
+
+</html>
diff --git a/lib/Mako-0.7.3/test/templates/foo/modtest.html.py b/lib/Mako-0.7.3/test/templates/foo/modtest.html.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/foo/modtest.html.py
@@ -0,0 +1,25 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1267565427.7968459
+_template_filename='/Users/classic/dev/mako/test/templates/modtest.html'
+_template_uri='/modtest.html'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = []
+
+
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        __M_writer = context.writer()
+        # SOURCE LINE 1
+        __M_writer(u'this is a test')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
diff --git a/lib/Mako-0.7.3/test/templates/gettext.mako b/lib/Mako-0.7.3/test/templates/gettext.mako
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/gettext.mako
@@ -0,0 +1,89 @@
+<%page args="x, y=_('Page arg 1'), z=_('Page arg 2')"/>
+<%!
+import random
+def gettext(message): return message
+_ = gettext
+def ungettext(s, p, c):
+    if c == 1:
+        return s
+    return p
+top = gettext('Begin')
+%>
+<%
+   # TRANSLATOR: Hi there!
+   hithere = _('Hi there!')
+
+   # TRANSLATOR: you should not be seeing this in the .po
+   rows = [[v for v in range(0,10)] for row in range(0,10)]
+
+   hello = _('Hello')
+%>
+<div id="header">
+  ${_('Welcome')}
+</div>
+<table>
+    % for row in (hithere, hello, _('Yo')):
+        ${makerow(row)}
+    % endfor
+    ${makerow(count=2)}
+</table>
+
+
+<div id="main">
+
+## TRANSLATOR: Ensure so and
+## so, thanks
+  ${_('The')} fuzzy ${ungettext('bunny', 'bunnies', random.randint(1, 2))}
+</div>
+
+<div id="footer">
+  ## TRANSLATOR: Good bye
+  ${_('Goodbye')}
+</div>
+ 
+<%def name="makerow(row=_('Babel'), count=1)">
+    <!-- ${ungettext('hella', 'hellas', count)} -->
+    % for i in range(count):
+      <tr>
+      % for name in row:
+          <td>${name}</td>\
+      % endfor
+      </tr>
+    % endfor
+</%def>
+
+<%def name="comment()">
+  <!-- ${caller.body()} -->
+</%def>
+
+<%block name="foo">
+    ## TRANSLATOR: Ensure so and
+    ## so, thanks
+      ${_('The')} fuzzy ${ungettext('bunny', 'bunnies', random.randint(1, 2))}
+</%block>
+
+<%call expr="comment">
+  P.S.
+  ## TRANSLATOR: HTML comment
+  ${_('Goodbye, really!')}
+</%call>
+
+<!-- ${_('P.S. byebye')} -->
+
+<div id="end">
+  <a href="#top">
+    ## TRANSLATOR: you won't see this either
+ 
+    ${_('Top')}
+  </a>
+</div>
+
+<%def name="panel()">
+
+${_(u'foo')} <%self:block_tpl title="123", name="_(u'baz')">
+
+${_(u'bar')}
+
+</%self:block_tpl>
+
+</%def>
diff --git a/lib/Mako-0.7.3/test/templates/index.html b/lib/Mako-0.7.3/test/templates/index.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/index.html
@@ -0,0 +1,1 @@
+this is index
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/test/templates/internationalization.html b/lib/Mako-0.7.3/test/templates/internationalization.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/internationalization.html
@@ -0,0 +1,920 @@
+<div class="rst-docs">
+ 
+  <h1 class="pudge-member-page-heading">Internationalization, Localization and Unicode</h1>
+ 
+  <table rules="none" frame="void" class="docinfo">
+<col class="docinfo-name"></col>
+<col class="docinfo-content"></col>
+<tbody valign="top">
+<tr><th class="docinfo-name">Author:</th>
+<td>James Gardner</td></tr>
+<tr class="field"><th class="docinfo-name">updated:</th><td class="field-body">2006-12-11</td>
+</tr>
+</tbody>
+</table>
+
+  <div class="note">
+<p class="first admonition-title">Note</p>
+<p>This is a work in progress. We hope the internationalization, localization
+and Unicode support in Pylons is now robust and flexible but we would
+appreciate hearing about any issues we have. Just drop a line to the
+pylons-discuss mailing list on Google Groups.</p>
+<p class="last">This is the first draft of the full document including Unicode. Expect
+some typos and spelling mistakes!</p>
+</div>
+<div class="contents topic">
+<p class="topic-title first"><a id="table-of-contents" name="table-of-contents">Table of Contents</a></p>
+<ul class="auto-toc simple">
+<li><a href="#understanding-unicode" id="id1" name="id1" class="reference">1   Understanding Unicode</a><ul class="auto-toc">
+<li><a href="#what-is-unicode" id="id2" name="id2" class="reference">1.1   What is Unicode?</a></li>
+<li><a href="#unicode-in-python" id="id3" name="id3" class="reference">1.2   Unicode in Python</a></li>
+<li><a href="#unicode-literals-in-python-source-code" id="id4" name="id4" class="reference">1.3   Unicode Literals in Python Source Code</a></li>
+<li><a href="#input-and-output" id="id5" name="id5" class="reference">1.4   Input and Output</a></li>
+<li><a href="#unicode-filenames" id="id6" name="id6" class="reference">1.5   Unicode Filenames</a></li>
+</ul>
+</li>
+<li><a href="#applying-this-to-web-programming" id="id7" name="id7" class="reference">2   Applying this to Web Programming</a><ul class="auto-toc">
+<li><a href="#request-parameters" id="id8" name="id8" class="reference">2.1   Request Parameters</a></li>
+<li><a href="#templating" id="id9" name="id9" class="reference">2.2   Templating</a></li>
+<li><a href="#output-encoding" id="id10" name="id10" class="reference">2.3   Output Encoding</a></li>
+<li><a href="#databases" id="id11" name="id11" class="reference">2.4   Databases</a></li>
+</ul>
+</li>
+<li><a href="#internationalization-and-localization" id="id12" name="id12" class="reference">3   Internationalization and Localization</a><ul class="auto-toc">
+<li><a href="#getting-started" id="id13" name="id13" class="reference">3.1   Getting Started</a></li>
+<li><a href="#testing-the-application" id="id14" name="id14" class="reference">3.2   Testing the Application</a></li>
+<li><a href="#missing-translations" id="id15" name="id15" class="reference">3.3   Missing Translations</a></li>
+<li><a href="#translations-within-templates" id="id16" name="id16" class="reference">3.4   Translations Within Templates</a></li>
+<li><a href="#producing-a-python-egg" id="id17" name="id17" class="reference">3.5   Producing a Python Egg</a></li>
+<li><a href="#plural-forms" id="id18" name="id18" class="reference">3.6   Plural Forms</a></li>
+</ul>
+</li>
+<li><a href="#summary" id="id19" name="id19" class="reference">4   Summary</a></li>
+<li><a href="#further-reading" id="id20" name="id20" class="reference">5   Further Reading</a></li>
+</ul>
+</div>
+<p>Internationalization and localization are means of adapting software for
+non-native environments, especially for other nations and cultures.</p>
+<p>Parts of an application which might need to be localized might include:</p>
+<blockquote>
+<ul class="simple">
+<li>Language</li>
+<li>Date/time format</li>
+<li>Formatting of numbers e.g. decimal points, positioning of separators,
+character used as separator</li>
+<li>Time zones (UTC in internationalized environments)</li>
+<li>Currency</li>
+<li>Weights and measures</li>
+</ul>
+</blockquote>
+<p>The distinction between internationalization and localization is subtle but
+important. Internationalization is the adaptation of products for potential use
+virtually everywhere, while localization is the addition of special features
+for use in a specific locale.</p>
+<p>For example, in terms of language used in software, internationalization is the
+process of marking up all strings that might need to be translated whilst
+localization is the process of producing translations for a particular locale.</p>
+<p>Pylons provides built-in support to enable you to internationalize language but
+leaves you to handle any other aspects of internationalization which might be
+appropriate to your application.</p>
+<div class="note">
+<p class="first admonition-title">Note</p>
+<p class="last">Internationalization is often abbreviated as I18N (or i18n or I18n) where the
+number 18 refers to the number of letters omitted.
+Localization is often abbreviated L10n or l10n in the same manner. These
+abbreviations also avoid picking one spelling (internationalisation vs.
+internationalization, etc.) over the other.</p>
+</div>
+<p>In order to represent characters from multiple languages, you will need to use
+Unicode so this documentation will start with a description of why Unicode is
+useful, its history and how to use Unicode in Python.</p>
+<div class="section">
+<h1><a href="#id1" id="understanding-unicode" name="understanding-unicode" class="toc-backref">1   Understanding Unicode</a></h1>
+<p>If you've ever come across text in a foreign language that contains lots of
+<tt class="docutils literal"><span class="pre">????</span></tt> characters or have written some Python code and received a message
+such as <tt class="docutils literal"><span class="pre">UnicodeDecodeError:</span> <span class="pre">'ascii'</span> <span class="pre">codec</span> <span class="pre">can't</span> <span class="pre">decode</span> <span class="pre">byte</span> <span class="pre">0xff</span> <span class="pre">in</span> <span class="pre">position</span>
+<span class="pre">6:</span> <span class="pre">ordinal</span> <span class="pre">not</span> <span class="pre">in</span> <span class="pre">range(128)</span></tt> then you have run into a problem with character
+sets, encodings, Unicode and the like.</p>
+<p>The truth is that many developers are put off by Unicode because most of the
+time it is possible to muddle through rather than take the time to learn the
+basics. To make the problem worse if you have a system that manages to fudge
+the issues and just about work and then start trying to do things properly with
+Unicode it often highlights problems in other parts of your code.</p>
+<p>The good news is that Python has great Unicode support, so the rest of
+this article will show you how to correctly use Unicode in Pylons to avoid
+unwanted <tt class="docutils literal"><span class="pre">?</span></tt> characters and <tt class="docutils literal"><span class="pre">UnicodeDecodeErrors</span></tt>.</p>
+<div class="section">
+<h2><a href="#id2" id="what-is-unicode" name="what-is-unicode" class="toc-backref">1.1   What is Unicode?</a></h2>
+<p>When computers were first being used the characters that were most important
+were unaccented English letters. Each of these letters could be represented by
+a number between 32 and 127 and thus was born ASCII, a character set where
+space was 32, the letter "A" was 65 and everything could be stored in 7 bits.</p>
+<p>Most computers in those days were using 8-bit bytes so people quickly realized
+that they could use the codes 128-255 for their own purposes. Different people
+used the codes 128-255 to represent different characters and before long these
+different sets of characters were also standardized into <em>code pages</em>. This
+meant that if you needed some non-ASCII characters in a document you could also
+specify a codepage which would define which extra characters were available.
+For example Israel DOS used a code page called 862, while Greek users used 737.
+This just about worked for Western languages provided you didn't want to write
+an Israeli document with Greek characters but it didn't work at all for Asian
+languages where there are many more characters than can be represented in 8
+bits.</p>
+<p>Unicode is a character set that solves these problems by uniquely defining
+<em>every</em> character that is used anywhere in the world. Rather than defining a
+character as a particular combination of bits in the way ASCII does, each
+character is assigned a <em>code point</em>. For example the word <tt class="docutils literal"><span class="pre">hello</span></tt> is made
+from code points <tt class="docutils literal"><span class="pre">U+0048</span> <span class="pre">U+0065</span> <span class="pre">U+006C</span> <span class="pre">U+006C</span> <span class="pre">U+006F</span></tt>. The full list of code
+points can be found at <a href="http://www.unicode.org/charts/" class="reference">http://www.unicode.org/charts/</a>.</p>
+<p>There are lots of different ways of encoding Unicode code points into bits but
+the most popular encoding is UTF-8. Using UTF-8, every code point from 0-127 is
+stored in a single byte. Only code points 128 and above are stored using 2, 3,
+in fact, up to 6 bytes. This has the useful side effect that English text looks
+exactly the same in UTF-8 as it did in ASCII, because for every
+ASCII character with hexadecimal value 0xXY, the corresponding Unicode
+code point is U+00XY. This backwards compatibility is why if you are developing
+an application that is only used by English speakers you can often get away
+without handling characters properly and still expect things to work most of
+the time. Of course, if you use a different encoding such as UTF-16 this
+doesn't apply since none of the code points are encoded to 8 bits.</p>
+<p>The important things to note from the discussion so far are that:</p>
+<ul>
+<li><p class="first">Unicode can represent pretty much any character in any writing system in
+widespread use today</p>
+</li>
+<li><p class="first">Unicode uses code points to represent characters and the way these map to bits
+in memory depends on the encoding</p>
+</li>
+<li><dl class="first docutils">
+<dt>The most popular encoding is UTF-8 which has  several convenient properties:</dt>
+<dd><ol class="first last arabic simple">
+<li>It can handle any Unicode code point</li>
+<li>A Unicode string is turned into a string of bytes containing no embedded
+zero bytes. This avoids byte-ordering issues, and means UTF-8 strings can be
+processed by C functions such as strcpy() and sent through protocols that can't
+handle zero bytes</li>
+<li>A string of ASCII text is also valid UTF-8 text</li>
+<li>UTF-8 is fairly compact; the majority of code points are turned into two
+bytes, and values less than 128 occupy only a single byte.</li>
+<li>If bytes are corrupted or lost, it's possible to determine the start of
+the next UTF-8-encoded code point and resynchronize.</li>
+</ol>
+</dd>
+</dl>
+</li>
+</ul>
+<div class="note">
+<p class="first admonition-title">Note</p>
+<p class="last">Since Unicode 3.1, some extensions have even been defined so that the
+defined range is now U+000000 to U+10FFFF (21 bits), and formally, the
+character set is defined as 31-bits to allow for future expansion. It is a myth
+that there are 65,536 Unicode code points and that every Unicode letter can
+really be squeezed into two bytes. It is also incorrect to think that UTF-8 can
+represent less characters than UTF-16. UTF-8 simply uses a variable number of
+bytes for a character, sometimes just one byte (8 bits).</p>
+</div>
+</div>
+<div class="section">
+<h2><a href="#id3" id="unicode-in-python" name="unicode-in-python" class="toc-backref">1.2   Unicode in Python</a></h2>
+<p>In Python Unicode strings are expressed as instances of the built-in
+<tt class="docutils literal"><span class="pre">unicode</span></tt> type. Under the hood, Python represents Unicode strings as either
+16 or 32 bit integers, depending on how the Python interpreter was compiled.</p>
+<p>The <tt class="docutils literal"><span class="pre">unicode()</span></tt> constructor has the signature <tt class="docutils literal"><span class="pre">unicode(string[,</span> <span class="pre">encoding,</span>
+<span class="pre">errors])</span></tt>. All of its arguments should be 8-bit strings. The first argument is
+converted to Unicode using the specified encoding; if you leave off the
+encoding argument, the ASCII encoding is used for the conversion, so characters
+greater than 127 will be treated as errors:</p>
+<pre class="literal-block">
+>>> unicode('hello')
+u'hello'
+>>> s = unicode('hello')
+>>> type(s)
+<type 'unicode'>
+>>> unicode('hello' + chr(255))
+Traceback (most recent call last):
+  File "<stdin>", line 1, in ?
+UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 6:
+                    ordinal not in range(128)
+</pre>
+<p>The <tt class="docutils literal"><span class="pre">errors</span></tt> argument specifies what to do if the string can't be decoded to
+ascii. Legal values for this argument are <tt class="docutils literal"><span class="pre">'strict'</span></tt> (raise a
+<tt class="docutils literal"><span class="pre">UnicodeDecodeError</span></tt> exception), <tt class="docutils literal"><span class="pre">'replace'</span></tt> (replace the character that
+can't be decoded with another one), or <tt class="docutils literal"><span class="pre">'ignore'</span></tt> (just leave the character
+out of the Unicode result).</p>
+<blockquote>
+<pre class="doctest-block">
+>>> unicode('\x80abc', errors='strict')
+Traceback (most recent call last):
+  File "<stdin>", line 1, in ?
+UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0:
+                    ordinal not in range(128)
+>>> unicode('\x80abc', errors='replace')
+u'\ufffdabc'
+>>> unicode('\x80abc', errors='ignore')
+u'abc'
+</pre>
+</blockquote>
+<p>It is important to understand the difference between <em>encoding</em> and <em>decoding</em>.
+Unicode strings are considered to be the Unicode code points but any
+representation of the Unicode string has to be encoded to something else, for
+example UTF-8 or ASCII. So when you are converting an ASCII or UTF-8 string to
+Unicode you are <em>decoding</em> it and when you are converting from Unicode to UTF-8
+or ASCII you are <em>encoding</em> it. This is why the error in the example above says
+that the ASCII codec cannot decode the byte <tt class="docutils literal"><span class="pre">0x80</span></tt> from ASCII to Unicode
+because it is not in the range(128) or 0-127. In fact <tt class="docutils literal"><span class="pre">0x80</span></tt> is hex for 128
+which the first number outside the ASCII range. However if we tell Python that
+the character <tt class="docutils literal"><span class="pre">0x80</span></tt> is encoded with the <tt class="docutils literal"><span class="pre">'latin-1'</span></tt>, <tt class="docutils literal"><span class="pre">'iso_8859_1'</span></tt> or
+<tt class="docutils literal"><span class="pre">'8859'</span></tt> character sets (which incidentally are different names for the same
+thing) we get the result we expected:</p>
+<textarea name="code" class="python">
+>>> unicode('\x80', encoding='latin-1')
+u'\x80'
+</textarea><div class="note">
+<p class="first admonition-title">Note</p>
+<p class="last">The character encodings Python supports are listed at
+<a href="http://docs.python.org/lib/standard-encodings.html" class="reference">http://docs.python.org/lib/standard-encodings.html</a></p>
+</div>
+<p>Unicode objects in Python have most of the same methods that normal Python
+strings provide. Python will try to use the <tt class="docutils literal"><span class="pre">'ascii'</span></tt> codec to convert
+strings to Unicode if you do an operation on both types:</p>
+<textarea name="code" class="python">
+>>> a = 'hello'
+>>> b = unicode(' world!')
+>>> print a + b
+u'hello world!'
+</textarea><p>You can encode a Unicode string using a particular encoding like this:</p>
+<textarea name="code" class="python">
+>>> u'Hello World!'.encode('UTF-8')
+'Hello World!'
+</textarea></div>
+<div class="section">
+<h2><a href="#id4" id="unicode-literals-in-python-source-code" name="unicode-literals-in-python-source-code" class="toc-backref">1.3   Unicode Literals in Python Source Code</a></h2>
+<p>In Python source code, Unicode literals are written as strings prefixed with
+the 'u' or 'U' character:</p>
+<textarea name="code" class="python">
+>>> u'abcdefghijk'
+>>> U'lmnopqrstuv'
+</textarea><p>You can also use <tt class="docutils literal"><span class="pre">"</span></tt>, <tt class="docutils literal"><span class="pre">"""`</span></tt> or <tt class="docutils literal"><span class="pre">'''</span></tt> versions too. For example:</p>
+<textarea name="code" class="python">
+>>> u"""This
+... is a really long
+... Unicode string"""
+</textarea><p>Specific code points can be written using the <tt class="docutils literal"><span class="pre">\u</span></tt> escape sequence, which is
+followed by four hex digits giving the code point. If you use <tt class="docutils literal"><span class="pre">\U</span></tt> instead
+you specify 8 hex digits instead of 4. Unicode literals can also use the same
+escape sequences as 8-bit strings, including <tt class="docutils literal"><span class="pre">\x</span></tt>, but <tt class="docutils literal"><span class="pre">\x</span></tt> only takes two
+hex digits so it can't express all the available code points. You can add
+characters to Unicode strings using the <tt class="docutils literal"><span class="pre">unichr()</span></tt> built-in function and find
+out what the ordinal is with <tt class="docutils literal"><span class="pre">ord()</span></tt>.</p>
+<p>Here is an example demonstrating the different alternatives:</p>
+<textarea name="code" class="python">
+>>> s = u"\x66\u0072\u0061\U0000006e" + unichr(231) + u"ais"
+>>> #     ^^^^ two-digit hex escape
+>>> #         ^^^^^^ four-digit Unicode escape
+>>> #                     ^^^^^^^^^^ eight-digit Unicode escape
+>>> for c in s:  print ord(c),
+...
+97 102 114 97 110 231 97 105 115
+>>> print s
+franÁais
+</textarea><p>Using escape sequences for code points greater than 127 is fine in small doses
+but Python 2.4 and above support writing Unicode literals in any encoding as
+long as you declare the encoding being used by including a special comment as
+either the first or second line of the source file:</p>
+<textarea name="code" class="python">
+#!/usr/bin/env python
+# -*- coding: latin-1 -*-
+
+u = u'abcdÈ'
+print ord(u[-1])
+</textarea><p>If you don't include such a comment, the default encoding used will be ASCII.
+Versions of Python before 2.4 were Euro-centric and assumed Latin-1 as a
+default encoding for string literals; in Python 2.4, characters greater than
+127 still work but result in a warning. For example, the following program has
+no encoding declaration:</p>
+<textarea name="code" class="python">
+#!/usr/bin/env python
+u = u'abcdÈ'
+print ord(u[-1])
+</textarea><p>When you run it with Python 2.4, it will output the following warning:</p>
+<pre class="literal-block">
+sys:1: DeprecationWarning: Non-ASCII character '\xe9' in file testas.py on line
+2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for de
+tails
+</pre>
+<p>and then the following output:</p>
+<pre class="literal-block">
+233
+</pre>
+<p>For real world use it is recommended that you use the UTF-8 encoding for your
+file but you must be sure that your text editor actually saves the file as
+UTF-8 otherwise the Python interpreter will try to parse UTF-8 characters but
+they will actually be stored as something else.</p>
+<div class="note">
+<p class="first admonition-title">Note</p>
+<p class="last">Windows users who use the <a href="http://www.scintilla.org/SciTE.html" class="reference">SciTE</a>
+editor can specify the encoding of their file from the menu using the
+<tt class="docutils literal"><span class="pre">File->Encoding</span></tt>.</p>
+</div>
+<div class="note">
+<p class="first admonition-title">Note</p>
+<p class="last">If you are working with Unicode in detail you might also be interested in
+the <tt class="docutils literal"><span class="pre">unicodedata</span></tt> module which can be used to find out Unicode properties
+such as a character's name, category, numeric value and the like.</p>
+</div>
+</div>
+<div class="section">
+<h2><a href="#id5" id="input-and-output" name="input-and-output" class="toc-backref">1.4   Input and Output</a></h2>
+<p>We now know how to use Unicode in Python source code but input and output can
+also be different using Unicode. Of course, some libraries natively support
+Unicode and if these libraries return Unicode objects you will not have to do
+anything special to support them. XML parsers and SQL databases frequently
+support Unicode for example.</p>
+<p>If you remember from the discussion earlier, Unicode data consists of code
+points. In order to send Unicode data via a socket or write it to a file you
+usually need to encode it to a series of bytes and then decode the data back to
+Unicode when reading it. You can of course perform the encoding manually
+reading a byte at the time but since encodings such as UTF-8 can have variable
+numbers of bytes per character it is usually much easier to use Python's
+built-in support in the form of the <tt class="docutils literal"><span class="pre">codecs</span></tt> module.</p>
+<p>The codecs module includes a version of the <tt class="docutils literal"><span class="pre">open()</span></tt> function that
+returns a file-like object that assumes the file's contents are in a specified
+encoding and accepts Unicode parameters for methods such as <tt class="docutils literal"><span class="pre">.read()</span></tt> and
+<tt class="docutils literal"><span class="pre">.write()</span></tt>.</p>
+<p>The function's parameters are open(filename, mode='rb', encoding=None,
+errors='strict', buffering=1). <tt class="docutils literal"><span class="pre">mode</span></tt> can be 'r', 'w', or 'a', just like the
+corresponding parameter to the regular built-in <tt class="docutils literal"><span class="pre">open()</span></tt> function. You can
+add a <tt class="docutils literal"><span class="pre">+</span></tt> character to update the file. <tt class="docutils literal"><span class="pre">buffering</span></tt> is similar to the
+standard function's parameter. <tt class="docutils literal"><span class="pre">encoding</span></tt> is a string giving the encoding to
+use, if not specified or specified as <tt class="docutils literal"><span class="pre">None</span></tt>, a regular Python file object
+that accepts 8-bit strings is returned.  Otherwise, a wrapper object is
+returned, and data written to or read from the wrapper object will be converted
+as needed. <tt class="docutils literal"><span class="pre">errors</span></tt> specifies the action for encoding errors and can be one
+of the usual values of <tt class="docutils literal"><span class="pre">'strict'</span></tt>, <tt class="docutils literal"><span class="pre">'ignore'</span></tt>, or <tt class="docutils literal"><span class="pre">'replace'</span></tt> which we
+saw right at the begining of this document when we were encoding strings in
+Python source files.</p>
+<p>Here is an example of how to read Unicode from a UTF-8 encoded file:</p>
+<textarea name="code" class="python">
+import codecs
+f = codecs.open('unicode.txt', encoding='utf-8')
+for line in f:
+    print repr(line)
+</textarea><p>It's also possible to open files in update mode, allowing both reading and writing:</p>
+<textarea name="code" class="python">
+f = codecs.open('unicode.txt', encoding='utf-8', mode='w+')
+f.write(u"\x66\u0072\u0061\U0000006e" + unichr(231) + u"ais")
+f.seek(0)
+print repr(f.readline()[:1])
+f.close()
+</textarea><p>Notice that we used the <tt class="docutils literal"><span class="pre">repr()</span></tt> function to display the Unicode data. This
+is very useful because if you tried to print the Unicode data directly, Python
+would need to encode it before it could be sent the console and depending on
+which characters were present and the character set used by the console, an
+error might be raised. This is avoided if you use <tt class="docutils literal"><span class="pre">repr()</span></tt>.</p>
+<p>The Unicode character <tt class="docutils literal"><span class="pre">U+FEFF</span></tt> is used as a byte-order mark or BOM, and is often
+written as the first character of a file in order to assist with auto-detection
+of the file's byte ordering. Some encodings, such as UTF-16, expect a BOM to be
+present at the start of a file, but with others such as UTF-8 it isn't necessary.</p>
+<p>When such an encoding is used, the BOM will be automatically written as the
+first character and will be silently dropped when the file is read. There are
+variants of these encodings, such as 'utf-16-le' and 'utf-16-be' for
+little-endian and big-endian encodings, that specify one particular byte
+ordering and don't skip the BOM.</p>
+<div class="note">
+<p class="first admonition-title">Note</p>
+<p class="last">Some editors including SciTE will put a byte order mark (BOM) in the text
+file when saved as UTF-8, which is strange because UTF-8 doesn't need BOMs.</p>
+</div>
+</div>
+<div class="section">
+<h2><a href="#id6" id="unicode-filenames" name="unicode-filenames" class="toc-backref">1.5   Unicode Filenames</a></h2>
+<p>Most modern operating systems support the use of Unicode filenames. The
+filenames are transparently converted to the underlying filesystem encoding.
+The type of encoding depends on the operating system.</p>
+<p>On Windows 9x, the encoding is <tt class="docutils literal"><span class="pre">mbcs</span></tt>.</p>
+<p>On Mac OS X, the encoding is <tt class="docutils literal"><span class="pre">utf-8</span></tt>.</p>
+<p>On Unix, the encoding is the user's preference according to the
+result of nl_langinfo(CODESET), or None if the nl_langinfo(CODESET) failed.</p>
+<p>On Windows NT+, file names are Unicode natively, so no conversion is performed.
+getfilesystemencoding still returns <tt class="docutils literal"><span class="pre">mbcs</span></tt>, as this is the encoding that
+applications should use when they explicitly want to convert Unicode strings to
+byte strings that are equivalent when used as file names.</p>
+<p><tt class="docutils literal"><span class="pre">mbcs</span></tt> is a special encoding for Windows that effectively means "use
+whichever encoding is appropriate". In Python 2.3 and above you can find out
+the system encoding with <tt class="docutils literal"><span class="pre">sys.getfilesystemencoding()</span></tt>.</p>
+<p>Most file and directory functions and methods support Unicode. For example:</p>
+<textarea name="code" class="python">
+filename = u"\x66\u0072\u0061\U0000006e" + unichr(231) + u"ais"
+f = open(filename, 'w')
+f.write('Some data\n')
+f.close()
+</textarea><p>Other functions such as <tt class="docutils literal"><span class="pre">os.listdir()</span></tt> will return Unicode if you pass a
+Unicode argument and will try to return strings if you pass an ordinary 8 bit
+string. For example running this example as <tt class="docutils literal"><span class="pre">test.py</span></tt>:</p>
+<textarea name="code" class="python">
+filename = u"Sample " + unichar(5000)
+f = open(filename, 'w')
+f.close()
+
+import os
+print os.listdir('.')
+print os.listdir(u'.')
+</textarea><p>will produce the following output:</p>
+<blockquote>
+['Sample?', 'test.py']
+[u'Sampleu1388', u'test.py']</blockquote>
+</div>
+</div>
+<div class="section">
+<h1><a href="#id7" id="applying-this-to-web-programming" name="applying-this-to-web-programming" class="toc-backref">2   Applying this to Web Programming</a></h1>
+<p>So far we've seen how to use encoding in source files and seen how to decode
+text to Unicode and encode it back to text. We've also seen that Unicode
+objects can be manipulated in similar ways to strings and we've seen how to
+perform input and output operations on files. Next we are going to look at how
+best to use Unicode in a web app.</p>
+<p>The main rule is this:</p>
+<pre class="literal-block">
+Your application should use Unicode for all strings internally, decoding
+any input to Unicode as soon as it enters the application and encoding the
+Unicode to UTF-8 or another encoding only on output.
+</pre>
+<p>If you fail to do this you will find that <tt class="docutils literal"><span class="pre">UnicodeDecodeError</span></tt> s will start
+popping up in unexpected places when Unicode strings are used with normal 8-bit
+strings because Python's default encoding is ASCII and it will try to decode
+the text to ASCII and fail. It is always better to do any encoding or decoding
+at the edges of your application otherwise you will end up patching lots of
+different parts of your application unnecessarily as and when errors pop up.</p>
+<p>Unless you have a very good reason not to it is wise to use UTF-8 as the
+default encoding since it is so widely supported.</p>
+<p>The second rule is:</p>
+<pre class="literal-block">
+Always test your application with characters above 127 and above 255
+wherever possible.
+</pre>
+<p>If you fail to do this you might think your application is working fine, but as
+soon as your users do put in non-ASCII characters you will have problems.
+Using arabic is always a good test and www.google.ae is a good source of sample
+text.</p>
+<p>The third rule is:</p>
+<pre class="literal-block">
+Always do any checking of a string for illegal characters once it's in the
+form that will be used or stored, otherwise the illegal characters might be
+disguised.
+</pre>
+<p>For example, let's say you have a content management system that takes a
+Unicode filename, and you want to disallow paths with a '/' character. You
+might write this code:</p>
+<textarea name="code" class="python">
+def read_file(filename, encoding):
+    if '/' in filename:
+        raise ValueError("'/' not allowed in filenames")
+    unicode_name = filename.decode(encoding)
+    f = open(unicode_name, 'r')
+    # ... return contents of file ...
+</textarea><p>This is INCORRECT. If an attacker could specify the 'base64' encoding, they
+could pass <tt class="docutils literal"><span class="pre">L2V0Yy9wYXNzd2Q=</span></tt> which is the base-64 encoded form of the string
+<tt class="docutils literal"><span class="pre">'/etc/passwd'</span></tt> which is a file you clearly don't want an attacker to get
+hold of.  The above code looks for <tt class="docutils literal"><span class="pre">/</span></tt> characters in the encoded form and
+misses the dangerous character in the resulting decoded form.</p>
+<p>Those are the three basic rules so now we will look at some of the places you
+might want to perform Unicode decoding in a Pylons application.</p>
+<div class="section">
+<h2><a href="#id8" id="request-parameters" name="request-parameters" class="toc-backref">2.1   Request Parameters</a></h2>
+<p>Currently the Pylons input values come from <tt class="docutils literal"><span class="pre">request.params</span></tt> but these are
+not decoded to Unicode by default because not all input should be assumed to be
+Unicode data.</p>
+<p>If you would like However you can use the two functions below:</p>
+<textarea name="code" class="python">
+def decode_multi_dict(md, encoding="UTF-8", errors="strict"):
+    """Given a MultiDict, decode all its parts from the given encoding.
+
+    This modifies the MultiDict in place.
+
+    encoding, strict
+      These are passed to the decode function.
+
+    """
+    items = md.items()
+    md.clear()
+    for (k, v) in items:
+        md.add(k.decode(encoding, errors),
+               v.decode(encoding, errors))
+
+
+def decode_request(request, encoding="UTF-8", errors="strict"):
+    """Given a request object, decode GET and POST in place.
+
+    This implicitly takes care of params as well.
+
+    """
+    decode_multi_dict(request.GET, encoding, errors)
+    decode_multi_dict(request.POST, encoding, errors)
+</textarea><p>These can then be used as follows:</p>
+<textarea name="code" class="python">
+unicode_params = decode_request(request.params)
+</textarea><p>This code is discussed in <a href="http://pylonshq.com/project/pylonshq/ticket/135" class="reference">ticket 135</a> but shouldn't be used with
+file uploads since these shouldn't ordinarily be decoded to Unicode.</p>
+</div>
+<div class="section">
+<h2><a href="#id9" id="templating" name="templating" class="toc-backref">2.2   Templating</a></h2>
+<p>Pylons uses Myghty as its default templating language and Myghty 1.1 and above
+fully support Unicode. The Myghty documentation explains how to use Unicode and
+you at <a href="http://www.myghty.org/docs/unicode.myt" class="reference">http://www.myghty.org/docs/unicode.myt</a> but the important idea is that
+you can Unicode literals pretty much anywhere you can use normal 8-bit strings
+including in <tt class="docutils literal"><span class="pre">m.write()</span></tt> and <tt class="docutils literal"><span class="pre">m.comp()</span></tt>. You can also pass Unicode data to
+Pylons' <tt class="docutils literal"><span class="pre">render_response()</span></tt> and <tt class="docutils literal"><span class="pre">Response()</span></tt> callables.</p>
+<p>Any Unicode data output by Myghty is automatically decoded to whichever
+encoding you have chosen. The default is UTF-8 but you can choose which
+encoding to use by editing your project's <tt class="docutils literal"><span class="pre">config/environment.py</span></tt> file and
+adding an option like this:</p>
+<textarea name="code" class="python">
+# Add your own Myghty config options here, note that all config options will override
+# any Pylons config options
+
+myghty['output_encoding'] = 'UTF-8'
+</textarea><p>replacing <tt class="docutils literal"><span class="pre">UTF-8</span></tt> with the encoding you wish to use.</p>
+<p>If you need to disable Unicode support altogether you can set this:</p>
+<textarea name="code" class="python">
+myghty['disable_unicode'] = True
+</textarea><p>but again, you would have to have a good reason to want to do this.</p>
+</div>
+<div class="section">
+<h2><a href="#id10" id="output-encoding" name="output-encoding" class="toc-backref">2.3   Output Encoding</a></h2>
+<p>Web pages should be generated with a specific encoding, most likely UTF-8. At
+the very least, that means you should specify the following in the <tt class="docutils literal"><span class="pre"><head></span></tt>
+section:</p>
+<pre class="literal-block">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</pre>
+<p>You should also set the charset in the <tt class="docutils literal"><span class="pre">Content-Type</span></tt> header:</p>
+<textarea name="code" class="python">
+respones = Response(...)
+response.headers['Content-type'] = 'text/html; charset=utf-8'
+</textarea><p>If you specify that your output is UTF-8, generally the web browser will
+give you UTF-8. If you want the browser to submit data using a different
+character set, you can set the encoding by adding the <tt class="docutils literal"><span class="pre">accept-encoding</span></tt>
+tag to your form. Here is an example:</p>
+<pre class="literal-block">
+<form accept-encoding="US-ASCII" ...>
+</pre>
+<p>However, be forewarned that if the user tries to give you non-ASCII
+text, then:</p>
+<blockquote>
+<ul class="simple">
+<li>Firefox will translate the non-ASCII text into HTML entities.</li>
+<li>IE will ignore your suggested encoding and give you UTF-8 anyway.</li>
+</ul>
+</blockquote>
+<p>The lesson to be learned is that if you output UTF-8, you had better be
+prepared to accept UTF-8 by decoding the data in <tt class="docutils literal"><span class="pre">request.params</span></tt> as
+described in the section above entitled "Request Parameters".</p>
+<p>Another technique which is sometimes used to determine the character set is to
+use an algorithm to analyse the input and guess the encoding based on
+probabilities.</p>
+<p>For instance, if you get a file, and you don't know what encoding it is encoded
+in, you can often rename the file with a .txt extension and then try to open it
+in Firefox.  Then you can use the "View->Character Encoding" menu to try to
+auto-detect the encoding.</p>
+</div>
+<div class="section">
+<h2><a href="#id11" id="databases" name="databases" class="toc-backref">2.4   Databases</a></h2>
+<p>Your database driver should automatically convert from Unicode objects to a
+particular charset when writing and back again when reading. Again it is normal
+to use UTF-8 which is well supported.</p>
+<p>You should check your database's documentation for information on how it handles
+Unicode.</p>
+<p>For example MySQL's Unicode documentation is here
+<a href="http://dev.mysql.com/doc/refman/5.0/en/charset-unicode.html" class="reference">http://dev.mysql.com/doc/refman/5.0/en/charset-unicode.html</a></p>
+<p>Also note that you need to consider both the encoding of the database
+and the encoding used by the database driver.</p>
+<p>If you're using MySQL together with SQLAlchemy, see the following, as
+there are some bugs in MySQLdb that you'll need to work around:</p>
+<p><a href="http://www.mail-archive.com/sqlalchemy@googlegroups.com/msg00366.html" class="reference">http://www.mail-archive.com/sqlalchemy@googlegroups.com/msg00366.html</a></p>
+</div>
+</div>
+<div class="section">
+<h1><a href="#id12" id="internationalization-and-localization" name="internationalization-and-localization" class="toc-backref">3   Internationalization and Localization</a></h1>
+<p>By now you should have a good idea of what Unicode is, how to use it in Python
+and which areas of you application need to pay specific attention to decoding and
+encoding Unicode data.</p>
+<p>This final section will look at the issue of making your application work with
+multiple languages.</p>
+<div class="section">
+<h2><a href="#id13" id="getting-started" name="getting-started" class="toc-backref">3.1   Getting Started</a></h2>
+<p>Everywhere in your code where you want strings to be available in different
+languages you wrap them in the <tt class="docutils literal"><span class="pre">_()</span></tt> function. There
+are also a number of other translation functions which are documented in the API reference at
+<a href="http://pylonshq.com/docs/module-pylons.i18n.translation.html" class="reference">http://pylonshq.com/docs/module-pylons.i18n.translation.html</a></p>
+<div class="note">
+<p class="first admonition-title">Note</p>
+<p class="last">The <tt class="docutils literal"><span class="pre">_()</span></tt> function is a reference to the <tt class="docutils literal"><span class="pre">ugettext()</span></tt> function.
+<tt class="docutils literal"><span class="pre">_()</span></tt> is a convention for marking text to be translated and saves on keystrokes.
+<tt class="docutils literal"><span class="pre">ugettext()</span></tt> is the Unicode version of <tt class="docutils literal"><span class="pre">gettext()</span></tt>.</p>
+</div>
+<p>In our example we want the string <tt class="docutils literal"><span class="pre">'Hello'</span></tt> to appear in three different
+languages: English, French and Spanish. We also want to display the word
+<tt class="docutils literal"><span class="pre">'Hello'</span></tt> in the default language. We'll then go on to use some pural words
+too.</p>
+<p>Lets call our project <tt class="docutils literal"><span class="pre">translate_demo</span></tt>:</p>
+<pre class="literal-block">
+paster create --template=pylons translate_demo
+</pre>
+<p>Now lets add a friendly controller that says hello:</p>
+<pre class="literal-block">
+cd translate_demo
+paster controller hello
+</pre>
+<p>Edit <tt class="docutils literal"><span class="pre">controllers/hello.py</span></tt> controller to look like this making use of the
+<tt class="docutils literal"><span class="pre">_()</span></tt> function everywhere where the string <tt class="docutils literal"><span class="pre">Hello</span></tt> appears:</p>
+<textarea name="code" class="python">
+from translate_demo.lib.base import *
+
+class HelloController(BaseController):
+
+    def index(self):
+        resp = Response()
+        resp.write('Default: %s<br />' % _('Hello'))
+        for lang in ['fr','en','es']:
+            h.set_lang(lang)
+            resp.write("%s: %s<br />" % (h.get_lang(), _('Hello')))
+        return resp
+</textarea><p>When writing your controllers it is important not to piece sentences together manually because
+certain languages might need to invert the grammars. As an example this is bad:</p>
+<textarea name="code" class="python">
+# BAD!
+msg = _("He told her ")
+msg += _("not to go outside.")
+</textarea><p>but this is perfectly acceptable:</p>
+<textarea name="code" class="python">
+# GOOD
+msg = _("He told her not to go outside")
+</textarea><p>The controller has now been internationalized but it will raise a <tt class="docutils literal"><span class="pre">LanguageError</span></tt>
+until we have specified the alternative languages.</p>
+<p>Pylons uses <a href="http://www.gnu.org/software/gettext/" class="reference">GNU gettext</a> to handle
+internationalization. GNU gettext use three types of files in the
+translation framework.</p>
+<p>POT (Portable Object Template) files</p>
+<blockquote>
+The first step in the localization process. A program is used to search through
+your project's source code and pick out every string passed to one of the
+translation functions, such as <tt class="docutils literal"><span class="pre">_()</span></tt>. This list is put together in a
+specially-formatted template file that will form the basis of all
+translations. This is the <tt class="docutils literal"><span class="pre">.pot</span></tt> file.</blockquote>
+<p>PO (Portable Object) files</p>
+<blockquote>
+The second step in the localization process. Using the POT file as a template,
+the list of messages are translated and saved as a <tt class="docutils literal"><span class="pre">.po</span></tt> file.</blockquote>
+<p>MO (Machine Object) files</p>
+<blockquote>
+The final step in the localization process. The PO file is run through a
+program that turns it into an optimized machine-readable binary file, which is
+the <tt class="docutils literal"><span class="pre">.mo</span></tt> file. Compiling the translations to machine code makes the
+localized program much faster in retrieving the translations while it is
+running.</blockquote>
+<p>Versions of Pylons prior to 0.9.4 came with a setuptools extension to help with
+the extraction of strings and production of a <tt class="docutils literal"><span class="pre">.mo</span></tt> file. The implementation
+did not support Unicode nor the ungettext function and was therfore dropped in
+Python 0.9.4.</p>
+<p>You will therefore need to use an external program to perform these tasks.  You
+may use whichever you prefer but <tt class="docutils literal"><span class="pre">xgettext</span></tt> is highly recommended. Python's
+gettext utility has some bugs, especially regarding plurals.</p>
+<p>Here are some compatible tools and projects:</p>
+<p>The Rosetta Project (<a href="https://launchpad.ubuntu.com/rosetta/" class="reference">https://launchpad.ubuntu.com/rosetta/</a>)</p>
+<blockquote>
+The Ubuntu Linux project has a web site that allows you to translate
+messages without even looking at a PO or POT file, and export directly to a MO.</blockquote>
+<p>poEdit (<a href="http://www.poedit.org/" class="reference">http://www.poedit.org/</a>)</p>
+<blockquote>
+An open source program for Windows and UNIX/Linux which provides an easy-to-use
+GUI for editing PO files and generating MO files.</blockquote>
+<p>KBabel (<a href="http://i18n.kde.org/tools/kbabel/" class="reference">http://i18n.kde.org/tools/kbabel/</a>)</p>
+<blockquote>
+Another open source PO editing program for KDE.</blockquote>
+<p>GNU Gettext (<a href="http://www.gnu.org/software/gettext/" class="reference">http://www.gnu.org/software/gettext/</a>)</p>
+<blockquote>
+The official Gettext tools package contains command-line tools for creating
+POTs, manipulating POs, and generating MOs. For those comfortable with a
+command shell.</blockquote>
+<p>As an example we will quickly discuss the use of poEdit which is cross platform
+and has a GUI which makes it easier to get started with.</p>
+<p>To use poEdit with the <tt class="docutils literal"><span class="pre">translate_demo</span></tt> you would do the following:</p>
+<ol class="arabic simple">
+<li>Download and install poEdit.</li>
+<li>A dialog pops up. Fill in <em>all</em> the fields you can on the <tt class="docutils literal"><span class="pre">Project</span> <span class="pre">Info</span></tt> tab, enter the path to your project on the <tt class="docutils literal"><span class="pre">Paths</span></tt> tab (ie <tt class="docutils literal"><span class="pre">/path/to/translate_demo</span></tt>) and enter the following keywords on separate lines on the <tt class="docutils literal"><span class="pre">keywords</span></tt> tab: <tt class="docutils literal"><span class="pre">_</span></tt>, <tt class="docutils literal"><span class="pre">N_</span></tt>, <tt class="docutils literal"><span class="pre">ugettext</span></tt>, <tt class="docutils literal"><span class="pre">gettext</span></tt>, <tt class="docutils literal"><span class="pre">ngettext</span></tt>, <tt class="docutils literal"><span class="pre">ungettext</span></tt>.</li>
+<li>Click OK</li>
+</ol>
+<p>poEdit will search your source tree and find all the strings you have marked
+up. You can then enter your translations in whatever charset you chose in
+the project info tab. UTF-8 is a good choice.</p>
+<p>Finally, after entering your translations you then save the catalog and rename
+the <tt class="docutils literal"><span class="pre">.mo</span></tt> file produced to <tt class="docutils literal"><span class="pre">translate_demo.mo</span></tt> and put it in the
+<tt class="docutils literal"><span class="pre">translate_demo/i18n/es/LC_MESSAGES</span></tt> directory or whatever is appropriate for
+your translation.</p>
+<p>You will need to repeat the process of creating a <tt class="docutils literal"><span class="pre">.mo</span></tt> file for the <tt class="docutils literal"><span class="pre">fr</span></tt>,
+<tt class="docutils literal"><span class="pre">es</span></tt> and <tt class="docutils literal"><span class="pre">en</span></tt> translations.</p>
+<p>The relevant lines from <tt class="docutils literal"><span class="pre">i18n/en/LC_MESSAGES/translate_demo.po</span></tt> look like this:</p>
+<pre class="literal-block">
+#: translate_demo\controllers\hello.py:6 translate_demo\controllers\hello.py:9
+msgid "Hello"
+msgstr "Hello"
+</pre>
+<p>The relevant lines from <tt class="docutils literal"><span class="pre">i18n/es/LC_MESSAGES/translate_demo.po</span></tt> look like this:</p>
+<pre class="literal-block">
+#: translate_demo\controllers\hello.py:6 translate_demo\controllers\hello.py:9
+msgid "Hello"
+msgstr "°Hola!"
+</pre>
+<p>The relevant lines from <tt class="docutils literal"><span class="pre">i18n/fr/LC_MESSAGES/translate_demo.po</span></tt> look like this:</p>
+<pre class="literal-block">
+#: translate_demo\controllers\hello.py:6 translate_demo\controllers\hello.py:9
+msgid "Hello"
+msgstr "Bonjour"
+</pre>
+<p>Whichever tools you use you should end up with an <tt class="docutils literal"><span class="pre">i18n</span></tt> directory that looks
+like this when you have finished:</p>
+<pre class="literal-block">
+i18n/en/LC_MESSAGES/translate_demo.po
+i18n/en/LC_MESSAGES/translate_demo.mo
+i18n/es/LC_MESSAGES/translate_demo.po
+i18n/es/LC_MESSAGES/translate_demo.mo
+i18n/fr/LC_MESSAGES/translate_demo.po
+i18n/fr/LC_MESSAGES/translate_demo.mo
+</pre>
+</div>
+<div class="section">
+<h2><a href="#id14" id="testing-the-application" name="testing-the-application" class="toc-backref">3.2   Testing the Application</a></h2>
+<p>Start the server with the following command:</p>
+<pre class="literal-block">
+paster serve --reload development.ini
+</pre>
+<p>Test your controller by visiting <a href="http://localhost:5000/hello" class="reference">http://localhost:5000/hello</a>. You should see
+the following output:</p>
+<pre class="literal-block">
+Default: Hello
+fr: Bonjour
+en: Hello
+es: °Hola!
+</pre>
+<p>You can now set the language used in a controller on the fly.</p>
+<p>For example this could be used to allow a user to set which language they
+wanted your application to work in. You could save the value to the session
+object:</p>
+<textarea name="code" class="python">
+session['lang'] = 'en'
+</textarea><p>then on each controller call the language to be used could be read from the
+session and set in your controller's <tt class="docutils literal"><span class="pre">__before__()</span></tt> method so that the pages
+remained in the same language that was previously set:</p>
+<textarea name="code" class="python">
+def __before__(self, action):
+    if session.has_key('lang'):
+        h.set_lang(session['lang'])
+</textarea><p>One more useful thing to be able to do is to set the default language to be
+used in the configuration file. Just add a <tt class="docutils literal"><span class="pre">lang</span></tt> variable together with the
+code of the language you wanted to use in your <tt class="docutils literal"><span class="pre">development.ini</span></tt> file. For
+example to set the default language to Spanish you would add <tt class="docutils literal"><span class="pre">lang</span> <span class="pre">=</span> <span class="pre">es</span></tt> to
+your <tt class="docutils literal"><span class="pre">development.ini</span></tt>. The relevant part from the file might look something
+like this:</p>
+<textarea name="code" class="pasteini">
+[app:main]
+use = egg:translate_demo
+lang = es
+</textarea><p>If you are running the server with the <tt class="docutils literal"><span class="pre">--reload</span></tt> option the server will
+automatically restart if you change the <tt class="docutils literal"><span class="pre">development.ini</span></tt> file. Otherwise
+restart the server manually and the output would this time be as follows:</p>
+<pre class="literal-block">
+Default: °Hola!
+fr: Bonjour
+en: Hello
+es: °Hola!
+</pre>
+</div>
+<div class="section">
+<h2><a href="#id15" id="missing-translations" name="missing-translations" class="toc-backref">3.3   Missing Translations</a></h2>
+<p>If your code calls <tt class="docutils literal"><span class="pre">_()</span></tt> with a string that doesn't exist in your language
+catalogue, the string passed to <tt class="docutils literal"><span class="pre">_()</span></tt> is returned instead.</p>
+<p>Modify the last line of the hello controller to look like this:</p>
+<textarea name="code" class="python">
+resp.write("%s: %s %s<br />" % (h.get_lang(), _('Hello'), _('World!')))
+</textarea><div class="warning">
+<p class="first admonition-title">Warning</p>
+<p class="last">Of course, in real life breaking up sentences in this way is very dangerous because some
+grammars might require the order of the words to be different.</p>
+</div>
+<p>If you run the example again the output will be:</p>
+<pre class="literal-block">
+Default: °Hola!
+fr: Bonjour World!
+en: Hello World!
+es: °Hola! World!
+</pre>
+<p>This is because we never provided a translation for the string <tt class="docutils literal"><span class="pre">'World!'</span></tt> so
+the string itself is used.</p>
+</div>
+<div class="section">
+<h2><a href="#id16" id="translations-within-templates" name="translations-within-templates" class="toc-backref">3.4   Translations Within Templates</a></h2>
+<p>You can also use the <tt class="docutils literal"><span class="pre">_()</span></tt> function within templates in exactly the same way
+you do in code. For example:</p>
+<textarea name="code" class="html">
+<% _('Hello') %>
+</textarea><p>would produce the string <tt class="docutils literal"><span class="pre">'Hello'</span></tt> in the language you had set.</p>
+<p>There is one complication though. gettext's <tt class="docutils literal"><span class="pre">xgettext</span></tt> command can only extract
+strings that need translating from Python code in <tt class="docutils literal"><span class="pre">.py</span></tt> files. This means
+that if you write <tt class="docutils literal"><span class="pre">_('Hello')</span></tt> in a template such as a Myghty template,
+<tt class="docutils literal"><span class="pre">xgettext</span></tt> will not find the string <tt class="docutils literal"><span class="pre">'Hello'</span></tt> as one which needs
+translating.</p>
+<p>As long as <tt class="docutils literal"><span class="pre">xgettext</span></tt> can find a string marked for translation with one
+of the translation functions and defined in Python code in your project
+filesystem it will manage the translation when the same string is defined in a
+Myghty template and marked for translation.</p>
+<p>One solution to ensure all strings are picked up for translation is to create a
+file in <tt class="docutils literal"><span class="pre">lib</span></tt> with an appropriate filename, <tt class="docutils literal"><span class="pre">i18n.py</span></tt> for example, and then
+add a list of all the strings which appear in your templates so that your
+translation tool can then extract the strings in <tt class="docutils literal"><span class="pre">lib/i18n.py</span></tt> for
+translation and use the translated versions in your templates as well.</p>
+<p>For example if you wanted to ensure the translated string <tt class="docutils literal"><span class="pre">'Good</span> <span class="pre">Morning'</span></tt>
+was available in all templates you could create a <tt class="docutils literal"><span class="pre">lib/i18n.py</span></tt> file that
+looked something like this:</p>
+<textarea name="code" class="python">
+from base import _
+_('Good Morning')
+</textarea><p>This approach requires quite a lot of work and is rather fragile. The best
+solution if you are using a templating system such as Myghty or Cheetah which
+uses compiled Python files is to use a Makefile to ensure that every template
+is compiled to Python before running the extraction tool to make sure that
+every template is scanned.</p>
+<p>Of course, if your cache directory is in the default location or elsewhere
+within your project's filesystem, you will probably find that all templates
+have been compiled as Python files during the course of the development process.
+This means that your tool's extraction command will successfully pick up
+strings to translate from the cached files anyway.</p>
+<p>You may also find that your extraction tool is capable of extracting the
+strings correctly from the template anyway, particularly if the templating
+langauge is quite similar to Python. It is best not to rely on this though.</p>
+</div>
+<div class="section">
+<h2><a href="#id17" id="producing-a-python-egg" name="producing-a-python-egg" class="toc-backref">3.5   Producing a Python Egg</a></h2>
+<p>Finally you can produce an egg of your project which includes the translation
+files like this:</p>
+<pre class="literal-block">
+python setup.py bdist_egg
+</pre>
+<p>The <tt class="docutils literal"><span class="pre">setup.py</span></tt> automatically includes the <tt class="docutils literal"><span class="pre">.mo</span></tt> language catalogs your
+application needs so that your application can be distributed as an egg. This
+is done with the following line in your <tt class="docutils literal"><span class="pre">setup.py</span></tt> file:</p>
+<pre class="literal-block">
+package_data={'translate_demo': ['i18n/*/LC_MESSAGES/*.mo']},
+</pre>
+<p>Internationalization support is zip safe so your application can be run
+directly from the egg without the need for <tt class="docutils literal"><span class="pre">easy_install</span></tt> to extract it.</p>
+</div>
+<div class="section">
+<h2><a href="#id18" id="plural-forms" name="plural-forms" class="toc-backref">3.6   Plural Forms</a></h2>
+<p>Pylons also defines <tt class="docutils literal"><span class="pre">ungettext()</span></tt> and <tt class="docutils literal"><span class="pre">ngettext()</span></tt> functions which can be imported
+from <tt class="docutils literal"><span class="pre">pylons.i18n</span></tt>. They are designed for internationalizing plural words and can be
+used as follows:</p>
+<textarea name="code" class="python">
+from pylons.i18n import ungettext
+
+ungettext(
+    'There is %(num)d file here',
+    'There are %(num)d files here',
+    n
+) % {'num': n}
+</textarea><p>If you wish to use plural forms in your application you need to add the appropriate
+headers to the <tt class="docutils literal"><span class="pre">.po</span></tt> files for the language you are using. You can read more about
+this at <a href="http://www.gnu.org/software/gettext/manual/html_chapter/gettext_10.html#SEC150" class="reference">http://www.gnu.org/software/gettext/manual/html_chapter/gettext_10.html#SEC150</a></p>
+<p>One thing to keep in mind is that other languages don't have the same
+plural forms as English.  While English only has 2 pulral forms, singular and
+plural, Slovenian has 4!  That means that you must use gettext's
+support for pluralization if you hope to get pluralization right.
+Specifically, the following will not work:</p>
+<textarea name="code" class="python">
+# BAD!
+    if n == 1:
+        msg = _("There was no dog.")
+    else:
+        msg = _("There were no dogs.")
+</textarea></div>
+</div>
+<div class="section">
+<h1><a href="#id19" id="summary" name="summary" class="toc-backref">4   Summary</a></h1>
+<p>Hopefully you now understand the history of Unicode, how to use it in Python
+and where to apply Unicode encoding and decoding in a Pylons application. You
+should also be able to use Unicode in your web app remembering the basic rule to
+use UTF-8 to talk to the world, do the encode and decode at the edge of your
+application.</p>
+<p>You should also be able to internationalize and then localize your application
+using Pylons' support for GNU gettext.</p>
+</div>
+<div class="section">
+<h1><a href="#id20" id="further-reading" name="further-reading" class="toc-backref">5   Further Reading</a></h1>
+<p>This information is based partly on the following articles which can be
+consulted for further information.:</p>
+<p><a href="http://www.joelonsoftware.com/articles/Unicode.html" class="reference">http://www.joelonsoftware.com/articles/Unicode.html</a></p>
+<p><a href="http://www.amk.ca/python/howto/unicode" class="reference">http://www.amk.ca/python/howto/unicode</a></p>
+<p><a href="http://en.wikipedia.org/wiki/Internationalization" class="reference">http://en.wikipedia.org/wiki/Internationalization</a></p>
+<p>Please feel free to report any mistakes to the Pylons mailing list or to the
+author. Any corrections or clarifications would be gratefully received.</p>
+</div>
+
+</div>
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/test/templates/modtest.html b/lib/Mako-0.7.3/test/templates/modtest.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/modtest.html
@@ -0,0 +1,1 @@
+this is a test
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/test/templates/othersubdir/foo.html b/lib/Mako-0.7.3/test/templates/othersubdir/foo.html
new file mode 100644
diff --git a/lib/Mako-0.7.3/test/templates/read_unicode.html b/lib/Mako-0.7.3/test/templates/read_unicode.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/read_unicode.html
@@ -0,0 +1,10 @@
+<% 
+try:
+    file_content = open(path)
+except:
+    raise "Should never execute here"
+doc_content = ''.join(file_content.readlines())
+file_content.close()
+%>
+
+${unicode(doc_content, encoding='utf-8')}
diff --git a/lib/Mako-0.7.3/test/templates/read_unicode_py3k.html b/lib/Mako-0.7.3/test/templates/read_unicode_py3k.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/read_unicode_py3k.html
@@ -0,0 +1,10 @@
+<% 
+try:
+    file_content = open(path, encoding='utf-8', errors='ignore')
+except:
+    raise "Should never execute here"
+doc_content = ''.join(file_content.readlines())
+file_content.close()
+%>
+
+${bytes(doc_content, encoding='utf-8')}
diff --git a/lib/Mako-0.7.3/test/templates/runtimeerr.html b/lib/Mako-0.7.3/test/templates/runtimeerr.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/runtimeerr.html
@@ -0,0 +1,4 @@
+<%
+    print y
+    y = 10
+%>
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/test/templates/runtimeerr_py3k.html b/lib/Mako-0.7.3/test/templates/runtimeerr_py3k.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/runtimeerr_py3k.html
@@ -0,0 +1,4 @@
+<%
+    print(y)
+    y = 10
+%>
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/test/templates/subdir/foo/modtest.html.py b/lib/Mako-0.7.3/test/templates/subdir/foo/modtest.html.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/subdir/foo/modtest.html.py
@@ -0,0 +1,25 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1267565427.799504
+_template_filename='/Users/classic/dev/mako/test/templates/subdir/modtest.html'
+_template_uri='/subdir/modtest.html'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = []
+
+
+def render_body(context,**pageargs):
+    context.caller_stack._push_frame()
+    try:
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
+        __M_writer = context.writer()
+        # SOURCE LINE 1
+        __M_writer(u'this is a test')
+        return ''
+    finally:
+        context.caller_stack._pop_frame()
+
+
diff --git a/lib/Mako-0.7.3/test/templates/subdir/incl.html b/lib/Mako-0.7.3/test/templates/subdir/incl.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/subdir/incl.html
@@ -0,0 +1,2 @@
+
+    this is include 2
diff --git a/lib/Mako-0.7.3/test/templates/subdir/index.html b/lib/Mako-0.7.3/test/templates/subdir/index.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/subdir/index.html
@@ -0,0 +1,3 @@
+
+    this is sub index
+    <%include file="incl.html"/>
diff --git a/lib/Mako-0.7.3/test/templates/subdir/modtest.html b/lib/Mako-0.7.3/test/templates/subdir/modtest.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/subdir/modtest.html
@@ -0,0 +1,1 @@
+this is a test
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/test/templates/unicode.html b/lib/Mako-0.7.3/test/templates/unicode.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/unicode.html
@@ -0,0 +1,2 @@
+## -*- coding: utf-8 -*-
+Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/test/templates/unicode_arguments.html b/lib/Mako-0.7.3/test/templates/unicode_arguments.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/unicode_arguments.html
@@ -0,0 +1,10 @@
+# coding: utf-8
+
+<%def name="my_def(x)">
+    x is: ${x}
+</%def>
+
+${my_def(u'drôle de petite voix m’a réveillé')}
+<%self:my_def x='drôle de petite voix m’a réveillé'/>
+<%self:my_def x="${u'drôle de petite voix m’a réveillé'}"/>
+<%call expr="my_def(u'drôle de petite voix m’a réveillé')"/>
diff --git a/lib/Mako-0.7.3/test/templates/unicode_arguments_py3k.html b/lib/Mako-0.7.3/test/templates/unicode_arguments_py3k.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/unicode_arguments_py3k.html
@@ -0,0 +1,10 @@
+# coding: utf-8
+
+<%def name="my_def(x)">
+    x is: ${x}
+</%def>
+
+${my_def('drôle de petite voix m’a réveillé')}
+<%self:my_def x='drôle de petite voix m’a réveillé'/>
+<%self:my_def x="${'drôle de petite voix m’a réveillé'}"/>
+<%call expr="my_def('drôle de petite voix m’a réveillé')"/>
diff --git a/lib/Mako-0.7.3/test/templates/unicode_code.html b/lib/Mako-0.7.3/test/templates/unicode_code.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/unicode_code.html
@@ -0,0 +1,7 @@
+## -*- coding: utf-8 -*-
+<%
+    x = u"drôle de petite voix m’a réveillé."
+%>
+% if x==u"drôle de petite voix m’a réveillé.":
+    hi, ${x}
+% endif
diff --git a/lib/Mako-0.7.3/test/templates/unicode_code_py3k.html b/lib/Mako-0.7.3/test/templates/unicode_code_py3k.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/unicode_code_py3k.html
@@ -0,0 +1,7 @@
+## -*- coding: utf-8 -*-
+<%
+    x = "drôle de petite voix m’a réveillé."
+%>
+% if x=="drôle de petite voix m’a réveillé.":
+    hi, ${x}
+% endif
diff --git a/lib/Mako-0.7.3/test/templates/unicode_expr.html b/lib/Mako-0.7.3/test/templates/unicode_expr.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/unicode_expr.html
@@ -0,0 +1,2 @@
+## -*- coding: utf-8 -*-
+${u"Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"}
diff --git a/lib/Mako-0.7.3/test/templates/unicode_expr_py3k.html b/lib/Mako-0.7.3/test/templates/unicode_expr_py3k.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/unicode_expr_py3k.html
@@ -0,0 +1,2 @@
+## -*- coding: utf-8 -*-
+${"Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"}
diff --git a/lib/Mako-0.7.3/test/templates/unicode_runtime_error.html b/lib/Mako-0.7.3/test/templates/unicode_runtime_error.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/unicode_runtime_error.html
@@ -0,0 +1,2 @@
+## -*- coding: utf-8 -*-
+<% print 'Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »' + int(5/0) %>
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/test/templates/unicode_syntax_error.html b/lib/Mako-0.7.3/test/templates/unicode_syntax_error.html
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/templates/unicode_syntax_error.html
@@ -0,0 +1,2 @@
+## -*- coding: utf-8 -*-
+<% print 'Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! » %>
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/test/test_ast.py b/lib/Mako-0.7.3/test/test_ast.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_ast.py
@@ -0,0 +1,334 @@
+import unittest
+
+from mako import ast, exceptions, pyparser, util
+from test import eq_, requires_python_2
+
+exception_kwargs = {
+    'source': '',
+    'lineno': 0,
+    'pos': 0,
+    'filename': ''}
+
+class AstParseTest(unittest.TestCase):
+
+    def test_locate_identifiers(self):
+        """test the location of identifiers in a python code string"""
+        code = """
+a = 10
+b = 5
+c = x * 5 + a + b + q
+(g,h,i) = (1,2,3)
+[u,k,j] = [4,5,6]
+foo.hoho.lala.bar = 7 + gah.blah + u + blah
+for lar in (1,2,3):
+    gh = 5
+    x = 12
+("hello world, ", a, b)
+("Another expr", c)
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(
+            parsed.declared_identifiers,
+            set(['a', 'b', 'c', 'g', 'h', 'i', 'u',
+                'k', 'j', 'gh', 'lar', 'x'])
+        )
+        eq_(
+            parsed.undeclared_identifiers,
+            set(['x', 'q', 'foo', 'gah', 'blah'])
+        )
+
+        parsed = ast.PythonCode("x + 5 * (y-z)", **exception_kwargs)
+        assert parsed.undeclared_identifiers == set(['x', 'y', 'z'])
+        assert parsed.declared_identifiers == set()
+
+    def test_locate_identifiers_2(self):
+        code = """
+import foobar
+from lala import hoho, yaya
+import bleep as foo
+result = []
+data = get_data()
+for x in data:
+    result.append(x+7)
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.undeclared_identifiers, set(['get_data']))
+        eq_(
+            parsed.declared_identifiers,
+            set(['result', 'data', 'x', 'hoho', 'foobar', 'foo', 'yaya'])
+        )
+
+    def test_locate_identifiers_3(self):
+        """test that combination assignment/expressions
+        of the same identifier log the ident as 'undeclared'"""
+        code = """
+x = x + 5
+for y in range(1, y):
+    ("hi",)
+[z for z in range(1, z)]
+(q for q in range (1, q))
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(
+            parsed.undeclared_identifiers,
+            set(['x', 'y', 'z', 'q', 'range'])
+        )
+
+    def test_locate_identifiers_4(self):
+        code = """
+x = 5
+(y, )
+def mydef(mydefarg):
+    print("mda is", mydefarg)
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.undeclared_identifiers, set(['y']))
+        eq_(parsed.declared_identifiers, set(['mydef', 'x']))
+
+    def test_locate_identifiers_5(self):
+        code = """
+try:
+    print(x)
+except:
+    print(y)
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.undeclared_identifiers, set(['x', 'y']))
+
+    def test_locate_identifiers_6(self):
+        code = """
+def foo():
+    return bar()
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.undeclared_identifiers, set(['bar']))
+
+        code = """
+def lala(x, y):
+    return x, y, z
+print(x)
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.undeclared_identifiers, set(['z', 'x']))
+        eq_(parsed.declared_identifiers, set(['lala']))
+
+        code = """
+def lala(x, y):
+    def hoho():
+        def bar():
+            z = 7
+print(z)
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.undeclared_identifiers, set(['z']))
+        eq_(parsed.declared_identifiers, set(['lala']))
+
+    def test_locate_identifiers_7(self):
+        code = """
+import foo.bar
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.declared_identifiers, set(['foo']))
+        eq_(parsed.undeclared_identifiers, set())
+
+    def test_locate_identifiers_8(self):
+        code = """
+class Hi(object):
+    foo = 7
+    def hoho(self):
+        x = 5
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.declared_identifiers, set(['Hi']))
+        eq_(parsed.undeclared_identifiers, set())
+
+    def test_locate_identifiers_9(self):
+        code = """
+    ",".join([t for t in ("a", "b", "c")])
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.declared_identifiers, set(['t']))
+        eq_(parsed.undeclared_identifiers, set(['t']))
+
+        code = """
+    [(val, name) for val, name in x]
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.declared_identifiers, set(['val', 'name']))
+        eq_(parsed.undeclared_identifiers, set(['val', 'name', 'x']))
+
+    def test_locate_identifiers_10(self):
+        code = """
+lambda q: q + 5
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.declared_identifiers, set())
+        eq_(parsed.undeclared_identifiers, set())
+
+    def test_locate_identifiers_11(self):
+        code = """
+def x(q):
+    return q + 5
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.declared_identifiers, set(['x']))
+        eq_(parsed.undeclared_identifiers, set())
+
+
+    def test_locate_identifiers_12(self):
+        code = """
+def foo():
+    s = 1
+    def bar():
+        t = s
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.declared_identifiers, set(['foo']))
+        eq_(parsed.undeclared_identifiers, set())
+
+    def test_locate_identifiers_13(self):
+        code = """
+def foo():
+    class Bat(object):
+        pass
+    Bat
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.declared_identifiers, set(['foo']))
+        eq_(parsed.undeclared_identifiers, set())
+
+    def test_locate_identifiers_14(self):
+        code = """
+def foo():
+    class Bat(object):
+        pass
+    Bat
+
+print(Bat)
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.declared_identifiers, set(['foo']))
+        eq_(parsed.undeclared_identifiers, set(['Bat']))
+
+    @requires_python_2
+    def test_locate_identifiers_15(self):
+        code = """
+def t1((x,y)):
+    return x+5, y+4
+
+t2 = lambda (x,y):(x+5, y+4)
+"""
+        parsed = ast.PythonCode(code, **exception_kwargs)
+        eq_(parsed.declared_identifiers, set(['t1', 't2']))
+        eq_(parsed.undeclared_identifiers, set())
+
+    def test_no_global_imports(self):
+        code = """
+from foo import *
+import x as bar
+"""
+        self.assertRaises(exceptions.CompileException,
+            ast.PythonCode, code, **exception_kwargs)
+
+    def test_python_fragment(self):
+        parsed = ast.PythonFragment("for x in foo:", **exception_kwargs)
+        eq_(parsed.declared_identifiers, set(['x']))
+        eq_(parsed.undeclared_identifiers, set(['foo']))
+
+        parsed = ast.PythonFragment("try:", **exception_kwargs)
+
+        if util.py3k:
+            parsed = ast.PythonFragment(
+                        "except MyException as e:", **exception_kwargs)
+        else:
+            parsed = ast.PythonFragment(
+                        "except MyException, e:", **exception_kwargs)
+        eq_(parsed.declared_identifiers, set(['e']))
+        eq_(parsed.undeclared_identifiers, set(['MyException']))
+
+    def test_argument_list(self):
+        parsed = ast.ArgumentList("3, 5, 'hi', x+5, "
+                    "context.get('lala')", **exception_kwargs)
+        eq_(parsed.undeclared_identifiers, set(['x', 'context']))
+        eq_([x for x in parsed.args],
+            ["3", "5", "'hi'", "(x + 5)", "context.get('lala')"])
+
+        parsed = ast.ArgumentList("h", **exception_kwargs)
+        eq_(parsed.args, ["h"])
+
+    def test_function_decl(self):
+        """test getting the arguments from a function"""
+        code = "def foo(a, b, c=None, d='hi', e=x, f=y+7):pass"
+        parsed = ast.FunctionDecl(code, **exception_kwargs)
+        eq_(parsed.funcname, 'foo')
+        eq_(parsed.argnames,
+            ['a', 'b', 'c', 'd', 'e', 'f'])
+
+    def test_function_decl_2(self):
+        """test getting the arguments from a function"""
+        code = "def foo(a, b, c=None, *args, **kwargs):pass"
+        parsed = ast.FunctionDecl(code, **exception_kwargs)
+        eq_(parsed.funcname, 'foo')
+        eq_(parsed.argnames,
+            ['a', 'b', 'c', 'args', 'kwargs'])
+
+    def test_expr_generate(self):
+        """test the round trip of expressions to AST back to python source"""
+        x = 1
+        y = 2
+
+        class F(object):
+            def bar(self, a,b):
+                return a + b
+
+        def lala(arg):
+            return "blah" + arg
+
+        local_dict = dict(x=x, y=y, foo=F(), lala=lala)
+
+        code = "str((x+7*y) / foo.bar(5,6)) + lala('ho')"
+        astnode = pyparser.parse(code)
+        newcode = pyparser.ExpressionGenerator(astnode).value()
+        eq_(eval(code, local_dict), eval(newcode, local_dict))
+
+        a = ["one", "two", "three"]
+        hoho = {'somevalue': "asdf"}
+        g = [1, 2, 3, 4, 5]
+        local_dict = dict(a=a, hoho=hoho, g=g)
+        code = "a[2] + hoho['somevalue'] + "\
+                "repr(g[3:5]) + repr(g[3:]) + repr(g[:5])"
+        astnode = pyparser.parse(code)
+        newcode = pyparser.ExpressionGenerator(astnode).value()
+        eq_(eval(code, local_dict), eval(newcode, local_dict))
+
+        local_dict = {'f': lambda: 9, 'x': 7}
+        code = "x+f()"
+        astnode = pyparser.parse(code)
+        newcode = pyparser.ExpressionGenerator(astnode).value()
+        eq_(eval(code, local_dict), eval(newcode, local_dict))
+
+        for code in ["repr({'x':7,'y':18})",
+                        "repr([])",
+                        "repr({})",
+                        "repr([{3:[]}])",
+                        "repr({'x':37*2 + len([6,7,8])})",
+                        "repr([1, 2, {}, {'x':'7'}])",
+                        "repr({'x':-1})", "repr(((1,2,3), (4,5,6)))",
+                        "repr(1 and 2 and 3 and 4)",
+                        "repr(True and False or 55)",
+                        "repr(1 & 2 | 3)",
+                        "repr(3//5)",
+                        "repr(3^5)",
+                        "repr([q.endswith('e') for q in "
+                            "['one', 'two', 'three']])",
+                        "repr([x for x in (5,6,7) if x == 6])",
+                        "repr(not False)"]:
+            local_dict = {}
+            astnode = pyparser.parse(code)
+            newcode = pyparser.ExpressionGenerator(astnode).value()
+            eq_(eval(code, local_dict),
+                eval(newcode, local_dict)
+            )
+
+
+
diff --git a/lib/Mako-0.7.3/test/test_babelplugin.py b/lib/Mako-0.7.3/test/test_babelplugin.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_babelplugin.py
@@ -0,0 +1,44 @@
+
+from test import TemplateTest, template_base, skip_if
+
+try:
+    import babel
+    from mako.ext.babelplugin import extract
+except:
+    babel = None
+ 
+import os
+
+
+class ExtractMakoTestCase(TemplateTest):
+    @skip_if(lambda: not babel, 'babel not installed: skipping babelplugin test')
+ 
+    def test_extract(self):
+        mako_tmpl = open(os.path.join(template_base, 'gettext.mako'))
+        messages = list(extract(mako_tmpl, {'_': None, 'gettext': None,
+                                            'ungettext': (1, 2)},
+                                ['TRANSLATOR:'], {}))
+        expected = \
+            [(1, '_', u'Page arg 1', []),
+             (1, '_', u'Page arg 2', []),
+             (10, 'gettext', u'Begin', []),
+             (14, '_', u'Hi there!', [u'TRANSLATOR: Hi there!']),
+             (19, '_', u'Hello', []),
+             (22, '_', u'Welcome', []),
+             (25, '_', u'Yo', []),
+             (36, '_', u'The', [u'TRANSLATOR: Ensure so and', u'so, thanks']),
+             (36, 'ungettext', (u'bunny', u'bunnies', None), []),
+             (41, '_', u'Goodbye', [u'TRANSLATOR: Good bye']),
+             (44, '_', u'Babel', []),
+             (45, 'ungettext', (u'hella', u'hellas', None), []),
+            (62, '_', u'The', [u'TRANSLATOR: Ensure so and', u'so, thanks']),
+            (62, 'ungettext', (u'bunny', u'bunnies', None), []),
+            (68, '_', u'Goodbye, really!', [u'TRANSLATOR: HTML comment']),
+            (71, '_', u'P.S. byebye', []),
+            (77, '_', u'Top', []),
+            (83, '_', u'foo', []),
+            (83, '_', u'baz', []),
+            (85, '_', u'bar', [])
+             ]
+        self.assertEqual(expected, messages)
+
diff --git a/lib/Mako-0.7.3/test/test_block.py b/lib/Mako-0.7.3/test/test_block.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_block.py
@@ -0,0 +1,569 @@
+from mako.template import Template
+from mako.lookup import TemplateLookup
+from mako import exceptions
+from test import TemplateTest, assert_raises, assert_raises_message
+from util import flatten_result, result_lines
+
+
+
+class BlockTest(TemplateTest):
+    def test_anonymous_block_namespace_raises(self):
+        assert_raises_message(
+            exceptions.CompileException,
+            "Can't put anonymous blocks inside <%namespace>",
+            Template, """
+                <%namespace name="foo">
+                    <%block>
+                        block
+                    </%block>
+                </%namespace>
+            """
+        )
+
+    def test_anonymous_block_in_call(self):
+        template = Template("""
+        
+            <%self:foo x="5">
+                <%block>
+                    this is the block x
+                </%block>
+            </%self:foo>
+            
+            <%def name="foo(x)">
+                foo:
+                ${caller.body()}
+            </%def>
+        """)
+        self._do_test(
+            template,
+            ["foo:", "this is the block x"],
+            filters=result_lines
+        )
+
+    def test_named_block_in_call(self):
+        assert_raises_message(
+            exceptions.CompileException,
+            "Named block 'y' not allowed inside of <%call> tag",
+            Template,"""
+        
+            <%self:foo x="5">
+                <%block name="y">
+                    this is the block
+                </%block>
+            </%self:foo>
+            
+            <%def name="foo(x)">
+                foo:
+                ${caller.body()}
+                ${caller.y()}
+            </%def>
+        """)
+
+    def test_name_collision_blocks_toplevel(self):
+        assert_raises_message(
+            exceptions.CompileException,
+            "%def or %block named 'x' already exists in this template",
+            Template,
+            """
+                <%block name="x">
+                    block
+                </%block>
+                
+                foob 
+                
+                <%block name="x">
+                    block
+                </%block>
+            """
+        )
+
+    def test_name_collision_blocks_nested_block(self):
+        assert_raises_message(
+            exceptions.CompileException,
+            "%def or %block named 'x' already exists in this template",
+            Template,
+            """
+                <%block>
+                <%block name="x">
+                    block
+                </%block>
+                
+                foob 
+                
+                <%block name="x">
+                    block
+                </%block>
+                </%block>
+            """
+        )
+
+    def test_name_collision_blocks_nested_def(self):
+        assert_raises_message(
+            exceptions.CompileException,
+            "Named block 'x' not allowed inside of def 'foo'",
+            Template,
+            """
+                <%def name="foo()">
+                <%block name="x">
+                    block
+                </%block>
+                
+                foob 
+                
+                <%block name="x">
+                    block
+                </%block>
+                </%def>
+            """
+        )
+
+    def test_name_collision_block_def_toplevel(self):
+        assert_raises_message(
+            exceptions.CompileException,
+            "%def or %block named 'x' already exists in this template",
+            Template,
+            """
+                <%block name="x">
+                    block
+                </%block>
+                
+                foob 
+                
+                <%def name="x()">
+                    block
+                </%def>
+            """
+        )
+
+    def test_name_collision_def_block_toplevel(self):
+        assert_raises_message(
+            exceptions.CompileException,
+            "%def or %block named 'x' already exists in this template",
+            Template,
+            """
+                <%def name="x()">
+                    block
+                </%def>
+
+                foob 
+                
+                <%block name="x">
+                    block
+                </%block>
+                
+            """
+        )
+
+    def test_named_block_renders(self):
+        template = Template("""
+            above
+            <%block name="header">
+                the header
+            </%block>
+            below
+        """)
+        self._do_test(template, ["above", "the header", "below"], 
+                filters=result_lines)
+
+    def test_inherited_block_no_render(self):
+        l = TemplateLookup()
+        l.put_string("index",
+            """
+                <%inherit file="base"/>
+                <%block name="header">
+                    index header
+                </%block>
+            """
+        )
+        l.put_string("base","""
+            above
+            <%block name="header">
+                the header
+            </%block>
+            
+            ${next.body()}
+            below
+        """)
+        self._do_test(l.get_template("index"), 
+                ["above", "index header", "below"], 
+                filters=result_lines)
+
+    def test_no_named_in_def(self):
+        assert_raises_message(
+            exceptions.CompileException,
+            "Named block 'y' not allowed inside of def 'q'",
+            Template,
+            """
+            <%def name="q()">
+                <%block name="y">
+                </%block>
+            </%def>
+        """)
+
+    def test_inherited_block_nested_both(self):
+        l = TemplateLookup()
+        l.put_string("index",
+            """
+                <%inherit file="base"/>
+                <%block name="title">
+                    index title
+                </%block>
+                
+                <%block name="header">
+                    index header
+                    ${parent.header()}
+                </%block>
+            """
+        )
+        l.put_string("base","""
+            above
+            <%block name="header">
+                base header
+                <%block name="title">
+                    the title
+                </%block>
+            </%block>
+            
+            ${next.body()}
+            below
+        """)
+        self._do_test(l.get_template("index"), 
+                ["above", "index header", "base header", "index title", "below"], 
+                filters=result_lines)
+
+    def test_inherited_block_nested_inner_only(self):
+        l = TemplateLookup()
+        l.put_string("index",
+            """
+                <%inherit file="base"/>
+                <%block name="title">
+                    index title
+                </%block>
+                
+            """
+        )
+        l.put_string("base","""
+            above
+            <%block name="header">
+                base header
+                <%block name="title">
+                    the title
+                </%block>
+            </%block>
+            
+            ${next.body()}
+            below
+        """)
+        self._do_test(l.get_template("index"), 
+                ["above", "base header", "index title", "below"], 
+                filters=result_lines)
+
+    def test_noninherited_block_no_render(self):
+        l = TemplateLookup()
+        l.put_string("index",
+            """
+                <%inherit file="base"/>
+                <%block name="some_thing">
+                    some thing
+                </%block>
+            """
+        )
+        l.put_string("base","""
+            above
+            <%block name="header">
+                the header
+            </%block>
+            
+            ${next.body()}
+            below
+        """)
+        self._do_test(l.get_template("index"), 
+                ["above", "the header", "some thing", "below"], 
+                filters=result_lines)
+
+    def test_no_conflict_nested_one(self):
+        l = TemplateLookup()
+        l.put_string("index",
+            """
+                <%inherit file="base"/>
+                <%block>
+                    <%block name="header">
+                        inner header
+                    </%block>
+                </%block>
+            """
+        )
+        l.put_string("base","""
+            above
+            <%block name="header">
+                the header
+            </%block>
+            
+            ${next.body()}
+            below
+        """)
+        self._do_test(l.get_template("index"), 
+                ["above", "inner header", "below"], 
+                filters=result_lines)
+
+    def test_nested_dupe_names_raise(self):
+        assert_raises_message(
+            exceptions.CompileException,
+            "%def or %block named 'header' already exists in this template.",
+            Template,
+            """
+                <%inherit file="base"/>
+                <%block name="header">
+                    <%block name="header">
+                        inner header
+                    </%block>
+                </%block>
+            """
+        )
+
+    def test_two_levels_one(self):
+        l = TemplateLookup()
+        l.put_string("index",
+            """
+                <%inherit file="middle"/>
+                <%block name="header">
+                    index header
+                </%block>
+                <%block>
+                    index anon
+                </%block>
+            """
+        )
+        l.put_string("middle", """
+            <%inherit file="base"/>
+            <%block>
+                middle anon
+            </%block>
+            ${next.body()}
+        """)
+        l.put_string("base","""
+            above
+            <%block name="header">
+                the header
+            </%block>
+            
+            ${next.body()}
+            below
+        """)
+        self._do_test(l.get_template("index"), 
+                ["above", "index header", "middle anon", 
+                "index anon", "below"], 
+                filters=result_lines)
+
+    def test_filter(self):
+        template = Template("""
+            <%block filter="h">
+                <html>
+            </%block>
+        """)
+        self._do_test(template, [u'<html>'], 
+                    filters=result_lines)
+
+    def test_anon_in_named(self):
+        template = Template("""
+            <%block name="x">
+                outer above
+                <%block>
+                    inner
+                </%block>
+                outer below
+            </%block>
+        """)
+        self._test_block_in_block(template)
+
+    def test_named_in_anon(self):
+        template = Template("""
+            <%block>
+                outer above
+                <%block name="x">
+                    inner
+                </%block>
+                outer below
+            </%block>
+        """)
+        self._test_block_in_block(template)
+
+    def test_anon_in_anon(self):
+        template = Template("""
+            <%block>
+                outer above
+                <%block>
+                    inner
+                </%block>
+                outer below
+            </%block>
+        """)
+        self._test_block_in_block(template)
+
+    def test_named_in_named(self):
+        template = Template("""
+            <%block name="x">
+                outer above
+                <%block name="y">
+                    inner
+                </%block>
+                outer below
+            </%block>
+        """)
+        self._test_block_in_block(template)
+
+    def _test_block_in_block(self, template):
+        self._do_test(template, 
+            ["outer above", "inner", "outer below"],
+            filters=result_lines
+        )
+
+    def test_iteration(self):
+        t = Template("""
+            % for i in (1, 2, 3):
+                <%block>${i}</%block>
+            % endfor
+        """)
+        self._do_test(t, 
+            ["1", "2", "3"],
+            filters=result_lines
+        )
+
+    def test_conditional(self):
+        t = Template("""
+            % if True:
+                <%block>true</%block>
+            % endif
+
+            % if False:
+                <%block>false</%block>
+            % endif
+        """)
+        self._do_test(t, 
+            ["true"],
+            filters=result_lines
+        )
+
+    def test_block_overridden_by_def(self):
+        l = TemplateLookup()
+        l.put_string("index",
+            """
+                <%inherit file="base"/>
+                <%def name="header()">
+                    inner header
+                </%def>
+            """
+        )
+        l.put_string("base","""
+            above
+            <%block name="header">
+                the header
+            </%block>
+            
+            ${next.body()}
+            below
+        """)
+        self._do_test(l.get_template("index"), 
+                ["above", "inner header", "below"], 
+                filters=result_lines)
+
+    def test_def_overridden_by_block(self):
+        l = TemplateLookup()
+        l.put_string("index",
+            """
+                <%inherit file="base"/>
+                <%block name="header">
+                    inner header
+                </%block>
+            """
+        )
+        l.put_string("base","""
+            above
+            ${self.header()}
+            <%def name="header()">
+                the header
+            </%def>
+            
+            ${next.body()}
+            below
+        """)
+        self._do_test(l.get_template("index"), 
+                ["above", "inner header", "below"], 
+                filters=result_lines)
+
+    def test_block_args(self):
+        l = TemplateLookup()
+        l.put_string("caller", """
+        
+            <%include file="callee" args="val1='3', val2='4'"/>
+            
+        """)
+        l.put_string("callee", """
+            <%page args="val1, val2"/>
+            <%block name="foob" args="val1, val2">
+                foob, ${val1}, ${val2}
+            </%block>
+        """)
+        self._do_test(
+            l.get_template("caller"),
+            [u'foob, 3, 4'],
+            filters=result_lines
+        )
+
+    def test_block_variables_contextual(self):
+        t = Template("""            
+            <%block name="foob" >
+                foob, ${val1}, ${val2}
+            </%block>
+        """)
+        self._do_test(
+            t,
+            [u'foob, 3, 4'],
+            template_args={'val1':3, 'val2':4},
+            filters=result_lines
+        )
+
+    def test_block_args_contextual(self):
+        t = Template("""            
+            <%page args="val1"/>
+            <%block name="foob" args="val1">
+                foob, ${val1}, ${val2}
+            </%block>
+        """)
+        self._do_test(
+            t,
+            [u'foob, 3, 4'],
+            template_args={'val1':3, 'val2':4},
+            filters=result_lines
+        )
+
+    def test_block_pageargs_contextual(self):
+        t = Template("""            
+            <%block name="foob">
+                foob, ${pageargs['val1']}, ${pageargs['val2']}
+            </%block>
+        """)
+        self._do_test(
+            t,
+            [u'foob, 3, 4'],
+            template_args={'val1':3, 'val2':4},
+            filters=result_lines
+        )
+
+    def test_block_pageargs(self):
+        l = TemplateLookup()
+        l.put_string("caller", """
+        
+            <%include file="callee" args="val1='3', val2='4'"/>
+            
+        """)
+        l.put_string("callee", """
+            <%block name="foob">
+                foob, ${pageargs['val1']}, ${pageargs['val2']}
+            </%block>
+        """)
+        self._do_test(
+            l.get_template("caller"),
+            [u'foob, 3, 4'],
+            filters=result_lines
+        )
\ No newline at end of file
diff --git a/lib/Mako-0.7.3/test/test_cache.py b/lib/Mako-0.7.3/test/test_cache.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_cache.py
@@ -0,0 +1,557 @@
+from mako.template import Template
+from mako.lookup import TemplateLookup
+from mako import lookup
+import shutil, unittest, os, time
+from util import result_lines
+from test import TemplateTest, template_base, module_base
+from test import eq_
+
+try:
+    import beaker
+    import beaker.cache
+except:
+    from nose import SkipTest
+    raise SkipTest("Beaker is required for these tests.")
+
+from mako.cache import register_plugin, CacheImpl
+
+class MockCacheImpl(CacheImpl):
+    realcacheimpl = None
+
+    def __init__(self, cache):
+        self.cache = cache
+        use_beaker = self.cache.\
+                    template.cache_args.\
+                    get('use_beaker', True)
+        if use_beaker:
+            self.realcacheimpl = cache._load_impl("beaker")
+
+    def get_or_create(self, key, creation_function, **kw):
+        self.key = key
+        self.kwargs = kw.copy()
+        if self.realcacheimpl:
+            return self.realcacheimpl.\
+                    get_or_create(key, creation_function, **kw)
+        else:
+            return creation_function()
+
+    def put(self, key, value, **kw):
+        self.key = key
+        self.kwargs = kw.copy()
+        if self.realcacheimpl:
+            self.realcacheimpl.put(key, value, **kw)
+
+    def get(self, key, **kw):
+        self.key = key
+        self.kwargs = kw.copy()
+        if self.realcacheimpl:
+            return self.realcacheimpl.get(key, **kw)
+
+    def invalidate(self, key, **kw):
+        self.key = key
+        self.kwargs = kw.copy()
+        if self.realcacheimpl:
+            self.realcacheimpl.invalidate(key, **kw)
+
+
+register_plugin("mock", __name__, "MockCacheImpl")
+
+class BeakerCacheTest(TemplateTest):
+    def _regions(self):
+        return beaker.cache.CacheManager(
+            cache_regions = {
+                'short':{
+                    'expire':1,
+                    'type':'memory'
+                },
+                'long':{
+                    'expire':60,
+                    'type':'memory'
+                }
+            }
+        )
+
+    def test_region(self):
+        t = Template("""
+            <%block name="foo" cached="True" cache_region="short">
+                short term ${x}
+            </%block>
+            <%block name="bar" cached="True" cache_region="long">
+                long term ${x}
+            </%block>
+            <%block name="lala">
+                none ${x}
+            </%block>
+        """, cache_args={"manager":self._regions()})
+
+        r1 = result_lines(t.render(x=5))
+        time.sleep(2)
+        r2 = result_lines(t.render(x=6))
+        r3 = result_lines(t.render(x=7))
+        eq_(r1, ["short term 5", "long term 5", "none 5"])
+        eq_(r2, ["short term 6", "long term 5", "none 6"])
+        eq_(r3, ["short term 6", "long term 5", "none 7"])
+
+class CacheTest(TemplateTest):
+    def _install_mock_cache(self, template):
+        template.cache_impl = 'mock'
+        return template.cache.impl
+
+    def test_def(self):
+        t = Template("""
+        <%!
+            callcount = [0]
+        %>
+        <%def name="foo()" cached="True">
+            this is foo
+            <%
+            callcount[0] += 1
+            %>
+        </%def>
+
+        ${foo()}
+        ${foo()}
+        ${foo()}
+        callcount: ${callcount}
+""")
+        m = self._install_mock_cache(t)
+        assert result_lines(t.render()) == [
+            'this is foo',
+            'this is foo',
+            'this is foo',
+            'callcount: [1]',
+        ]
+        assert m.kwargs == {}
+
+    def test_cache_enable(self):
+        t = Template("""
+            <%!
+                callcount = [0]
+            %>
+            <%def name="foo()" cached="True">
+                <% callcount[0] += 1 %>
+            </%def>
+            ${foo()}
+            ${foo()}
+            callcount: ${callcount}
+        """, cache_enabled=False)
+        m = self._install_mock_cache(t)
+
+        eq_(t.render().strip(), "callcount: [2]")
+
+    def test_nested_def(self):
+        t = Template("""
+        <%!
+            callcount = [0]
+        %>
+        <%def name="foo()">
+            <%def name="bar()" cached="True">
+                this is foo
+                <%
+                callcount[0] += 1
+                %>
+            </%def>
+            ${bar()}
+        </%def>
+
+        ${foo()}
+        ${foo()}
+        ${foo()}
+        callcount: ${callcount}
+""")
+        m = self._install_mock_cache(t)
+        assert result_lines(t.render()) == [
+            'this is foo',
+            'this is foo',
+            'this is foo',
+            'callcount: [1]',
+        ]
+        assert m.kwargs == {}
+
+    def test_page(self):
+        t = Template("""
+        <%!
+            callcount = [0]
+        %>
+        <%page cached="True"/>
+        this is foo
+        <%
+        callcount[0] += 1
+        %>
+        callcount: ${callcount}
+""")
+        m = self._install_mock_cache(t)
+        t.render()
+        t.render()
+        assert result_lines(t.render()) == [
+            "this is foo",
+            "callcount: [1]"
+        ]
+        assert m.kwargs == {}
+
+    def test_dynamic_key_with_context(self):
+        t = Template("""
+            <%block name="foo" cached="True" cache_key="${mykey}">
+                some block
+            </%block>
+        """)
+        m = self._install_mock_cache(t)
+        t.render(mykey="thekey")
+        t.render(mykey="thekey")
+        eq_(
+            result_lines(t.render(mykey="thekey")),
+            ["some block"]
+        )
+        eq_(m.key, "thekey")
+
+        t = Template("""
+            <%def name="foo()" cached="True" cache_key="${mykey}">
+                some def
+            </%def>
+            ${foo()}
+        """)
+        m = self._install_mock_cache(t)
+        t.render(mykey="thekey")
+        t.render(mykey="thekey")
+        eq_(
+            result_lines(t.render(mykey="thekey")),
+            ["some def"]
+        )
+        eq_(m.key, "thekey")
+
+
+    def test_dynamic_key_with_funcargs(self):
+        t = Template("""
+            <%def name="foo(num=5)" cached="True" cache_key="foo_${str(num)}">
+             hi
+            </%def>
+
+            ${foo()}
+        """)
+        m = self._install_mock_cache(t)
+        t.render()
+        t.render()
+        assert result_lines(t.render()) == ['hi']
+        assert m.key == "foo_5"
+
+        t = Template("""
+            <%def name="foo(*args, **kwargs)" cached="True" cache_key="foo_${kwargs['bar']}">
+             hi
+            </%def>
+
+            ${foo(1, 2, bar='lala')}
+        """)
+        m = self._install_mock_cache(t)
+        t.render()
+        assert result_lines(t.render()) == ['hi']
+        assert m.key == "foo_lala"
+
+        t = Template('''
+        <%page args="bar='hi'" cache_key="foo_${bar}" cached="True"/>
+         hi
+        ''')
+        m = self._install_mock_cache(t)
+        t.render()
+        assert result_lines(t.render()) == ['hi']
+        assert m.key == "foo_hi"
+
+
+    def test_dynamic_key_with_imports(self):
+        lookup = TemplateLookup()
+        lookup.put_string("foo.html", """
+        <%!
+            callcount = [0]
+        %>
+        <%namespace file="ns.html" import="*"/>
+        <%page cached="True" cache_key="${foo}"/>
+        this is foo
+        <%
+        callcount[0] += 1
+        %>
+        callcount: ${callcount}
+""")
+        lookup.put_string("ns.html", """""")
+        t = lookup.get_template("foo.html")
+        m = self._install_mock_cache(t)
+        t.render(foo='somekey')
+        t.render(foo='somekey')
+        assert result_lines(t.render(foo='somekey')) == [
+            "this is foo",
+            "callcount: [1]"
+        ]
+        assert m.kwargs == {}
+
+    def test_fileargs_implicit(self):
+        l = lookup.TemplateLookup(module_directory=module_base)
+        l.put_string("test","""
+                <%!
+                    callcount = [0]
+                %>
+                <%def name="foo()" cached="True" cache_type='dbm'>
+                    this is foo
+                    <%
+                    callcount[0] += 1
+                    %>
+                </%def>
+
+                ${foo()}
+                ${foo()}
+                ${foo()}
+                callcount: ${callcount}
+        """)
+
+        m = self._install_mock_cache(l.get_template('test'))
+        assert result_lines(l.get_template('test').render()) == [
+            'this is foo',
+            'this is foo',
+            'this is foo',
+            'callcount: [1]',
+        ]
+        eq_(m.kwargs, {'type':'dbm'})
+
+    def test_fileargs_deftag(self):
+        t = Template("""
+        <%%!
+            callcount = [0]
+        %%>
+        <%%def name="foo()" cached="True" cache_type='file' cache_dir='%s'>
+            this is foo
+            <%%
+            callcount[0] += 1
+            %%>
+        </%%def>
+
+        ${foo()}
+        ${foo()}
+        ${foo()}
+        callcount: ${callcount}
+""" % module_base)
+        m = self._install_mock_cache(t)
+        assert result_lines(t.render()) == [
+            'this is foo',
+            'this is foo',
+            'this is foo',
+            'callcount: [1]',
+        ]
+        assert m.kwargs == {'type':'file','dir':module_base}
+
+    def test_fileargs_pagetag(self):
+        t = Template("""
+        <%%page cache_dir='%s' cache_type='dbm'/>
+        <%%!
+            callcount = [0]
+        %%>
+        <%%def name="foo()" cached="True">
+            this is foo
+            <%%
+            callcount[0] += 1
+            %%>
+        </%%def>
+
+        ${foo()}
+        ${foo()}
+        ${foo()}
+        callcount: ${callcount}
+""" % module_base)
+        m = self._install_mock_cache(t)
+        assert result_lines(t.render()) == [
+            'this is foo',
+            'this is foo',
+            'this is foo',
+            'callcount: [1]',
+        ]
+        eq_(m.kwargs, {'dir':module_base, 'type':'dbm'})
+
+    def test_args_complete(self):
+        t = Template("""
+        <%%def name="foo()" cached="True" cache_timeout="30" cache_dir="%s" cache_type="file" cache_key='somekey'>
+            this is foo
+        </%%def>
+
+        ${foo()}
+""" % module_base)
+        m = self._install_mock_cache(t)
+        t.render()
+        eq_(m.kwargs, {'dir':module_base, 'type':'file', 'timeout':30})
+
+        t2 = Template("""
+        <%%page cached="True" cache_timeout="30" cache_dir="%s" cache_type="file" cache_key='somekey'/>
+        hi
+        """ % module_base)
+        m = self._install_mock_cache(t2)
+        t2.render()
+        eq_(m.kwargs, {'dir':module_base, 'type':'file', 'timeout':30})
+
+    def test_fileargs_lookup(self):
+        l = lookup.TemplateLookup(cache_dir=module_base, cache_type='file')
+        l.put_string("test","""
+                <%!
+                    callcount = [0]
+                %>
+                <%def name="foo()" cached="True">
+                    this is foo
+                    <%
+                    callcount[0] += 1
+                    %>
+                </%def>
+
+                ${foo()}
+                ${foo()}
+                ${foo()}
+                callcount: ${callcount}
+        """)
+
+        t = l.get_template('test')
+        m = self._install_mock_cache(t)
+        assert result_lines(l.get_template('test').render()) == [
+            'this is foo',
+            'this is foo',
+            'this is foo',
+            'callcount: [1]',
+        ]
+        eq_(m.kwargs, {'dir':module_base, 'type':'file'})
+
+    def test_buffered(self):
+        t = Template("""
+        <%!
+            def a(text):
+                return "this is a " + text.strip()
+        %>
+        ${foo()}
+        ${foo()}
+        <%def name="foo()" cached="True" buffered="True">
+            this is a test
+        </%def>
+        """, buffer_filters=["a"])
+        assert result_lines(t.render()) == ["this is a this is a test", "this is a this is a test"]
+
+    def test_load_from_expired(self):
+        """test that the cache callable can be called safely after the
+        originating template has completed rendering.
+
+        """
+        t = Template("""
+        ${foo()}
+        <%def name="foo()" cached="True" cache_timeout="2">
+            foo
+        </%def>
+        """)
+
+        x1 = t.render()
+        time.sleep(3)
+        x2 = t.render()
+        assert x1.strip() == x2.strip() == "foo"
+
+    def test_cache_uses_current_context(self):
+        t = Template("""
+        ${foo()}
+        <%def name="foo()" cached="True" cache_timeout="2">
+            foo: ${x}
+        </%def>
+        """)
+
+        x1 = t.render(x=1)
+        time.sleep(3)
+        x2 = t.render(x=2)
+        eq_(x1.strip(), "foo: 1")
+        eq_(x2.strip(), "foo: 2")
+
+    def test_namespace_access(self):
+        t = Template("""
+            <%def name="foo(x)" cached="True">
+                foo: ${x}
+            </%def>
+
+            <%
+                foo(1)
+                foo(2)
+                local.cache.invalidate_def('foo')
+                foo(3)
+                foo(4)
+            %>
+        """)
+        assert result_lines(t.render()) == ['foo: 1', 'foo: 1', 'foo: 3', 'foo: 3']
+
+    def test_lookup(self):
+        l = TemplateLookup(cache_impl='mock')
+        l.put_string("x", """
+            <%page cached="True" />
+            ${y}
+        """)
+        t = l.get_template("x")
+        assert result_lines(t.render(y=5)) == ["5"]
+        assert result_lines(t.render(y=7)) == ["5"]
+        assert isinstance(t.cache.impl, MockCacheImpl)
+
+    def test_invalidate(self):
+        t = Template("""
+            <%%def name="foo()" cached="True">
+                foo: ${x}
+            </%%def>
+
+            <%%def name="bar()" cached="True" cache_type='dbm' cache_dir='%s'>
+                bar: ${x}
+            </%%def>
+            ${foo()} ${bar()}
+        """ % module_base)
+        assert result_lines(t.render(x=1)) == ["foo: 1", "bar: 1"]
+        assert result_lines(t.render(x=2)) == ["foo: 1", "bar: 1"]
+        t.cache.invalidate_def('foo')
+        assert result_lines(t.render(x=3)) == ["foo: 3", "bar: 1"]
+        t.cache.invalidate_def('bar')
+        assert result_lines(t.render(x=4)) == ["foo: 3", "bar: 4"]
+
+        t = Template("""
+            <%%page cached="True" cache_type="dbm" cache_dir="%s"/>
+
+            page: ${x}
+        """ % module_base)
+        assert result_lines(t.render(x=1)) == ["page: 1"]
+        assert result_lines(t.render(x=2)) == ["page: 1"]
+        t.cache.invalidate_body()
+        assert result_lines(t.render(x=3)) == ["page: 3"]
+        assert result_lines(t.render(x=4)) == ["page: 3"]
+
+    def test_custom_args_def(self):
+        t = Template("""
+            <%def name="foo()" cached="True" cache_region="myregion"
+                    cache_timeout="50" cache_foo="foob">
+            </%def>
+            ${foo()}
+        """, cache_args={'use_beaker':False})
+        m = self._install_mock_cache(t)
+        t.render()
+        eq_(m.kwargs, {'use_beaker':False,'region':'myregion', 'timeout':50, 'foo':'foob'})
+
+    def test_custom_args_block(self):
+        t = Template("""
+            <%block name="foo" cached="True" cache_region="myregion"
+                    cache_timeout="50" cache_foo="foob">
+            </%block>
+        """, cache_args={'use_beaker':False})
+        m = self._install_mock_cache(t)
+        t.render()
+        eq_(m.kwargs, {'use_beaker':False, 'region':'myregion', 'timeout':50, 'foo':'foob'})
+
+    def test_custom_args_page(self):
+        t = Template("""
+            <%page cached="True" cache_region="myregion"
+                    cache_timeout="50" cache_foo="foob"/>
+        """, cache_args={'use_beaker':False})
+        m = self._install_mock_cache(t)
+        t.render()
+        eq_(m.kwargs, {'use_beaker':False, 'region':'myregion', 'timeout':50, 'foo':'foob'})
+
+    def test_pass_context(self):
+        t = Template("""
+            <%page cached="True"/>
+        """)
+        m = self._install_mock_cache(t)
+        t.render()
+        assert 'context' not in m.kwargs
+
+        m.pass_context = True
+        t.render(x="bar")
+        assert 'context' in m.kwargs
+        assert m.kwargs['context'].get('x') == 'bar'
+
diff --git a/lib/Mako-0.7.3/test/test_call.py b/lib/Mako-0.7.3/test/test_call.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_call.py
@@ -0,0 +1,515 @@
+from mako.template import Template
+from mako import util
+from util import result_lines, flatten_result
+from test import TemplateTest, eq_
+
+class CallTest(TemplateTest):
+    def test_call(self):
+        t = Template("""
+        <%def name="foo()">
+            hi im foo ${caller.body(y=5)}
+        </%def>
+ 
+        <%call expr="foo()" args="y, **kwargs">
+            this is the body, y is ${y}
+        </%call>
+""")
+        assert result_lines(t.render()) == ['hi im foo', 'this is the body, y is 5']
+
+
+    def test_compound_call(self):
+        t = Template("""
+
+        <%def name="bar()">
+            this is bar
+        </%def>
+ 
+        <%def name="comp1()">
+            this comp1 should not be called
+        </%def>
+ 
+        <%def name="foo()">
+            foo calling comp1: ${caller.comp1(x=5)}
+            foo calling body: ${caller.body()}
+        </%def>
+ 
+        <%call expr="foo()">
+            <%def name="comp1(x)">
+                this is comp1, ${x}
+            </%def>
+            this is the body, ${comp1(6)}
+        </%call>
+        ${bar()}
+
+""")
+        assert result_lines(t.render()) == ['foo calling comp1:', 'this is comp1, 5', 'foo calling body:', 'this is the body,', 'this is comp1, 6', 'this is bar']
+
+    def test_new_syntax(self):
+        """test foo:bar syntax, including multiline args and expression eval."""
+ 
+        # note the trailing whitespace in the bottom ${} expr, need to strip
+        # that off < python 2.7
+ 
+        t = Template("""
+            <%def name="foo(x, y, q, z)">
+                ${x}
+                ${y}
+                ${q}
+                ${",".join("%s->%s" % (a, b) for a, b in z)}
+            </%def>
+ 
+            <%self:foo x="this is x" y="${'some ' + 'y'}" q="
+                this
+                is
+                q"
+ 
+                z="${[
+                (1, 2),
+                (3, 4),
+                (5, 6)
+            ]
+ 
+            }"/>
+        """)
+ 
+        eq_(
+            result_lines(t.render()),
+             ['this is x', 'some y', 'this', 'is', 'q', '1->2,3->4,5->6']
+        )
+ 
+    def test_ccall_caller(self):
+        t = Template("""
+        <%def name="outer_func()">
+        OUTER BEGIN
+            <%call expr="caller.inner_func()">
+                INNER CALL
+            </%call>
+        OUTER END
+        </%def>
+
+        <%call expr="outer_func()">
+            <%def name="inner_func()">
+                INNER BEGIN
+                ${caller.body()}
+                INNER END
+            </%def>
+        </%call>
+
+        """)
+        #print t.code
+        assert result_lines(t.render()) == [
+            "OUTER BEGIN",
+            "INNER BEGIN",
+            "INNER CALL",
+            "INNER END",
+            "OUTER END",
+        ]
+ 
+    def test_stack_pop(self):
+        t = Template("""
+        <%def name="links()" buffered="True">
+           Some links
+        </%def>
+
+        <%def name="wrapper(links)">
+           <h1>${caller.body()}</h1>
+           ${links}
+        </%def>
+
+        ## links() pushes a stack frame on.  when complete,
+        ## 'nextcaller' must be restored
+        <%call expr="wrapper(links())">
+           Some title
+        </%call>
+
+        """)
+
+        assert result_lines(t.render()) == [
+        "<h1>",
+        "Some title",
+        "</h1>",
+        "Some links"
+        ]
+ 
+    def test_conditional_call(self):
+        """test that 'caller' is non-None only if the immediate <%def> was called via <%call>"""
+
+        t = Template("""
+        <%def name="a()">
+        % if caller:
+        ${ caller.body() } \\
+        % endif
+        AAA
+        ${ b() }
+        </%def>
+
+        <%def name="b()">
+        % if caller:
+        ${ caller.body() } \\
+        % endif
+        BBB
+        ${ c() }
+        </%def>
+
+        <%def name="c()">
+        % if caller:
+        ${ caller.body() } \\
+        % endif
+        CCC
+        </%def>
+
+        <%call expr="a()">
+        CALL
+        </%call>
+
+        """)
+        assert result_lines(t.render()) == [
+            "CALL",
+            "AAA",
+            "BBB",
+            "CCC"
+        ]
+ 
+    def test_chained_call(self):
+        """test %calls that are chained through their targets"""
+        t = Template("""
+            <%def name="a()">
+                this is a. 
+                <%call expr="b()">
+                    this is a's ccall.  heres my body: ${caller.body()}
+                </%call>
+            </%def>
+            <%def name="b()">
+                this is b.  heres  my body: ${caller.body()}
+                whats in the body's caller's body ?
+                ${context.caller_stack[-2].body()}
+            </%def>
+ 
+            <%call expr="a()">
+                heres the main templ call
+            </%call>
+ 
+""")
+        assert result_lines(t.render()) == [
+            'this is a.',
+            'this is b. heres my body:',
+            "this is a's ccall. heres my body:",
+            'heres the main templ call',
+            "whats in the body's caller's body ?",
+            'heres the main templ call'
+        ]
+
+    def test_nested_call(self):
+        """test %calls that are nested inside each other"""
+        t = Template("""
+            <%def name="foo()">
+                ${caller.body(x=10)}
+            </%def>
+
+            x is ${x}
+            <%def name="bar()">
+                bar: ${caller.body()}
+            </%def>
+
+            <%call expr="foo()" args="x">
+                this is foo body: ${x}
+
+                <%call expr="bar()">
+                    this is bar body: ${x}
+                </%call>
+            </%call>
+""")
+        assert result_lines(t.render(x=5)) == [
+            "x is 5",
+            "this is foo body: 10",
+            "bar:",
+            "this is bar body: 10"
+        ]
+ 
+    def test_nested_call_2(self):
+        t = Template("""
+            x is ${x}
+            <%def name="foo()">
+                ${caller.foosub(x=10)}
+            </%def>
+
+            <%def name="bar()">
+                bar: ${caller.barsub()}
+            </%def>
+
+            <%call expr="foo()">
+                <%def name="foosub(x)">
+                this is foo body: ${x}
+ 
+                <%call expr="bar()">
+                    <%def name="barsub()">
+                    this is bar body: ${x}
+                    </%def>
+                </%call>
+ 
+                </%def>
+
+            </%call>
+""")
+        assert result_lines(t.render(x=5)) == [
+            "x is 5",
+            "this is foo body: 10",
+            "bar:",
+            "this is bar body: 10"
+        ]
+
+    def test_nested_call_3(self):
+        template = Template('''\
+        <%def name="A()">
+          ${caller.body()}
+        </%def>
+
+        <%def name="B()">
+          ${caller.foo()}
+        </%def>
+
+        <%call expr="A()">
+          <%call expr="B()">
+            <%def name="foo()">
+              foo
+            </%def>
+          </%call>
+        </%call>
+
+        ''')
+        assert flatten_result(template.render()) == "foo"
+ 
+    def test_nested_call_4(self):
+        base = """
+        <%def name="A()">
+        A_def
+        ${caller.body()}
+        </%def>
+
+        <%def name="B()">
+        B_def
+        ${caller.body()}
+        </%def>
+        """
+
+        template = Template(base + """
+        <%def name="C()">
+         C_def
+         <%self:B>
+           <%self:A>
+              A_body
+           </%self:A>
+            B_body
+           ${caller.body()}
+         </%self:B>
+        </%def>
+
+        <%self:C>
+        C_body
+        </%self:C>
+        """)
+
+        eq_(
+            flatten_result(template.render()),
+            "C_def B_def A_def A_body B_body C_body"
+        )
+
+        template = Template(base + """
+        <%def name="C()">
+         C_def
+         <%self:B>
+            B_body
+           ${caller.body()}
+           <%self:A>
+              A_body
+           </%self:A>
+         </%self:B>
+        </%def>
+
+        <%self:C>
+        C_body
+        </%self:C>
+        """)
+
+        eq_(
+            flatten_result(template.render()),
+            "C_def B_def B_body C_body A_def A_body"
+        )
+
+    def test_chained_call_in_nested(self):
+        t = Template("""
+            <%def name="embedded()">
+            <%def name="a()">
+                this is a. 
+                <%call expr="b()">
+                    this is a's ccall.  heres my body: ${caller.body()}
+                </%call>
+            </%def>
+            <%def name="b()">
+                this is b.  heres  my body: ${caller.body()}
+                whats in the body's caller's body ? ${context.caller_stack[-2].body()}
+            </%def>
+
+            <%call expr="a()">
+                heres the main templ call
+            </%call>
+            </%def>
+            ${embedded()}
+""")
+        #print t.code
+        #print result_lines(t.render())
+        assert result_lines(t.render()) == [
+            'this is a.',
+            'this is b. heres my body:',
+            "this is a's ccall. heres my body:",
+            'heres the main templ call',
+            "whats in the body's caller's body ?",
+            'heres the main templ call'
+        ]
+ 
+    def test_call_in_nested(self):
+        t = Template("""
+            <%def name="a()">
+                this is a ${b()}
+                <%def name="b()">
+                    this is b
+                    <%call expr="c()">
+                        this is the body in b's call
+                    </%call>
+                </%def>
+                <%def name="c()">
+                    this is c: ${caller.body()}
+                </%def>
+            </%def>
+        ${a()}
+""")
+        assert result_lines(t.render()) == ['this is a', 'this is b', 'this is c:', "this is the body in b's call"]
+
+    def test_composed_def(self):
+        t = Template("""
+            <%def name="f()"><f>${caller.body()}</f></%def>
+            <%def name="g()"><g>${caller.body()}</g></%def>
+            <%def name="fg()">
+                <%self:f><%self:g>${caller.body()}</%self:g></%self:f>
+            </%def>
+            <%self:fg>fgbody</%self:fg>
+            """)
+        assert result_lines(t.render()) == ['<f><g>fgbody</g></f>']
+
+    def test_regular_defs(self):
+        t = Template("""
+        <%!
+            @runtime.supports_caller
+            def a(context):
+                context.write("this is a")
+                if context['caller']:
+                    context['caller'].body()
+                context.write("a is done")
+                return ''
+        %>
+ 
+        <%def name="b()">
+            this is b
+            our body: ${caller.body()}
+            ${a(context)}
+        </%def>
+        test 1
+        <%call expr="a(context)">
+            this is the body
+        </%call>
+        test 2
+        <%call expr="b()">
+            this is the body
+        </%call>
+        test 3
+        <%call expr="b()">
+            this is the body
+            <%call expr="b()">
+                this is the nested body
+            </%call>
+        </%call>
+
+
+        """) 
+        #print t.code
+        assert result_lines(t.render()) == [
+            "test 1",
+            "this is a",
+            "this is the body",
+            "a is done",
+            "test 2",
+            "this is b",
+            "our body:",
+            "this is the body",
+            "this is aa is done",
+            "test 3",
+            "this is b",
+            "our body:",
+            "this is the body",
+            "this is b",
+            "our body:",
+            "this is the nested body",
+            "this is aa is done",
+            "this is aa is done"
+        ]
+ 
+    def test_call_in_nested_2(self):
+        t = Template("""
+            <%def name="a()">
+                <%def name="d()">
+                    not this d
+                </%def>
+                this is a ${b()}
+                <%def name="b()">
+                    <%def name="d()">
+                        not this d either
+                    </%def>
+                    this is b
+                    <%call expr="c()">
+                        <%def name="d()">
+                            this is d
+                        </%def>
+                        this is the body in b's call
+                    </%call>
+                </%def>
+                <%def name="c()">
+                    this is c: ${caller.body()}
+                    the embedded "d" is: ${caller.d()}
+                </%def>
+            </%def>
+        ${a()}
+""")
+        assert result_lines(t.render()) == ['this is a', 'this is b', 'this is c:', "this is the body in b's call", 'the embedded "d" is:', 'this is d']
+
+class SelfCacheTest(TemplateTest):
+    """this test uses a now non-public API."""
+ 
+    def test_basic(self):
+        t = Template("""
+        <%!
+            cached = None
+        %>
+        <%def name="foo()">
+            <% 
+                global cached
+                if cached:
+                    return "cached: " + cached
+                __M_writer = context._push_writer()
+            %>
+            this is foo
+            <%
+                buf, __M_writer = context._pop_buffer_and_writer()
+                cached = buf.getvalue()
+                return cached
+            %>
+        </%def>
+ 
+        ${foo()}
+        ${foo()}
+""")
+        assert result_lines(t.render()) == [
+            "this is foo",
+            "cached:",
+            "this is foo"
+        ]
+ 
diff --git a/lib/Mako-0.7.3/test/test_decorators.py b/lib/Mako-0.7.3/test/test_decorators.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_decorators.py
@@ -0,0 +1,110 @@
+from mako.template import Template
+from mako import lookup
+import unittest
+from util import flatten_result, result_lines
+
+class DecoratorTest(unittest.TestCase):
+    def test_toplevel(self):
+        template = Template("""
+            <%!
+                def bar(fn):
+                    def decorate(context, *args, **kw):
+                        return "BAR" + runtime.capture(context, fn, *args, **kw) + "BAR"
+                    return decorate
+            %>
+ 
+            <%def name="foo(y, x)" decorator="bar">
+                this is foo ${y} ${x}
+            </%def>
+ 
+            ${foo(1, x=5)}
+        """)
+
+        assert flatten_result(template.render()) == "BAR this is foo 1 5 BAR"
+
+    def test_toplevel_contextual(self):
+        template = Template("""
+            <%!
+                def bar(fn):
+                    def decorate(context):
+                        context.write("BAR")
+                        fn()
+                        context.write("BAR")
+                        return ''
+                    return decorate
+            %>
+
+            <%def name="foo()" decorator="bar">
+                this is foo
+            </%def>
+
+            ${foo()}
+        """)
+
+        assert flatten_result(template.render()) == "BAR this is foo BAR"
+
+        assert flatten_result(template.get_def('foo').render()) == "BAR this is foo BAR"
+
+
+    def test_nested(self):
+        template = Template("""
+            <%!
+                def bat(fn):
+                    def decorate(context):
+                        return "BAT" + runtime.capture(context, fn) + "BAT"
+                    return decorate
+            %>
+
+            <%def name="foo()">
+ 
+                <%def name="bar()" decorator="bat">
+                    this is bar
+                </%def>
+                ${bar()}
+            </%def>
+
+            ${foo()}
+        """)
+
+        assert flatten_result(template.render()) == "BAT this is bar BAT"
+ 
+    def test_toplevel_decorated_name(self):
+        template = Template("""
+            <%!
+                def bar(fn):
+                    def decorate(context, *args, **kw):
+                        return "function " + fn.__name__ + " " + runtime.capture(context, fn, *args, **kw)
+                    return decorate
+            %>
+
+            <%def name="foo(y, x)" decorator="bar">
+                this is foo ${y} ${x}
+            </%def>
+
+            ${foo(1, x=5)}
+        """)
+
+        assert flatten_result(template.render()) == "function foo this is foo 1 5"
+
+    def test_nested_decorated_name(self):
+        template = Template("""
+            <%!
+                def bat(fn):
+                    def decorate(context):
+                        return "function " + fn.__name__ + " " + runtime.capture(context, fn)
+                    return decorate
+            %>
+
+            <%def name="foo()">
+
+                <%def name="bar()" decorator="bat">
+                    this is bar
+                </%def>
+                ${bar()}
+            </%def>
+
+            ${foo()}
+        """)
+
+        assert flatten_result(template.render()) == "function bar this is bar"
+ 
diff --git a/lib/Mako-0.7.3/test/test_def.py b/lib/Mako-0.7.3/test/test_def.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_def.py
@@ -0,0 +1,678 @@
+from mako.template import Template
+from mako import lookup
+from test import TemplateTest
+from util import flatten_result, result_lines
+from test import eq_, assert_raises
+
+class DefTest(TemplateTest):
+    def test_def_noargs(self):
+        template = Template("""
+
+        ${mycomp()}
+
+        <%def name="mycomp()">
+            hello mycomp ${variable}
+        </%def>
+
+        """)
+        eq_(
+            template.render(variable='hi').strip(),
+            """hello mycomp hi"""
+        )
+
+    def test_def_blankargs(self):
+        template = Template("""
+        <%def name="mycomp()">
+            hello mycomp ${variable}
+        </%def>
+
+        ${mycomp()}""")
+        eq_(
+            template.render(variable='hi').strip(),
+            "hello mycomp hi"
+        )
+
+    def test_def_args(self):
+        template = Template("""
+        <%def name="mycomp(a, b)">
+            hello mycomp ${variable}, ${a}, ${b}
+        </%def>
+
+        ${mycomp(5, 6)}""")
+        eq_(
+            template.render(variable='hi', a=5, b=6).strip(),
+            """hello mycomp hi, 5, 6"""
+        )
+
+    def test_inter_def(self):
+        """test defs calling each other"""
+        template = Template("""
+        ${b()}
+
+        <%def name="a()">\
+        im a
+        </%def>
+
+        <%def name="b()">
+        im b
+        and heres a:  ${a()}
+        </%def>
+
+        <%def name="c()">
+        im c
+        </%def>
+""")
+        # check that "a" is declared in "b", but not in "c"
+        assert "a" not in template.module.render_c.func_code.co_varnames
+        assert "a" in template.module.render_b.func_code.co_varnames
+
+        # then test output
+        eq_(
+            flatten_result(template.render()),
+            "im b and heres a: im a"
+        )
+
+    def test_toplevel(self):
+        """test calling a def from the top level"""
+
+        template = Template("""
+
+            this is the body
+
+            <%def name="a()">
+                this is a
+            </%def>
+
+            <%def name="b(x, y)">
+                this is b, ${x} ${y}
+            </%def>
+
+        """)
+
+        self._do_test(template.get_def("a"),
+                    "this is a",
+                    filters=flatten_result)
+        self._do_test(template.get_def("b"),
+                    "this is b, 10 15",
+                    template_args={'x': 10, 'y': 15},
+                    filters=flatten_result)
+        self._do_test(template.get_def("body"),
+                    "this is the body",
+                    filters=flatten_result)
+
+        # test that args outside of the dict can be used
+        self._do_test(template.get_def("a"), "this is a",
+                        filters=flatten_result,
+                        template_args={'q': 5, 'zq': 'test'})
+
+class ScopeTest(TemplateTest):
+    """test scoping rules.  The key is, enclosing
+    scope always takes precedence over contextual scope."""
+
+    def test_scope_one(self):
+        self._do_memory_test("""
+        <%def name="a()">
+            this is a, and y is ${y}
+        </%def>
+
+        ${a()}
+
+        <%
+            y = 7
+        %>
+
+        ${a()}
+
+""",
+            "this is a, and y is None this is a, and y is 7",
+            filters=flatten_result,
+            template_args={'y': None}
+        )
+
+    def test_scope_two(self):
+        t = Template("""
+        y is ${y}
+
+        <%
+            y = 7
+        %>
+
+        y is ${y}
+""")
+        try:
+            t.render(y=None)
+            assert False
+        except UnboundLocalError:
+            assert True
+
+    def test_scope_four(self):
+        """test that variables are pulled
+        from 'enclosing' scope before context."""
+        t = Template("""
+            <%
+                x = 5
+            %>
+            <%def name="a()">
+                this is a. x is ${x}.
+            </%def>
+
+            <%def name="b()">
+                <%
+                    x = 9
+                %>
+                this is b. x is ${x}.
+                calling a. ${a()}
+            </%def>
+
+            ${b()}
+""")
+        eq_(
+            flatten_result(t.render()),
+            "this is b. x is 9. calling a. this is a. x is 5."
+        )
+
+    def test_scope_five(self):
+        """test that variables are pulled from
+        'enclosing' scope before context."""
+        # same as test four, but adds a scope around it.
+        t = Template("""
+            <%def name="enclosing()">
+            <%
+                x = 5
+            %>
+            <%def name="a()">
+                this is a. x is ${x}.
+            </%def>
+
+            <%def name="b()">
+                <%
+                    x = 9
+                %>
+                this is b. x is ${x}.
+                calling a. ${a()}
+            </%def>
+
+            ${b()}
+            </%def>
+            ${enclosing()}
+""")
+        eq_(
+            flatten_result(t.render()),
+            "this is b. x is 9. calling a. this is a. x is 5."
+        )
+
+    def test_scope_six(self):
+        """test that the initial context counts
+        as 'enclosing' scope, for plain defs"""
+        t = Template("""
+
+        <%def name="a()">
+            a: x is ${x}
+        </%def>
+
+        <%def name="b()">
+            <%
+                x = 10
+            %>
+            b. x is ${x}.  ${a()}
+        </%def>
+
+        ${b()}
+    """)
+        eq_(
+            flatten_result(t.render(x=5)),
+            "b. x is 10. a: x is 5"
+        )
+
+    def test_scope_seven(self):
+        """test that the initial context counts
+        as 'enclosing' scope, for nested defs"""
+        t = Template("""
+        <%def name="enclosing()">
+            <%def name="a()">
+                a: x is ${x}
+            </%def>
+
+            <%def name="b()">
+                <%
+                    x = 10
+                %>
+                b. x is ${x}.  ${a()}
+            </%def>
+
+            ${b()}
+        </%def>
+        ${enclosing()}
+    """)
+        eq_(
+            flatten_result(t.render(x=5)),
+            "b. x is 10. a: x is 5"
+        )
+
+    def test_scope_eight(self):
+        """test that the initial context counts
+        as 'enclosing' scope, for nested defs"""
+        t = Template("""
+        <%def name="enclosing()">
+            <%def name="a()">
+                a: x is ${x}
+            </%def>
+
+            <%def name="b()">
+                <%
+                    x = 10
+                %>
+
+                b. x is ${x}.  ${a()}
+            </%def>
+
+            ${b()}
+        </%def>
+        ${enclosing()}
+    """)
+        eq_(
+            flatten_result(t.render(x=5)),
+            "b. x is 10. a: x is 5"
+        )
+
+    def test_scope_nine(self):
+        """test that 'enclosing scope' doesnt
+        get exported to other templates"""
+
+        l = lookup.TemplateLookup()
+        l.put_string('main', """
+        <%
+            x = 5
+        %>
+        this is main.  <%include file="secondary"/>
+""")
+
+        l.put_string('secondary', """
+        this is secondary.  x is ${x}
+""")
+
+        eq_(
+            flatten_result(l.get_template('main').render(x=2)),
+            "this is main. this is secondary. x is 2"
+        )
+
+    def test_scope_ten(self):
+        t = Template("""
+            <%def name="a()">
+                <%def name="b()">
+                    <%
+                        y = 19
+                    %>
+                    b/c: ${c()}
+                    b/y: ${y}
+                </%def>
+                <%def name="c()">
+                    c/y: ${y}
+                </%def>
+
+                <%
+                    # we assign to "y".  but the 'enclosing
+                    # scope' of "b" and "c" is from
+                    # the "y" on the outside
+                    y = 10
+                %>
+                a/y: ${y}
+                a/b: ${b()}
+            </%def>
+
+            <%
+                y = 7
+            %>
+            main/a: ${a()}
+            main/y: ${y}
+    """)
+        eq_(
+            flatten_result(t.render()),
+            "main/a: a/y: 10 a/b: b/c: c/y: 10 b/y: 19 main/y: 7"
+        )
+
+    def test_scope_eleven(self):
+        t = Template("""
+            x is ${x}
+            <%def name="a(x)">
+                this is a, ${b()}
+                <%def name="b()">
+                    this is b, x is ${x}
+                </%def>
+            </%def>
+
+            ${a(x=5)}
+""")
+        eq_(
+            result_lines(t.render(x=10)),
+        [
+            "x is 10",
+            "this is a,",
+            "this is b, x is 5"
+        ])
+
+    def test_unbound_scope(self):
+        t = Template("""
+            <%
+                y = 10
+            %>
+            <%def name="a()">
+                y is: ${y}
+                <%
+                    # should raise error ?
+                    y = 15
+                %>
+                y is ${y}
+            </%def>
+            ${a()}
+""")
+        assert_raises(
+            UnboundLocalError,
+            t.render
+            )
+
+    def test_unbound_scope_two(self):
+        t = Template("""
+            <%def name="enclosing()">
+            <%
+                y = 10
+            %>
+            <%def name="a()">
+                y is: ${y}
+                <%
+                    # should raise error ?
+                    y = 15
+                %>
+                y is ${y}
+            </%def>
+            ${a()}
+            </%def>
+            ${enclosing()}
+""")
+        try:
+            print t.render()
+            assert False
+        except UnboundLocalError:
+            assert True
+
+    def test_canget_kwargs(self):
+        """test that arguments passed to the body()
+        function are accessible by top-level defs"""
+        l = lookup.TemplateLookup()
+        l.put_string("base", """
+
+        ${next.body(x=12)}
+
+        """)
+
+        l.put_string("main", """
+            <%inherit file="base"/>
+            <%page args="x"/>
+            this is main.  x is ${x}
+
+            ${a()}
+
+            <%def name="a(**args)">
+                this is a, x is ${x}
+            </%def>
+        """)
+
+        # test via inheritance
+        eq_(
+            result_lines(l.get_template("main").render()),
+            [
+            "this is main. x is 12",
+            "this is a, x is 12"
+        ])
+
+        l.put_string("another", """
+            <%namespace name="ns" file="main"/>
+
+            ${ns.body(x=15)}
+        """)
+        # test via namespace
+        eq_(
+            result_lines(l.get_template("another").render()),
+        [
+            "this is main. x is 15",
+            "this is a, x is 15"
+        ])
+
+    def test_inline_expression_from_arg_one(self):
+        """test that cache_key=${foo} gets its value from
+        the 'foo' argument in the <%def> tag,
+        and strict_undefined doesn't complain.
+
+        this is #191.
+
+        """
+        t = Template("""
+        <%def name="layout(foo)" cached="True" cache_key="${foo}">
+        foo: ${foo}
+        </%def>
+
+        ${layout(3)}
+        """, strict_undefined=True,
+            cache_impl="plain")
+
+        eq_(
+            result_lines(t.render()),
+            ["foo: 3"]
+        )
+
+    def test_interpret_expression_from_arg_two(self):
+        """test that cache_key=${foo} gets its value from
+        the 'foo' argument regardless of it being passed
+        from the context.
+
+        This is here testing that there's no change
+        to existing behavior before and after #191.
+
+        """
+        t = Template("""
+        <%def name="layout(foo)" cached="True" cache_key="${foo}">
+        foo: ${value}
+        </%def>
+
+        ${layout(3)}
+        """, cache_impl="plain")
+
+        eq_(
+            result_lines(t.render(foo='foo', value=1)),
+            ["foo: 1"]
+        )
+        eq_(
+            result_lines(t.render(foo='bar', value=2)),
+            ["foo: 1"]
+        )
+
+class NestedDefTest(TemplateTest):
+    def test_nested_def(self):
+        t = Template("""
+
+        ${hi()}
+
+        <%def name="hi()">
+            hey, im hi.
+            and heres ${foo()}, ${bar()}
+
+            <%def name="foo()">
+                this is foo
+            </%def>
+
+            <%def name="bar()">
+                this is bar
+            </%def>
+        </%def>
+""")
+        eq_(
+            flatten_result(t.render()),
+            "hey, im hi. and heres this is foo , this is bar"
+        )
+
+    def test_nested_2(self):
+        t = Template("""
+            x is ${x}
+            <%def name="a()">
+                this is a, x is ${x}
+                ${b()}
+                <%def name="b()">
+                    this is b: ${x}
+                </%def>
+            </%def>
+            ${a()}
+""")
+
+        eq_(
+            flatten_result(t.render(x=10)),
+            "x is 10 this is a, x is 10 this is b: 10"
+        )
+
+    def test_nested_with_args(self):
+        t = Template("""
+        ${a()}
+        <%def name="a()">
+            <%def name="b(x, y=2)">
+                b x is ${x} y is ${y}
+            </%def>
+            a ${b(5)}
+        </%def>
+""")
+        eq_(
+            flatten_result(t.render()),
+            "a b x is 5 y is 2"
+        )
+
+    def test_nested_def_2(self):
+        template = Template("""
+        ${a()}
+        <%def name="a()">
+            <%def name="b()">
+                <%def name="c()">
+                    comp c
+                </%def>
+                ${c()}
+            </%def>
+            ${b()}
+        </%def>
+""")
+        eq_(
+            flatten_result(template.render()),
+            "comp c"
+        )
+
+    def test_nested_nested_def(self):
+        t = Template("""
+
+        ${a()}
+        <%def name="a()">
+            a
+            <%def name="b1()">
+                a_b1
+            </%def>
+            <%def name="b2()">
+                a_b2 ${c1()}
+                <%def name="c1()">
+                    a_b2_c1
+                </%def>
+            </%def>
+            <%def name="b3()">
+                a_b3 ${c1()}
+                <%def name="c1()">
+                    a_b3_c1 heres x: ${x}
+                    <%
+                        y = 7
+                    %>
+                    y is ${y}
+                </%def>
+                <%def name="c2()">
+                    a_b3_c2
+                    y is ${y}
+                    c1 is ${c1()}
+                </%def>
+                ${c2()}
+            </%def>
+
+            ${b1()} ${b2()}  ${b3()}
+        </%def>
+""")
+        eq_(
+            flatten_result(t.render(x=5, y=None)),
+            "a a_b1 a_b2 a_b2_c1 a_b3 a_b3_c1 "
+            "heres x: 5 y is 7 a_b3_c2 y is "
+            "None c1 is a_b3_c1 heres x: 5 y is 7"
+        )
+
+    def test_nested_nested_def_2(self):
+        t = Template("""
+        <%def name="a()">
+            this is a ${b()}
+            <%def name="b()">
+                this is b
+                ${c()}
+            </%def>
+
+            <%def name="c()">
+                this is c
+            </%def>
+        </%def>
+        ${a()}
+""")
+        eq_(
+            flatten_result(t.render()),
+            "this is a this is b this is c"
+        )
+
+    def test_outer_scope(self):
+        t = Template("""
+        <%def name="a()">
+            a: x is ${x}
+        </%def>
+
+        <%def name="b()">
+            <%def name="c()">
+            <%
+                x = 10
+            %>
+            c. x is ${x}.  ${a()}
+            </%def>
+
+            b. ${c()}
+        </%def>
+
+        ${b()}
+
+        x is ${x}
+""")
+        eq_(
+            flatten_result(t.render(x=5)),
+            "b. c. x is 10. a: x is 5 x is 5"
+        )
+
+class ExceptionTest(TemplateTest):
+    def test_raise(self):
+        template = Template("""
+            <%
+                raise Exception("this is a test")
+            %>
+    """, format_exceptions=False)
+        assert_raises(
+            Exception,
+            template.render
+            )
+
+    def test_handler(self):
+        def handle(context, error):
+            context.write("error message is " + str(error))
+            return True
+
+        template = Template("""
+            <%
+                raise Exception("this is a test")
+            %>
+    """, error_handler=handle)
+        eq_(
+            template.render().strip(),
+            "error message is this is a test"
+        )
+
diff --git a/lib/Mako-0.7.3/test/test_exceptions.py b/lib/Mako-0.7.3/test/test_exceptions.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_exceptions.py
@@ -0,0 +1,300 @@
+# -*- coding: utf-8 -*-
+import sys
+import unittest
+
+from mako import exceptions, util
+from mako.template import Template
+from mako.lookup import TemplateLookup
+from util import result_lines
+from test import template_base, module_base, TemplateTest
+from test import requires_pygments_14, requires_no_pygments, \
+    requires_python_25_or_greater
+
+
+class ExceptionsTest(TemplateTest):
+    def test_html_error_template(self):
+        """test the html_error_template"""
+        code = """
+% i = 0
+"""
+        try:
+            template = Template(code)
+            template.render_unicode()
+            assert False
+        except exceptions.CompileException, ce:
+            html_error = exceptions.html_error_template().render_unicode()
+            assert ("CompileException: Fragment 'i = 0' is not "
+                    "a partial control statement at line: 2 char: 1") in html_error
+            assert '<style>' in html_error
+            html_error_stripped = html_error.strip()
+            assert html_error_stripped.startswith('<html>')
+            assert html_error_stripped.endswith('</html>')
+
+            not_full = exceptions.html_error_template().\
+                                    render_unicode(full=False)
+            assert '<html>' not in not_full
+            assert '<style>' in not_full
+
+            no_css = exceptions.html_error_template().\
+                                    render_unicode(css=False)
+            assert '<style>' not in no_css
+        else:
+            assert False, ("This function should trigger a CompileException, "
+                           "but didn't")
+
+    def test_text_error_template(self):
+        code = """
+% i = 0
+"""
+        try:
+            template = Template(code)
+            template.render_unicode()
+            assert False
+        except exceptions.CompileException, ce:
+            text_error = exceptions.text_error_template().render_unicode()
+            assert 'Traceback (most recent call last):' in text_error
+            assert ("CompileException: Fragment 'i = 0' is not a partial "
+                    "control statement") in text_error
+
+    @requires_pygments_14
+    def test_utf8_html_error_template_pygments(self):
+        """test the html_error_template with a Template containing utf8
+        chars"""
+
+        if util.py3k:
+            code = """# -*- coding: utf-8 -*-
+% if 2 == 2: /an error
+${'привет'}
+% endif
+"""
+        else:
+            code = """# -*- coding: utf-8 -*-
+% if 2 == 2: /an error
+${u'привет'}
+% endif
+"""
+        try:
+            template = Template(code)
+            template.render_unicode()
+        except exceptions.CompileException, ce:
+            html_error = exceptions.html_error_template().render()
+            if util.py3k:
+                assert ("CompileException: Fragment 'if 2 == 2: /an "
+                    "error' is not a partial control statement "
+                    "at line: 2 char: 1").encode(sys.getdefaultencoding(), 'htmlentityreplace') in \
+                    html_error
+            else:
+                assert ("CompileException: Fragment 'if 2 == 2: /an "
+                        "error' is not a partial control statement "
+                        "at line: 2 char: 1") in \
+                        html_error
+
+            if util.py3k:
+                assert u"".encode(sys.getdefaultencoding(),
+                                        'htmlentityreplace') in html_error
+            else:
+                assert u'<pre>3</pre></div></td><td class="code">'\
+                        '<div class="syntax-highlighted"><pre><span '\
+                        'class="cp">${</span><span class="s">u''\
+                        '&#x43F;&#x440;&#x438;&#x432;&#x435;&#x442;'\
+                        ''</span><span class="cp">}</span>'.encode(
+                                sys.getdefaultencoding(),
+                                'htmlentityreplace') in html_error
+        else:
+            assert False, ("This function should trigger a CompileException, "
+                           "but didn't")
+
+    @requires_no_pygments
+    def test_utf8_html_error_template_no_pygments(self):
+        """test the html_error_template with a Template containing utf8
+        chars"""
+
+        if util.py3k:
+            code = """# -*- coding: utf-8 -*-
+% if 2 == 2: /an error
+${'привет'}
+% endif
+"""
+        else:
+            code = """# -*- coding: utf-8 -*-
+% if 2 == 2: /an error
+${u'привет'}
+% endif
+"""
+        try:
+            template = Template(code)
+            template.render_unicode()
+        except exceptions.CompileException, ce:
+            html_error = exceptions.html_error_template().render()
+            if util.py3k:
+                assert ("CompileException: Fragment 'if 2 == 2: /an "
+                    "error' is not a partial control statement "
+                    "at line: 2 char: 1").encode(sys.getdefaultencoding(), 'htmlentityreplace') in \
+                    html_error
+            else:
+                assert ("CompileException: Fragment 'if 2 == 2: /an "
+                        "error' is not a partial control statement "
+                        "at line: 2 char: 1") in \
+                        html_error
+
+            if util.py3k:
+                assert u"${'привет'}".encode(sys.getdefaultencoding(),
+                                        'htmlentityreplace') in html_error
+            else:
+                assert u"${u'привет'}".encode(sys.getdefaultencoding(),
+                                        'htmlentityreplace') in html_error
+        else:
+            assert False, ("This function should trigger a CompileException, "
+                           "but didn't")
+
+    def test_format_closures(self):
+        try:
+            exec "def foo():"\
+                 "    raise RuntimeError('test')"\
+                 in locals()
+            foo()
+        except:
+            html_error = exceptions.html_error_template().render()
+            assert "RuntimeError: test" in str(html_error)
+
+    @requires_python_25_or_greater
+    def test_py_utf8_html_error_template(self):
+        try:
+            foo = u'日本'
+            raise RuntimeError('test')
+        except:
+            html_error = exceptions.html_error_template().render()
+            if util.py3k:
+                assert 'RuntimeError: test' in html_error.decode('utf-8')
+                assert u"foo = '日本'" in html_error.decode('utf-8')
+            else:
+                assert 'RuntimeError: test' in html_error
+                assert "foo = u'&#x65E5;&#x672C;'" in html_error
+
+    def test_py_unicode_error_html_error_template(self):
+        try:
+            raise RuntimeError(u'日本')
+        except:
+            html_error = exceptions.html_error_template().render()
+            assert u"RuntimeError: 日本".encode('ascii', 'ignore') in html_error
+
+    @requires_pygments_14
+    def test_format_exceptions_pygments(self):
+        l = TemplateLookup(format_exceptions=True)
+
+        l.put_string("foo.html", """
+<%inherit file="base.html"/>
+${foobar}
+        """)
+
+        l.put_string("base.html", """
+        ${self.body()}
+        """)
+
+        assert '<div class="sourceline"><table class="syntax-highlightedtable">'\
+                '<tr><td class="linenos"><div class="linenodiv"><pre>3</pre>'\
+                '</div></td><td class="code"><div class="syntax-highlighted">'\
+                '<pre><span class="err">$</span><span class="p">{</span>'\
+                '<span class="n">foobar</span><span class="p">}</span>' in \
+            result_lines(l.get_template("foo.html").render_unicode())
+
+    @requires_no_pygments
+    def test_format_exceptions_no_pygments(self):
+        l = TemplateLookup(format_exceptions=True)
+
+        l.put_string("foo.html", """
+<%inherit file="base.html"/>
+${foobar}
+        """)
+
+        l.put_string("base.html", """
+        ${self.body()}
+        """)
+
+        assert '<div class="sourceline">${foobar}</div>' in \
+            result_lines(l.get_template("foo.html").render_unicode())
+
+    @requires_pygments_14
+    def test_utf8_format_exceptions_pygments(self):
+        """test that htmlentityreplace formatting is applied to
+           exceptions reported with format_exceptions=True"""
+
+        l = TemplateLookup(format_exceptions=True)
+        if util.py3k:
+            l.put_string("foo.html", """# -*- coding: utf-8 -*-\n${'привет' + foobar}""")
+        else:
+            l.put_string("foo.html", """# -*- coding: utf-8 -*-\n${u'привет' + foobar}""")
+
+        if util.py3k:
+            assert '<table class="error syntax-highlightedtable"><tr><td '\
+                    'class="linenos"><div class="linenodiv"><pre>2</pre>'\
+                    '</div></td><td class="code"><div class="error '\
+                    'syntax-highlighted"><pre><span class="cp">${</span>'\
+                    '<span class="s">'привет'</span> <span class="o">+</span> '\
+                    '<span class="n">foobar</span><span class="cp">}</span>'\
+                    '<span class="x"></span>' in \
+                result_lines(l.get_template("foo.html").render().decode('utf-8'))
+        else:
+            assert '<table class="error syntax-highlightedtable"><tr><td '\
+                    'class="linenos"><div class="linenodiv"><pre>2</pre>'\
+                    '</div></td><td class="code"><div class="error '\
+                    'syntax-highlighted"><pre><span class="cp">${</span>'\
+                    '<span class="s">u'&#x43F;&#x440;&#x438;&#x432;'\
+                    '&#x435;&#x442;'</span> <span class="o">+</span> '\
+                    '<span class="n">foobar</span><span class="cp">}</span>'\
+                    '<span class="x"></span>' in \
+                result_lines(l.get_template("foo.html").render().decode('utf-8'))
+
+    @requires_no_pygments
+    def test_utf8_format_exceptions_no_pygments(self):
+        """test that htmlentityreplace formatting is applied to
+           exceptions reported with format_exceptions=True"""
+
+        l = TemplateLookup(format_exceptions=True)
+        if util.py3k:
+            l.put_string("foo.html", """# -*- coding: utf-8 -*-\n${'привет' + foobar}""")
+        else:
+            l.put_string("foo.html", """# -*- coding: utf-8 -*-\n${u'привет' + foobar}""")
+
+        if util.py3k:
+            assert u'<div class="sourceline">${'привет' + foobar}</div>'\
+                in result_lines(l.get_template("foo.html").render().decode('utf-8'))
+        else:
+            assert '${u'&#x43F;&#x440;&#x438;&#x432;&#x435;'\
+                   '&#x442;' + foobar}' in \
+                result_lines(l.get_template("foo.html").render().decode('utf-8'))
+
+
+    @requires_python_25_or_greater
+    def test_custom_tback(self):
+        try:
+            raise RuntimeError("error 1")
+            foo('bar')
+        except:
+            t, v, tback = sys.exc_info()
+
+        try:
+            raise RuntimeError("error 2")
+        except:
+            html_error = exceptions.html_error_template().\
+                        render_unicode(error=v, traceback=tback)
+
+        # obfuscate the text so that this text
+        # isn't in the 'wrong' exception
+        assert "".join(reversed(");93#&rab;93#&(oof")) in html_error
+
+    def test_tback_no_trace(self):
+        try:
+            t = self._file_template("runtimeerr.html")
+            t.render()
+        except:
+            t, v, tback = sys.exc_info()
+
+        if not util.py3k:
+            # blow away tracebaack info
+            sys.exc_clear()
+
+        # and don't even send what we have.
+        html_error = exceptions.html_error_template().\
+                    render_unicode(error=v, traceback=None)
+        assert "local variable 'y' referenced before assignment" in html_error
diff --git a/lib/Mako-0.7.3/test/test_filters.py b/lib/Mako-0.7.3/test/test_filters.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_filters.py
@@ -0,0 +1,335 @@
+# -*- coding: utf-8 -*-
+
+from mako.template import Template
+import unittest
+from test import TemplateTest, eq_, requires_python_2
+from util import result_lines, flatten_result
+
+class FilterTest(TemplateTest):
+    def test_basic(self):
+        t = Template("""
+        ${x | myfilter}
+""")
+        assert flatten_result(t.render(x="this is x", myfilter=lambda t: "MYFILTER->%s<-MYFILTER" % t)) == "MYFILTER->this is x<-MYFILTER"
+
+    def test_expr(self):
+        """test filters that are themselves expressions"""
+        t = Template("""
+        ${x | myfilter(y)}
+""")
+        def myfilter(y):
+            return lambda x: "MYFILTER->%s<-%s" % (x, y)
+        assert flatten_result(t.render(x="this is x", myfilter=myfilter, y="this is y")) == "MYFILTER->this is x<-this is y"
+
+    def test_convert_str(self):
+        """test that string conversion happens in expressions before sending to filters"""
+        t = Template("""
+            ${x | trim}
+        """)
+        assert flatten_result(t.render(x=5)) == "5"
+
+    def test_quoting(self):
+        t = Template("""
+            foo ${bar | h}
+        """)
+
+        eq_(
+            flatten_result(t.render(bar="<'some bar'>")),
+            "foo <'some bar'>"
+        )
+
+    @requires_python_2
+    def test_quoting_non_unicode(self):
+        t = Template("""
+            foo ${bar | h}
+        """, disable_unicode=True,
+        output_encoding=None)
+
+        eq_(
+            flatten_result(t.render(bar="<'привет'>")),
+            "foo <'привет'>"
+        )
+
+
+    def test_def(self):
+        t = Template("""
+            <%def name="foo()" filter="myfilter">
+                this is foo
+            </%def>
+            ${foo()}
+""")
+
+        eq_(
+            flatten_result(t.render(x="this is x",
+                        myfilter=lambda t: "MYFILTER->%s<-MYFILTER" % t)),
+            "MYFILTER-> this is foo <-MYFILTER"
+        )
+
+    def test_import(self):
+        t = Template("""
+        <%!
+            from mako import filters
+        %>\
+        trim this string: ${"  some string to trim   " | filters.trim} continue\
+        """)
+
+        assert t.render().strip()=="trim this string: some string to trim continue"
+
+    def test_import_2(self):
+        t = Template("""
+        trim this string: ${"  some string to trim   " | filters.trim} continue\
+        """, imports=["from mako import filters"])
+        #print t.code
+        assert t.render().strip()=="trim this string: some string to trim continue"
+
+    def test_encode_filter(self):
+        t = Template("""# coding: utf-8
+            some stuff.... ${x}
+        """, default_filters=['decode.utf8'])
+        #print t.code
+        assert t.render_unicode(x="voix m’a réveillé").strip() == u"some stuff.... voix m’a réveillé"
+
+    def test_custom_default(self):
+        t = Template("""
+        <%!
+            def myfilter(x):
+                return "->" + x + "<-"
+        %>
+
+            hi ${'there'}
+        """, default_filters=['myfilter'])
+        assert t.render().strip()=="hi ->there<-"
+
+    def test_global(self):
+        t = Template("""
+            <%page expression_filter="h"/>
+            ${"<tag>this is html</tag>"}
+        """)
+        assert t.render().strip()  == "<tag>this is html</tag>"
+
+    def test_block_via_context(self):
+        t = Template("""
+            <%block name="foo" filter="myfilter">
+                some text
+            </%block>
+        """)
+        def myfilter(text):
+            return "MYTEXT" + text
+        eq_(
+            result_lines(t.render(myfilter=myfilter)),
+            ["MYTEXT", "some text"]
+        )
+
+    def test_def_via_context(self):
+        t = Template("""
+            <%def name="foo()" filter="myfilter">
+                some text
+            </%def>
+            ${foo()}
+        """)
+        def myfilter(text):
+            return "MYTEXT" + text
+        eq_(
+            result_lines(t.render(myfilter=myfilter)),
+            ["MYTEXT", "some text"]
+        )
+
+    def test_text_via_context(self):
+        t = Template("""
+            <%text filter="myfilter">
+                some text
+            </%text>
+        """)
+        def myfilter(text):
+            return "MYTEXT" + text
+        eq_(
+            result_lines(t.render(myfilter=myfilter)),
+            ["MYTEXT", "some text"]
+        )
+
+
+    def test_nflag(self):
+        t = Template("""
+            ${"<tag>this is html</tag>" | n}
+        """, default_filters=['h', 'unicode'])
+        assert t.render().strip()  == "<tag>this is html</tag>"
+
+        t = Template("""
+            <%page expression_filter="h"/>
+            ${"<tag>this is html</tag>" | n}
+        """)
+        assert t.render().strip()  == "<tag>this is html</tag>"
+
+        t = Template("""
+            <%page expression_filter="h"/>
+            ${"<tag>this is html</tag>" | n, h}
+        """)
+        assert t.render().strip()  == "<tag>this is html</tag>"
+
+    def test_non_expression(self):
+        t = Template("""
+        <%!
+            def a(text):
+                return "this is a"
+            def b(text):
+                return "this is b"
+        %>
+
+        ${foo()}
+        <%def name="foo()" buffered="True">
+            this is text
+        </%def>
+        """, buffer_filters=['a'])
+        assert t.render().strip() == "this is a"
+
+        t = Template("""
+        <%!
+            def a(text):
+                return "this is a"
+            def b(text):
+                return "this is b"
+        %>
+
+        ${'hi'}
+        ${foo()}
+        <%def name="foo()" buffered="True">
+            this is text
+        </%def>
+        """, buffer_filters=['a'], default_filters=['b'])
+        assert flatten_result(t.render()) == "this is b this is b"
+
+        t = Template("""
+        <%!
+            class Foo(object):
+                foo = True
+                def __str__(self):
+                    return "this is a"
+            def a(text):
+                return Foo()
+            def b(text):
+                if hasattr(text, 'foo'):
+                    return str(text)
+                else:
+                    return "this is b"
+        %>
+
+        ${'hi'}
+        ${foo()}
+        <%def name="foo()" buffered="True">
+            this is text
+        </%def>
+        """, buffer_filters=['a'], default_filters=['b'])
+        assert flatten_result(t.render()) == "this is b this is a"
+
+        t = Template("""
+        <%!
+            def a(text):
+                return "this is a"
+            def b(text):
+                return "this is b"
+        %>
+
+        ${foo()}
+        ${bar()}
+        <%def name="foo()" filter="b">
+            this is text
+        </%def>
+        <%def name="bar()" filter="b" buffered="True">
+            this is text
+        </%def>
+        """, buffer_filters=['a'])
+        assert flatten_result(t.render()) == "this is b this is a"
+
+
+    def test_builtins(self):
+        t = Template("""
+            ${"this is <text>" | h}
+""")
+        assert flatten_result(t.render()) == "this is <text>"
+
+        t = Template("""
+            http://foo.com/arg1=${"hi! this is a string." | u}
+""")
+        assert flatten_result(t.render()) == "http://foo.com/arg1=hi%21+this+is+a+string."
+
+class BufferTest(unittest.TestCase):
+    def test_buffered_def(self):
+        t = Template("""
+            <%def name="foo()" buffered="True">
+                this is foo
+            </%def>
+            ${"hi->" + foo() + "<-hi"}
+""")
+        assert flatten_result(t.render()) == "hi-> this is foo <-hi"
+
+    def test_unbuffered_def(self):
+        t = Template("""
+            <%def name="foo()" buffered="False">
+                this is foo
+            </%def>
+            ${"hi->" + foo() + "<-hi"}
+""")
+        assert flatten_result(t.render()) == "this is foo hi-><-hi"
+
+    def test_capture(self):
+        t = Template("""
+            <%def name="foo()" buffered="False">
+                this is foo
+            </%def>
+            ${"hi->" + capture(foo) + "<-hi"}
+""")
+        assert flatten_result(t.render()) == "hi-> this is foo <-hi"
+
+    def test_capture_exception(self):
+        template = Template("""
+            <%def name="a()">
+                this is a
+                <%
+                    raise TypeError("hi")
+                %>
+            </%def>
+            <%
+                c = capture(a)
+            %>
+            a->${c}<-a
+        """)
+        try:
+            template.render()
+            assert False
+        except TypeError:
+            assert True
+
+    def test_buffered_exception(self):
+        template = Template("""
+            <%def name="a()" buffered="True">
+                <%
+                    raise TypeError("hi")
+                %>
+            </%def>
+
+            ${a()}
+
+""")
+        try:
+            print template.render()
+            assert False
+        except TypeError:
+            assert True
+
+    def test_capture_ccall(self):
+        t = Template("""
+            <%def name="foo()">
+                <%
+                    x = capture(caller.body)
+                %>
+                this is foo.  body: ${x}
+            </%def>
+
+            <%call expr="foo()">
+                ccall body
+            </%call>
+""")
+
+        #print t.render()
+        assert flatten_result(t.render()) == "this is foo. body: ccall body"
+
diff --git a/lib/Mako-0.7.3/test/test_inheritance.py b/lib/Mako-0.7.3/test/test_inheritance.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_inheritance.py
@@ -0,0 +1,350 @@
+from mako.template import Template
+from mako import lookup, util
+import unittest
+from util import flatten_result, result_lines
+
+class InheritanceTest(unittest.TestCase):
+    def test_basic(self):
+        collection = lookup.TemplateLookup()
+
+        collection.put_string('main', """
+<%inherit file="base"/>
+
+<%def name="header()">
+    main header.
+</%def>
+
+this is the content.
+""")
+
+        collection.put_string('base', """
+This is base.
+
+header: ${self.header()}
+
+body: ${self.body()}
+
+footer: ${self.footer()}
+
+<%def name="footer()">
+    this is the footer. header again ${next.header()}
+</%def>
+""")
+
+        assert result_lines(collection.get_template('main').render()) == [
+            'This is base.',
+             'header:',
+             'main header.',
+             'body:',
+             'this is the content.',
+             'footer:',
+             'this is the footer. header again',
+             'main header.'
+        ]
+
+    def test_multilevel_nesting(self):
+        collection = lookup.TemplateLookup()
+
+        collection.put_string('main', """
+<%inherit file="layout"/>
+<%def name="d()">main_d</%def>
+main_body ${parent.d()}
+full stack from the top:
+    ${self.name} ${parent.name} ${parent.context['parent'].name} ${parent.context['parent'].context['parent'].name}
+""")
+ 
+        collection.put_string('layout', """
+<%inherit file="general"/>
+<%def name="d()">layout_d</%def>
+layout_body
+parent name: ${parent.name}
+${parent.d()}
+${parent.context['parent'].d()}
+${next.body()}
+""")
+
+        collection.put_string('general', """
+<%inherit file="base"/>
+<%def name="d()">general_d</%def>
+general_body
+${next.d()}
+${next.context['next'].d()}
+${next.body()}
+""")
+        collection.put_string('base', """
+base_body
+full stack from the base:
+    ${self.name} ${self.context['parent'].name} ${self.context['parent'].context['parent'].name} ${self.context['parent'].context['parent'].context['parent'].name}
+${next.body()}
+<%def name="d()">base_d</%def>
+""")
+
+        assert result_lines(collection.get_template('main').render()) == [
+            'base_body',
+             'full stack from the base:',
+             'self:main self:layout self:general self:base',
+             'general_body',
+             'layout_d',
+             'main_d',
+             'layout_body',
+             'parent name: self:general',
+             'general_d',
+             'base_d',
+             'main_body layout_d',
+             'full stack from the top:',
+             'self:main self:layout self:general self:base'
+        ]
+ 
+    def test_includes(self):
+        """test that an included template also has its full hierarchy invoked."""
+        collection = lookup.TemplateLookup()
+ 
+        collection.put_string("base", """
+        <%def name="a()">base_a</%def>
+        This is the base.
+        ${next.body()}
+        End base.
+""")
+
+        collection.put_string("index","""
+        <%inherit file="base"/>
+        this is index.
+        a is: ${self.a()}
+        <%include file="secondary"/>
+""")
+
+        collection.put_string("secondary","""
+        <%inherit file="base"/>
+        this is secondary.
+        a is: ${self.a()}
+""")
+
+        assert result_lines(collection.get_template("index").render()) == [
+            'This is the base.', 
+            'this is index.',
+             'a is: base_a',
+             'This is the base.',
+             'this is secondary.',
+             'a is: base_a',
+             'End base.',
+             'End base.'
+            ]
+
+    def test_namespaces(self):
+        """test that templates used via <%namespace> have access to an inheriting 'self', and that
+        the full 'self' is also exported."""
+        collection = lookup.TemplateLookup()
+ 
+        collection.put_string("base", """
+        <%def name="a()">base_a</%def>
+        <%def name="b()">base_b</%def>
+        This is the base.
+        ${next.body()}
+""")
+
+        collection.put_string("layout", """
+        <%inherit file="base"/>
+        <%def name="a()">layout_a</%def>
+        This is the layout..
+        ${next.body()}
+""")
+
+        collection.put_string("index","""
+        <%inherit file="base"/>
+        <%namespace name="sc" file="secondary"/>
+        this is index.
+        a is: ${self.a()}
+        sc.a is: ${sc.a()}
+        sc.b is: ${sc.b()}
+        sc.c is: ${sc.c()}
+        sc.body is: ${sc.body()}
+""")
+
+        collection.put_string("secondary","""
+        <%inherit file="layout"/>
+        <%def name="c()">secondary_c.  a is ${self.a()} b is ${self.b()} d is ${self.d()}</%def>
+        <%def name="d()">secondary_d.</%def>
+        this is secondary.
+        a is: ${self.a()}
+        c is: ${self.c()}
+""")
+
+        assert result_lines(collection.get_template('index').render()) ==  ['This is the base.',
+         'this is index.',
+         'a is: base_a',
+         'sc.a is: layout_a',
+         'sc.b is: base_b',
+         'sc.c is: secondary_c. a is layout_a b is base_b d is secondary_d.',
+         'sc.body is:',
+         'this is secondary.',
+         'a is: layout_a',
+         'c is: secondary_c. a is layout_a b is base_b d is secondary_d.'
+         ]
+
+    def test_pageargs(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("base", """
+            this is the base.
+
+            <%
+            sorted_ = pageargs.items()
+            sorted_ = sorted(sorted_)
+            %>
+            pageargs: (type: ${type(pageargs)}) ${sorted_}
+            <%def name="foo()">
+                ${next.body(**context.kwargs)}
+            </%def>
+ 
+            ${foo()}
+        """)
+        collection.put_string("index", """
+            <%inherit file="base"/>
+            <%page args="x, y, z=7"/>
+            print ${x}, ${y}, ${z}
+        """)
+ 
+        if util.py3k:
+            assert result_lines(collection.get_template('index').render_unicode(x=5,y=10)) == [
+                "this is the base.",
+                "pageargs: (type: <class 'dict'>) [('x', 5), ('y', 10)]",
+                "print 5, 10, 7"
+            ]
+        else:
+            assert result_lines(collection.get_template('index').render_unicode(x=5,y=10)) == [
+                "this is the base.",
+                "pageargs: (type: <type 'dict'>) [('x', 5), ('y', 10)]",
+                "print 5, 10, 7"
+            ]
+ 
+    def test_pageargs_2(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("base", """
+            this is the base.
+ 
+            ${next.body(**context.kwargs)}
+ 
+            <%def name="foo(**kwargs)">
+                ${next.body(**kwargs)}
+            </%def>
+
+            <%def name="bar(**otherargs)">
+                ${next.body(z=16, **context.kwargs)}
+            </%def>
+
+            ${foo(x=12, y=15, z=8)}
+            ${bar(x=19, y=17)}
+        """)
+        collection.put_string("index", """
+            <%inherit file="base"/>
+            <%page args="x, y, z=7"/>
+            pageargs: ${x}, ${y}, ${z}
+        """)
+        assert result_lines(collection.get_template('index').render(x=5,y=10)) == [
+            "this is the base.",
+            "pageargs: 5, 10, 7",
+            "pageargs: 12, 15, 8",
+            "pageargs: 5, 10, 16"
+        ]
+ 
+    def test_pageargs_err(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("base", """
+            this is the base.
+            ${next.body()}
+        """)
+        collection.put_string("index", """
+            <%inherit file="base"/>
+            <%page args="x, y, z=7"/>
+            print ${x}, ${y}, ${z}
+        """)
+        try:
+            print collection.get_template('index').render(x=5,y=10)
+            assert False
+        except TypeError:
+            assert True
+ 
+    def test_toplevel(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("base", """
+            this is the base.
+            ${next.body()}
+        """)
+        collection.put_string("index", """
+            <%inherit file="base"/>
+            this is the body
+        """)
+        assert result_lines(collection.get_template('index').render()) == [
+            "this is the base.",
+            "this is the body"
+        ]
+        assert result_lines(collection.get_template('index').get_def("body").render()) == [
+            "this is the body"
+        ]
+
+    def test_dynamic(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("base", """
+            this is the base.
+            ${next.body()}
+        """)
+        collection.put_string("index", """
+            <%!
+                def dyn(context):
+                    if context.get('base', None) is not None:
+                        return 'base'
+                    else:
+                        return None
+            %>
+            <%inherit file="${dyn(context)}"/>
+            this is index.
+        """)
+        assert result_lines(collection.get_template('index').render()) == [
+            'this is index.'
+        ]
+        assert result_lines(collection.get_template('index').render(base=True)) == [
+            'this is the base.',
+            'this is index.'
+        ]
+ 
+    def test_in_call(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("/layout.html","""
+        Super layout!
+        <%call expr="self.grid()">
+            ${next.body()}
+        </%call>
+        Oh yea!
+
+        <%def name="grid()">
+            Parent grid
+                ${caller.body()}
+            End Parent
+        </%def>
+        """)
+
+
+        collection.put_string("/subdir/layout.html", """
+        ${next.body()}
+        <%def name="grid()">
+           Subdir grid
+               ${caller.body()}
+           End subdir
+        </%def>
+        <%inherit file="/layout.html"/>
+        """)
+ 
+        collection.put_string("/subdir/renderedtemplate.html","""
+        Holy smokes!
+        <%inherit file="/subdir/layout.html"/>
+        """)
+
+        #print collection.get_template("/layout.html").code
+        #print collection.get_template("/subdir/renderedtemplate.html").render()
+        assert result_lines(collection.get_template("/subdir/renderedtemplate.html").render()) == [
+            "Super layout!",
+            "Subdir grid",
+            "Holy smokes!",
+            "End subdir",
+            "Oh yea!"
+        ]
+
diff --git a/lib/Mako-0.7.3/test/test_lexer.py b/lib/Mako-0.7.3/test/test_lexer.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_lexer.py
@@ -0,0 +1,871 @@
+import unittest
+
+from mako.lexer import Lexer
+from mako import exceptions, util
+from util import flatten_result, result_lines
+from mako.template import Template
+import re
+from test import TemplateTest, template_base, skip_if, eq_, assert_raises_message
+
+# create fake parsetree classes which are constructed
+# exactly as the repr() of a real parsetree object.
+# this allows us to use a Python construct as the source
+# of a comparable repr(), which is also hit by the 2to3 tool.
+
+def repr_arg(x):
+    if isinstance(x, dict):
+        return util.sorted_dict_repr(x)
+    else:
+        return repr(x)
+
+from mako import parsetree
+for cls in parsetree.__dict__.values():
+    if isinstance(cls, type) and \
+        issubclass(cls, parsetree.Node):
+        clsname = cls.__name__
+        exec ("""
+class %s(object):
+    def __init__(self, *args):
+        self.args = args
+    def __repr__(self):
+        return "%%s(%%s)" %% (
+            self.__class__.__name__,
+            ", ".join(repr_arg(x) for x in self.args)
+            )
+""" % clsname) in locals()
+
+# NOTE: most assertion expressions were generated, then formatted
+# by PyTidy, hence the dense formatting.
+
+class LexerTest(TemplateTest):
+
+    def _compare(self, node, expected):
+        eq_(repr(node), repr(expected))
+
+    def test_text_and_tag(self):
+        template = """
+<b>Hello world</b>
+        <%def name="foo()">
+                this is a def.
+        </%def>
+        
+        and some more text.
+"""
+        node = Lexer(template).parse()
+        self._compare(node, TemplateNode({},
+                      [Text(u'''\n<b>Hello world</b>\n        ''', (1,
+                      1)), DefTag(u'def', {u'name': u'foo()'}, (3, 9),
+                      [Text(u'''\n                this is a def.\n        ''',
+                      (3, 28))]),
+                      Text(u'''\n        \n        and some more text.\n''',
+                      (5, 16))]))
+
+    def test_unclosed_tag(self):
+        template = """
+        
+            <%def name="foo()">
+             other text
+        """
+        try:
+            nodes = Lexer(template).parse()
+            assert False
+        except exceptions.SyntaxException, e:
+            assert str(e) == "Unclosed tag: <%def> at line: 5 char: 9"
+
+    def test_onlyclosed_tag(self):
+        template = \
+            """
+            <%def name="foo()">
+                foo
+            </%def>
+            
+            </%namespace>
+            
+            hi.
+        """
+        self.assertRaises(exceptions.SyntaxException,
+                          Lexer(template).parse)
+
+    def test_noexpr_allowed(self):
+        template = \
+            """
+            <%namespace name="${foo}"/>
+        """
+        self.assertRaises(exceptions.CompileException,
+                          Lexer(template).parse)
+
+    def test_unmatched_tag(self):
+        template = \
+            """
+        <%namespace name="bar">
+        <%def name="foo()">
+            foo
+            </%namespace>
+        </%def>
+        
+        
+        hi.
+"""
+        self.assertRaises(exceptions.SyntaxException,
+                          Lexer(template).parse)
+
+    def test_nonexistent_tag(self):
+        template = """
+            <%lala x="5"/>
+        """
+        self.assertRaises(exceptions.CompileException,
+                          Lexer(template).parse)
+
+    def test_wrongcase_tag(self):
+        template = \
+            """
+            <%DEF name="foo()">
+            </%def>
+        
+        """
+        self.assertRaises(exceptions.CompileException,
+                          Lexer(template).parse)
+
+    def test_percent_escape(self):
+        template = \
+            """
+        
+%% some whatever.
+
+    %% more some whatever
+    % if foo:
+    % endif
+        """
+        node = Lexer(template).parse()
+        self._compare(node, TemplateNode({}, [Text(u'''\n        \n''',
+                      (1, 1)), Text(u'''% some whatever.\n\n''', (3, 2)),
+                      Text(u'   %% more some whatever\n', (5, 2)),
+                      ControlLine(u'if', u'if foo:', False, (6, 1)),
+                      ControlLine(u'if', u'endif', True, (7, 1)),
+                      Text(u'        ', (8, 1))]))
+
+    def test_text_tag(self):
+        template = \
+            """
+        ## comment
+        % if foo:
+            hi
+        % endif
+        <%text>
+            # more code
+            
+            % more code
+            <%illegal compionent>/></>
+            <%def name="laal()">def</%def>
+            
+            
+        </%text>
+
+        <%def name="foo()">this is foo</%def>
+        
+        % if bar:
+            code
+        % endif
+        """
+        node = Lexer(template).parse()
+        self._compare(node, 
+            TemplateNode({}, [Text(u'\n', (1, 1)),
+              Comment(u'comment', (2, 1)), 
+              ControlLine(u'if', u'if foo:', False, (3, 1)),
+              Text(u'            hi\n', (4, 1)),
+              ControlLine(u'if', u'endif', True, (5, 1)),
+              Text(u'        ', (6, 1)), TextTag(u'text', {},
+              (6, 9),
+              [Text(u'''\n            # more code\n            '''
+              '''\n            % more code\n            '''
+              '''<%illegal compionent>/></>\n            '''
+              '''<%def name="laal()">def</%def>\n       '''
+              '''     \n            \n        ''',
+                      (6, 16))]), Text(u'''
+
+        ''', (14, 17)),
+                      DefTag(u'def', {u'name': u'foo()'}, (16, 9),
+                      [Text(u'this is foo', (16, 28))]),
+                      Text(u'''\n        \n''', (16, 46)),
+                      ControlLine(u'if', u'if bar:', False, (18, 1)),
+                      Text(u'            code\n', (19, 1)),
+                      ControlLine(u'if', u'endif', True, (20, 1)),
+                      Text(u'        ', (21, 1))]))
+
+    def test_def_syntax(self):
+        template = \
+            """
+        <%def lala>
+            hi
+        </%def>
+"""
+        self.assertRaises(exceptions.CompileException,
+                          Lexer(template).parse)
+
+    def test_def_syntax_2(self):
+        template = \
+            """
+        <%def name="lala">
+            hi
+        </%def>
+    """
+        self.assertRaises(exceptions.CompileException,
+                          Lexer(template).parse)
+
+    def test_whitespace_equals(self):
+        template = \
+            """
+            <%def name = "adef()" >
+              adef
+            </%def>
+        """
+        node = Lexer(template).parse()
+        self._compare(node, TemplateNode({}, [Text(u'\n            ',
+                      (1, 1)), DefTag(u'def', {u'name': u'adef()'}, (2,
+                      13),
+                      [Text(u'''\n              adef\n            ''',
+                      (2, 36))]), Text(u'\n        ', (4, 20))]))
+
+    def test_ns_tag_closed(self):
+        template = \
+            """
+        
+            <%self:go x="1" y="2" z="${'hi' + ' ' + 'there'}"/>
+        """
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({},
+                      [Text(u'''
+        
+            ''', (1, 1)),
+                      CallNamespaceTag(u'self:go', {u'x': u'1', u'y'
+                      : u'2', u'z': u"${'hi' + ' ' + 'there'}"}, (3,
+                      13), []), Text(u'\n        ', (3, 64))]))
+
+    def test_ns_tag_empty(self):
+        template = \
+            """
+            <%form:option value=""></%form:option>
+        """
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({}, [Text(u'\n            ',
+                      (1, 1)), CallNamespaceTag(u'form:option',
+                      {u'value': u''}, (2, 13), []), Text(u'\n        '
+                      , (2, 51))]))
+
+    def test_ns_tag_open(self):
+        template = \
+            """
+        
+            <%self:go x="1" y="${process()}">
+                this is the body
+            </%self:go>
+        """
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({},
+                      [Text(u'''
+        
+            ''', (1, 1)),
+                      CallNamespaceTag(u'self:go', {u'x': u'1', u'y'
+                      : u'${process()}'}, (3, 13),
+                      [Text(u'''
+                this is the body
+            ''',
+                      (3, 46))]), Text(u'\n        ', (5, 24))]))
+
+    def test_expr_in_attribute(self):
+        """test some slightly trickier expressions.
+        
+        you can still trip up the expression parsing, though, unless we
+        integrated really deeply somehow with AST."""
+
+        template = \
+            """
+            <%call expr="foo>bar and 'lala' or 'hoho'"/>
+            <%call expr='foo<bar and hoho>lala and "x" + "y"'/>
+        """
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({}, [Text(u'\n            ',
+                      (1, 1)), CallTag(u'call', {u'expr'
+                      : u"foo>bar and 'lala' or 'hoho'"}, (2, 13), []),
+                      Text(u'\n            ', (2, 57)), CallTag(u'call'
+                      , {u'expr': u'foo<bar and hoho>lala and "x" + "y"'
+                      }, (3, 13), []), Text(u'\n        ', (3, 64))]))
+
+    def test_pagetag(self):
+        template = \
+            """
+            <%page cached="True", args="a, b"/>
+            
+            some template
+        """
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({}, [Text(u'\n            ',
+                      (1, 1)), PageTag(u'page', {u'args': u'a, b',
+                      u'cached': u'True'}, (2, 13), []),
+                      Text(u'''
+            
+            some template
+        ''',
+                      (2, 48))]))
+
+    def test_nesting(self):
+        template = \
+            """
+        
+        <%namespace name="ns">
+            <%def name="lala(hi, there)">
+                <%call expr="something()"/>
+            </%def>
+        </%namespace>
+        
+        """
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({},
+                      [Text(u'''
+        
+        ''', (1, 1)),
+                      NamespaceTag(u'namespace', {u'name': u'ns'}, (3,
+                      9), [Text(u'\n            ', (3, 31)),
+                      DefTag(u'def', {u'name': u'lala(hi, there)'}, (4,
+                      13), [Text(u'\n                ', (4, 42)),
+                      CallTag(u'call', {u'expr': u'something()'}, (5,
+                      17), []), Text(u'\n            ', (5, 44))]),
+                      Text(u'\n        ', (6, 20))]),
+                      Text(u'''
+        
+        ''', (7, 22))]))
+
+    if util.py3k:
+        def test_code(self):
+            template = \
+"""text
+    <%
+        print("hi")
+        for x in range(1,5):
+            print(x)
+    %>
+more text
+    <%!
+        import foo
+    %>
+"""
+            nodes = Lexer(template).parse()
+            self._compare(nodes, 
+            TemplateNode({}, [
+                Text(u'text\n    ', (1, 1)), 
+                Code(u'\nprint("hi")\nfor x in range(1,5):\n    '
+                            'print(x)\n    \n', False, (2, 5)), 
+                Text(u'\nmore text\n    ', (6, 7)), 
+                Code(u'\nimport foo\n    \n', True, (8, 5)), 
+                Text(u'\n', (10, 7))])
+            )
+
+
+    else:
+
+        def test_code(self):
+            template = \
+"""text
+    <%
+        print "hi"
+        for x in range(1,5):
+            print x
+    %>
+more text
+    <%!
+        import foo
+    %>
+"""
+            nodes = Lexer(template).parse()
+            self._compare(nodes, 
+            TemplateNode({}, [
+                Text(u'text\n    ', (1, 1)), 
+                Code(u'\nprint "hi"\nfor x in range(1,5):\n    '
+                            'print x\n    \n', False, (2, 5)), 
+                Text(u'\nmore text\n    ', (6, 7)), 
+                Code(u'\nimport foo\n    \n', True, (8, 5)), 
+                Text(u'\n', (10, 7))])
+            )
+
+    def test_code_and_tags(self):
+        template = \
+            """
+<%namespace name="foo">
+    <%def name="x()">
+        this is x
+    </%def>
+    <%def name="y()">
+        this is y
+    </%def>
+</%namespace>
+
+<%
+    result = []
+    data = get_data()
+    for x in data:
+        result.append(x+7)
+%>
+
+    result: <%call expr="foo.x(result)"/>
+"""
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({}, [Text(u'\n', (1, 1)),
+                      NamespaceTag(u'namespace', {u'name': u'foo'}, (2,
+                      1), [Text(u'\n    ', (2, 24)), DefTag(u'def',
+                      {u'name': u'x()'}, (3, 5),
+                      [Text(u'''\n        this is x\n    ''', (3, 22))]),
+                      Text(u'\n    ', (5, 12)), DefTag(u'def', {u'name'
+                      : u'y()'}, (6, 5),
+                      [Text(u'''\n        this is y\n    ''', (6, 22))]),
+                      Text(u'\n', (8, 12))]), Text(u'''\n\n''', (9, 14)),
+                      Code(u'''\nresult = []\ndata = get_data()\n'''
+                      '''for x in data:\n    result.append(x+7)\n\n''',
+                      False, (11, 1)), Text(u'''\n\n    result: ''', (16,
+                      3)), CallTag(u'call', {u'expr': u'foo.x(result)'
+                      }, (18, 13), []), Text(u'\n', (18, 42))]))
+
+    def test_expression(self):
+        template = \
+            """
+        this is some ${text} and this is ${textwith | escapes, moreescapes}
+        <%def name="hi()">
+            give me ${foo()} and ${bar()}
+        </%def>
+        ${hi()}
+"""
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({},
+                      [Text(u'\n        this is some ', (1, 1)),
+                      Expression(u'text', [], (2, 22)),
+                      Text(u' and this is ', (2, 29)),
+                      Expression(u'textwith ', ['escapes', 'moreescapes'
+                      ], (2, 42)), Text(u'\n        ', (2, 76)),
+                      DefTag(u'def', {u'name': u'hi()'}, (3, 9),
+                      [Text(u'\n            give me ', (3, 27)),
+                      Expression(u'foo()', [], (4, 21)), Text(u' and ',
+                      (4, 29)), Expression(u'bar()', [], (4, 34)),
+                      Text(u'\n        ', (4, 42))]), Text(u'\n        '
+                      , (5, 16)), Expression(u'hi()', [], (6, 9)),
+                      Text(u'\n', (6, 16))]))
+
+
+    def test_tricky_expression(self):
+        template = """
+        
+            ${x and "|" or "hi"}
+        """
+        nodes = Lexer(template).parse()
+        self._compare(
+            nodes,
+            TemplateNode({}, [
+                Text(u'\n        \n            ', (1, 1)), 
+                Expression(u'x and "|" or "hi"', [], (3, 13)), 
+                Text(u'\n        ', (3, 33))
+            ])
+        )
+
+        template = """
+        
+            ${hello + '''heres '{|}' text | | }''' | escape1}
+        """
+        nodes = Lexer(template).parse()
+        self._compare(
+            nodes,
+            TemplateNode({}, [
+                Text(u'\n        \n            ', (1, 1)), 
+                Expression(u"hello + '''heres '{|}' text | | }''' ", 
+                                ['escape1'], (3, 13)), 
+                Text(u'\n        ', (3, 62))
+            ])
+        )
+
+    def test_tricky_code(self):
+        if util.py3k:
+            template = """<% print('hi %>') %>"""
+            nodes = Lexer(template).parse()
+            self._compare(nodes, TemplateNode({},
+                          [Code(u"print('hi %>') \n", False, (1, 1))]))
+        else:
+            template = """<% print 'hi %>' %>"""
+            nodes = Lexer(template).parse()
+            self._compare(nodes, TemplateNode({},
+                          [Code(u"print 'hi %>' \n", False, (1, 1))]))
+
+    def test_tricky_code_2(self):
+        template = \
+            """<% 
+        # someone's comment
+        %>
+        """
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({},
+                      [Code(u""" 
+        # someone's comment
+        
+""",
+                      False, (1, 1)), Text(u'\n        ', (3, 11))]))
+
+    if util.py3k:
+        def test_tricky_code_3(self):
+            template = \
+                """<%
+            print('hi')
+            # this is a comment
+            # another comment
+            x = 7 # someone's '''comment
+            print('''
+        there
+        ''')
+            # someone else's comment
+        %> '''and now some text '''"""
+            nodes = Lexer(template).parse()
+            self._compare(nodes, TemplateNode({},
+                          [Code(u"""
+print('hi')
+# this is a comment
+# another comment
+x = 7 # someone's '''comment
+print('''
+        there
+        ''')
+# someone else's comment
+        
+""",
+                          False, (1, 1)),
+                          Text(u" '''and now some text '''", (10,
+                          11))]))
+    else:
+        def test_tricky_code_3(self):
+            template = \
+                """<%
+            print 'hi'
+            # this is a comment
+            # another comment
+            x = 7 # someone's '''comment
+            print '''
+        there
+        '''
+            # someone else's comment
+        %> '''and now some text '''"""
+            nodes = Lexer(template).parse()
+            self._compare(nodes, TemplateNode({},
+                      [Code(u"""\nprint 'hi'\n# this is a comment\n"""
+                      """# another comment\nx = 7 """
+                      """# someone's '''comment\nprint '''\n        """
+                      """there\n        '''\n# someone else's """
+                      """comment\n        \n""",
+                      False, (1, 1)),
+                      Text(u" '''and now some text '''", (10,11))]))
+
+    def test_tricky_code_4(self):
+        template = \
+            """<% foo = "\\"\\\\" %>"""
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({},
+                      [Code(u"""foo = "\\"\\\\" \n""",
+                      False, (1, 1))]))
+
+    def test_tricky_code_5(self):
+        template = \
+            """before ${ {'key': 'value'} } after"""
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({},
+                      [Text(u'before ', (1, 1)),
+                      Expression(u" {'key': 'value'} ", [], (1, 8)),
+                      Text(u' after', (1, 29))]))
+
+    def test_control_lines(self):
+        template = \
+            """
+text text la la
+% if foo():
+ mroe text la la blah blah
+% endif
+
+        and osme more stuff
+        % for l in range(1,5):
+    tex tesl asdl l is ${l} kfmas d
+      % endfor
+    tetx text
+    
+"""
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({},
+                      [Text(u'''\ntext text la la\n''', (1, 1)),
+                      ControlLine(u'if', u'if foo():', False, (3, 1)),
+                      Text(u' mroe text la la blah blah\n', (4, 1)),
+                      ControlLine(u'if', u'endif', True, (5, 1)),
+                      Text(u'''\n        and osme more stuff\n''', (6,
+                      1)), ControlLine(u'for', u'for l in range(1,5):',
+                      False, (8, 1)), Text(u'    tex tesl asdl l is ',
+                      (9, 1)), Expression(u'l', [], (9, 24)),
+                      Text(u' kfmas d\n', (9, 28)), ControlLine(u'for',
+                      u'endfor', True, (10, 1)),
+                      Text(u'''    tetx text\n    \n''', (11, 1))]))
+
+    def test_control_lines_2(self):
+        template = \
+"""% for file in requestattr['toc'].filenames:
+    x
+% endfor
+"""
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({}, [ControlLine(u'for',
+                      u"for file in requestattr['toc'].filenames:",
+                      False, (1, 1)), Text(u'    x\n', (2, 1)),
+                      ControlLine(u'for', u'endfor', True, (3, 1))]))
+
+    def test_long_control_lines(self):
+        template = \
+        """
+    % for file in \\
+        requestattr['toc'].filenames:
+        x
+    % endfor
+        """
+        nodes = Lexer(template).parse()
+        self._compare(
+            nodes,
+            TemplateNode({}, [
+                Text(u'\n', (1, 1)), 
+                ControlLine(u'for', u"for file in \\\n        "
+                                "requestattr['toc'].filenames:", 
+                                False, (2, 1)), 
+                Text(u'        x\n', (4, 1)), 
+                ControlLine(u'for', u'endfor', True, (5, 1)), 
+                Text(u'        ', (6, 1))
+            ])
+        )
+
+    def test_unmatched_control(self):
+        template = """
+
+        % if foo:
+            % for x in range(1,5):
+        % endif
+"""
+        assert_raises_message(
+            exceptions.SyntaxException,
+            "Keyword 'endif' doesn't match keyword 'for' at line: 5 char: 1",
+            Lexer(template).parse
+        )
+
+    def test_unmatched_control_2(self):
+        template = """
+
+        % if foo:
+            % for x in range(1,5):
+            % endfor
+"""
+
+        assert_raises_message(
+            exceptions.SyntaxException,
+            "Unterminated control keyword: 'if' at line: 3 char: 1",
+            Lexer(template).parse
+        )
+
+    def test_unmatched_control_3(self):
+        template = """
+
+        % if foo:
+            % for x in range(1,5):
+            % endlala
+        % endif
+"""
+        assert_raises_message(
+            exceptions.SyntaxException,
+            "Keyword 'endlala' doesn't match keyword 'for' at line: 5 char: 1",
+            Lexer(template).parse
+        )
+
+    def test_ternary_control(self):
+        template = \
+            """
+        % if x:
+            hi
+        % elif y+7==10:
+            there
+        % elif lala:
+            lala
+        % else:
+            hi
+        % endif
+"""
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({}, [Text(u'\n', (1, 1)),
+                      ControlLine(u'if', u'if x:', False, (2, 1)),
+                      Text(u'            hi\n', (3, 1)),
+                      ControlLine(u'elif', u'elif y+7==10:', False, (4,
+                      1)), Text(u'            there\n', (5, 1)),
+                      ControlLine(u'elif', u'elif lala:', False, (6,
+                      1)), Text(u'            lala\n', (7, 1)),
+                      ControlLine(u'else', u'else:', False, (8, 1)),
+                      Text(u'            hi\n', (9, 1)),
+                      ControlLine(u'if', u'endif', True, (10, 1))]))
+
+    def test_integration(self):
+        template = \
+            """<%namespace name="foo" file="somefile.html"/>
+ ## inherit from foobar.html
+<%inherit file="foobar.html"/>
+
+<%def name="header()">
+     <div>header</div>
+</%def>
+<%def name="footer()">
+    <div> footer</div>
+</%def>
+
+<table>
+    % for j in data():
+    <tr>
+        % for x in j:
+            <td>Hello ${x| h}</td>
+        % endfor
+    </tr>
+    % endfor
+</table>
+"""
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({}, [NamespaceTag(u'namespace'
+                      , {u'file': u'somefile.html', u'name': u'foo'},
+                      (1, 1), []), Text(u'\n', (1, 46)),
+                      Comment(u'inherit from foobar.html', (2, 1)),
+                      InheritTag(u'inherit', {u'file': u'foobar.html'},
+                      (3, 1), []), Text(u'''\n\n''', (3, 31)),
+                      DefTag(u'def', {u'name': u'header()'}, (5, 1),
+                      [Text(u'''\n     <div>header</div>\n''', (5,
+                      23))]), Text(u'\n', (7, 8)), DefTag(u'def',
+                      {u'name': u'footer()'}, (8, 1),
+                      [Text(u'''\n    <div> footer</div>\n''', (8,
+                      23))]), Text(u'''\n\n<table>\n''', (10, 8)),
+                      ControlLine(u'for', u'for j in data():', False,
+                      (13, 1)), Text(u'    <tr>\n', (14, 1)),
+                      ControlLine(u'for', u'for x in j:', False, (15,
+                      1)), Text(u'            <td>Hello ', (16, 1)),
+                      Expression(u'x', ['h'], (16, 23)), Text(u'</td>\n'
+                      , (16, 30)), ControlLine(u'for', u'endfor', True,
+                      (17, 1)), Text(u'    </tr>\n', (18, 1)),
+                      ControlLine(u'for', u'endfor', True, (19, 1)),
+                      Text(u'</table>\n', (20, 1))]))
+
+    def test_comment_after_statement(self):
+        template = \
+            """
+        % if x: #comment
+            hi
+        % else: #next
+            hi
+        % endif #end
+"""
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({}, [Text(u'\n', (1, 1)),
+                      ControlLine(u'if', u'if x: #comment', False, (2,
+                      1)), Text(u'            hi\n', (3, 1)),
+                      ControlLine(u'else', u'else: #next', False, (4,
+                      1)), Text(u'            hi\n', (5, 1)),
+                      ControlLine(u'if', u'endif #end', True, (6, 1))]))
+
+    def test_crlf(self):
+        template = open(self._file_path("crlf.html"), 'rb').read()
+        nodes = Lexer(template).parse()
+        self._compare(
+            nodes,
+            TemplateNode({}, [
+                Text(u'<html>\r\n\r\n', (1, 1)), 
+                PageTag(u'page', {
+                            u'args': u"a=['foo',\n                'bar']"
+                        }, (3, 1), []), 
+                Text(u'\r\n\r\nlike the name says.\r\n\r\n', (4, 26)), 
+                ControlLine(u'for', u'for x in [1,2,3]:', False, (8, 1)), 
+                Text(u'        ', (9, 1)), 
+                Expression(u'x', [], (9, 9)), 
+                ControlLine(u'for', u'endfor', True, (10, 1)), 
+                Text(u'\r\n', (11, 1)), 
+                Expression(u"trumpeter == 'Miles' and "
+                                "trumpeter or \\\n      'Dizzy'", 
+                                [], (12, 1)), 
+                Text(u'\r\n\r\n', (13, 15)), 
+                DefTag(u'def', {u'name': u'hi()'}, (15, 1), [
+                    Text(u'\r\n    hi!\r\n', (15, 19))]), 
+                    Text(u'\r\n\r\n</html>\r\n', (17, 8))
+                ])
+        )
+        assert flatten_result(Template(template).render()) \
+            == """<html> like the name says. 1 2 3 Dizzy </html>"""
+
+    def test_comments(self):
+        template = \
+            """
+<style>
+ #someselector
+ # other non comment stuff
+</style>
+## a comment
+
+# also not a comment
+
+   ## this is a comment
+   
+this is ## not a comment
+
+<%doc> multiline
+comment
+</%doc>
+
+hi
+"""
+        nodes = Lexer(template).parse()
+        self._compare(nodes, TemplateNode({},
+                      [Text(u'''\n<style>\n #someselector\n # '''
+                        '''other non comment stuff\n</style>\n''',
+                      (1, 1)), Comment(u'a comment', (6, 1)),
+                      Text(u'''\n# also not a comment\n\n''', (7, 1)),
+                      Comment(u'this is a comment', (10, 1)),
+                      Text(u'''   \nthis is ## not a comment\n\n''', (11,
+                      1)), Comment(u''' multiline\ncomment\n''', (14,
+                      1)), Text(u'''
+
+hi
+''', (16, 8))]))
+
+    def test_docs(self):
+        template = \
+            """
+        <%doc>
+            this is a comment
+        </%doc>
+        <%def name="foo()">
+            <%doc>
+                this is the foo func
+            </%doc>
+        </%def>
+        """
+        nodes = Lexer(template).parse()
+        self._compare(nodes, 
+            TemplateNode({}, [Text(u'\n        ', (1,
+              1)),
+              Comment(u'''\n            this is a comment\n        ''',
+              (2, 9)), Text(u'\n        ', (4, 16)),
+              DefTag(u'def', {u'name': u'foo()'}, (5, 9),
+              [Text(u'\n            ', (5, 28)),
+              Comment(u'''\n                this is the foo func\n'''
+                '''            ''',
+              (6, 13)), Text(u'\n        ', (8, 20))]),
+              Text(u'\n        ', (9, 16))]))
+
+    def test_preprocess(self):
+
+        def preproc(text):
+            return re.sub(r'(?<=\n)\s*#[^#]', '##', text)
+
+        template = \
+            """
+    hi
+    # old style comment
+# another comment
+"""
+        nodes = Lexer(template, preprocessor=preproc).parse()
+        self._compare(nodes, TemplateNode({}, [Text(u'''\n    hi\n''',
+                      (1, 1)), Comment(u'old style comment', (3, 1)),
+                      Comment(u'another comment', (4, 1))]))
diff --git a/lib/Mako-0.7.3/test/test_lookup.py b/lib/Mako-0.7.3/test/test_lookup.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_lookup.py
@@ -0,0 +1,104 @@
+from mako.template import Template
+from mako import lookup, exceptions, runtime
+from mako.util import FastEncodingBuffer
+from util import flatten_result, result_lines
+import unittest
+import os
+
+from test import TemplateTest, template_base, module_base, assert_raises_message
+
+tl = lookup.TemplateLookup(directories=[template_base])
+class LookupTest(unittest.TestCase):
+    def test_basic(self):
+        t = tl.get_template('index.html')
+        assert result_lines(t.render()) == [
+            "this is index"
+        ]
+    def test_subdir(self):
+        t = tl.get_template('/subdir/index.html')
+        assert result_lines(t.render()) == [
+            "this is sub index",
+            "this is include 2"
+
+        ]
+
+        assert tl.get_template('/subdir/index.html').module_id \
+                            == '_subdir_index_html'
+ 
+    def test_updir(self):
+        t = tl.get_template('/subdir/foo/../bar/../index.html')
+        assert result_lines(t.render()) == [
+            "this is sub index",
+            "this is include 2"
+
+        ]
+ 
+    def test_directory_lookup(self):
+        """test that hitting an existent directory still raises
+        LookupError."""
+ 
+        self.assertRaises(exceptions.TopLevelLookupException,
+            tl.get_template, "/subdir"
+        )
+ 
+    def test_no_lookup(self):
+        t = Template("hi <%include file='foo.html'/>")
+        try:
+            t.render()
+            assert False
+        except exceptions.TemplateLookupException, e:
+            assert str(e) == \
+                "Template 'memory:%s' has no TemplateLookup associated" % \
+                hex(id(t))
+ 
+    def test_uri_adjust(self):
+        tl = lookup.TemplateLookup(directories=['/foo/bar'])
+        assert tl.filename_to_uri('/foo/bar/etc/lala/index.html') == \
+                        '/etc/lala/index.html'
+
+        tl = lookup.TemplateLookup(directories=['./foo/bar'])
+        assert tl.filename_to_uri('./foo/bar/etc/index.html') == \
+                        '/etc/index.html'
+ 
+    def test_uri_cache(self):
+        """test that the _uri_cache dictionary is available"""
+        tl._uri_cache[('foo', 'bar')] = '/some/path'
+        assert tl._uri_cache[('foo', 'bar')] == '/some/path'
+ 
+    def test_check_not_found(self):
+        tl = lookup.TemplateLookup()
+        tl.put_string("foo", "this is a template")
+        f = tl.get_template("foo")
+        assert f.uri in tl._collection
+        f.filename = "nonexistent"
+        self.assertRaises(exceptions.TemplateLookupException,
+            tl.get_template, "foo"
+        )
+        assert f.uri not in tl._collection
+
+    def test_dont_accept_relative_outside_of_root(self):
+        """test the mechanics of an include where 
+        the include goes outside of the path"""
+        tl = lookup.TemplateLookup(directories=[os.path.join(template_base, "subdir")])
+        index = tl.get_template("index.html")
+
+        ctx = runtime.Context(FastEncodingBuffer())
+        ctx._with_template=index
+
+        assert_raises_message(
+            exceptions.TemplateLookupException,
+           "Template uri \"../index.html\" is invalid - it "
+            "cannot be relative outside of the root path",
+            runtime._lookup_template, ctx, "../index.html", index.uri
+        )
+
+        assert_raises_message(
+            exceptions.TemplateLookupException,
+           "Template uri \"../othersubdir/foo.html\" is invalid - it "
+            "cannot be relative outside of the root path",
+            runtime._lookup_template, ctx, "../othersubdir/foo.html", index.uri
+        )
+
+        # this is OK since the .. cancels out
+        t = runtime._lookup_template(ctx, "foo/../index.html", index.uri)
+
diff --git a/lib/Mako-0.7.3/test/test_loop.py b/lib/Mako-0.7.3/test/test_loop.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_loop.py
@@ -0,0 +1,295 @@
+import re
+import unittest
+
+from mako.template import Template
+from mako.lookup import TemplateLookup
+from mako.codegen import (
+        _FOR_LOOP, mangle_mako_loop, LoopVariable
+    )
+from mako.runtime import LoopStack, LoopContext
+from mako import exceptions
+from test import assert_raises_message
+from test import TemplateTest, eq_
+from util import flatten_result, result_lines
+
+class TestLoop(unittest.TestCase):
+
+    def test__FOR_LOOP(self):
+        for statement, target_list, expression_list in (
+                ('for x in y:', 'x', 'y'),
+                ('for x, y in z:', 'x, y', 'z'),
+                ('for (x,y) in z:', '(x,y)', 'z'),
+                ('for ( x, y, z) in a:', '( x, y, z)', 'a'),
+                ('for x in [1, 2, 3]:', 'x', '[1, 2, 3]'),
+                ('for x in "spam":', 'x', '"spam"'),
+                ('for k,v in dict(a=1,b=2).items():', 'k,v',
+                    'dict(a=1,b=2).items()'),
+                ('for x in [y+1 for y in [1, 2, 3]]:', 'x',
+                    '[y+1 for y in [1, 2, 3]]')
+                ):
+            match = _FOR_LOOP.match(statement)
+            assert match and match.groups() == (target_list, expression_list)
+
+    def test_no_loop(self):
+        template = Template("""% for x in 'spam':
+${x}
+% endfor""")
+        code = template.code
+        assert not re.match(r"loop = __M_loop._enter\(:", code), "No need to "\
+                "generate a loop context if the loop variable wasn't accessed"
+        print template.render()
+
+    def test_loop_demo(self):
+        template = Template("""x|index|reverse_index|first|last|cycle|even|odd
+% for x in 'ham':
+${x}|${loop.index}|${loop.reverse_index}|${loop.first}|${loop.last}|${loop.cycle('even', 'odd')}|${loop.even}|${loop.odd}
+% endfor""")
+        expected = [
+                "x|index|reverse_index|first|last|cycle|even|odd",
+                "h|0|2|True|False|even|True|False",
+                "a|1|1|False|False|odd|False|True",
+                "m|2|0|False|True|even|True|False"
+            ]
+        code = template.code
+        assert "loop = __M_loop._enter(" in code, "Generated a loop context since "\
+                "the loop variable was accessed"
+        rendered = template.render()
+        print rendered
+        for line in expected:
+            assert line in rendered, "Loop variables give information about "\
+                    "the progress of the loop"
+
+    def test_nested_loops(self):
+        template = Template("""% for x in 'ab':
+${x} ${loop.index} <- start in outer loop
+% for y in [0, 1]:
+${y} ${loop.index} <- go to inner loop
+% endfor
+${x} ${loop.index} <- back to outer loop
+% endfor""")
+        code = template.code
+        rendered = template.render()
+        expected = [
+                "a 0 <- start in outer loop",
+                "0 0 <- go to inner loop",
+                "1 1 <- go to inner loop",
+                "a 0 <- back to outer loop",
+                "b 1 <- start in outer loop",
+                "0 0 <- go to inner loop",
+                "1 1 <- go to inner loop",
+                "b 1 <- back to outer loop",
+            ]
+        for line in expected:
+            assert line in rendered, "The LoopStack allows you to take "\
+                    "advantage of the loop variable even in embedded loops"
+
+    def test_parent_loops(self):
+        template = Template("""% for x in 'ab':
+${x} ${loop.index} <- outer loop
+% for y in [0, 1]:
+${y} ${loop.index} <- inner loop
+${x} ${loop.parent.index} <- parent loop
+% endfor
+${x} ${loop.index} <- outer loop
+% endfor""")
+        code = template.code
+        rendered = template.render()
+        expected = [
+                "a 0 <- outer loop",
+                "a 0 <- parent loop",
+                "b 1 <- outer loop",
+                "b 1 <- parent loop"
+            ]
+        for line in expected:
+            print code
+            assert line in rendered, "The parent attribute of a loop gives "\
+                    "you the previous loop context in the stack"
+
+    def test_out_of_context_access(self):
+        template = Template("""${loop.index}""")
+        assert_raises_message(
+            exceptions.RuntimeException,
+            "No loop context is established",
+            template.render
+        )
+
+class TestLoopStack(unittest.TestCase):
+
+    def setUp(self):
+        self.stack = LoopStack()
+        self.bottom = 'spam'
+        self.stack.stack = [self.bottom]
+
+    def test_enter(self):
+        iterable = 'ham'
+        s = self.stack._enter(iterable)
+        assert s is self.stack.stack[-1], "Calling the stack with an iterable returns "\
+                "the stack"
+        assert iterable == self.stack.stack[-1]._iterable, "and pushes the "\
+                "iterable on the top of the stack"
+
+    def test__top(self):
+        assert self.bottom == self.stack._top, "_top returns the last item "\
+                "on the stack"
+
+    def test__pop(self):
+        assert len(self.stack.stack) == 1
+        top = self.stack._pop()
+        assert top == self.bottom
+        assert len(self.stack.stack) == 0
+
+    def test__push(self):
+        assert len(self.stack.stack) == 1
+        iterable = 'ham'
+        self.stack._push(iterable)
+        assert len(self.stack.stack) == 2
+        assert iterable is self.stack._top._iterable
+
+    def test_exit(self):
+        iterable = 'ham'
+        self.stack._enter(iterable)
+        before = len(self.stack.stack)
+        self.stack._exit()
+        after = len(self.stack.stack)
+        assert before == (after + 1), "Exiting a context pops the stack"
+
+
+class TestLoopContext(unittest.TestCase):
+
+    def setUp(self):
+        self.iterable = [1, 2, 3]
+        self.ctx = LoopContext(self.iterable)
+
+    def test___len__(self):
+        assert len(self.iterable) == len(self.ctx), "The LoopContext is the "\
+                "same length as the iterable"
+
+    def test_index(self):
+        expected = tuple(range(len(self.iterable)))
+        actual = tuple(self.ctx.index for i in self.ctx)
+        assert expected == actual, "The index is consistent with the current "\
+                "iteration count"
+
+    def test_reverse_index(self):
+        length = len(self.iterable)
+        expected = tuple([length-i-1 for i in range(length)])
+        actual = tuple(self.ctx.reverse_index for i in self.ctx)
+        print expected, actual
+        assert expected == actual, "The reverse_index is the number of "\
+                "iterations until the end"
+
+    def test_first(self):
+        expected = (True, False, False)
+        actual = tuple(self.ctx.first for i in self.ctx)
+        assert expected == actual, "first is only true on the first iteration"
+
+    def test_last(self):
+        expected = (False, False, True)
+        actual = tuple(self.ctx.last for i in self.ctx)
+        assert expected == actual, "last is only true on the last iteration"
+
+    def test_even(self):
+        expected = (True, False, True)
+        actual = tuple(self.ctx.even for i in self.ctx)
+        assert expected == actual, "even is true on even iterations"
+
+    def test_odd(self):
+        expected = (False, True, False)
+        actual = tuple(self.ctx.odd for i in self.ctx)
+        assert expected == actual, "odd is true on odd iterations"
+
+    def test_cycle(self):
+        expected = ('a', 'b', 'a')
+        actual = tuple(self.ctx.cycle('a', 'b') for i in self.ctx)
+        assert expected == actual, "cycle endlessly cycles through the values"
+
+class TestLoopFlags(TemplateTest):
+    def test_loop_disabled_template(self):
+        self._do_memory_test(
+        """
+            the loop: ${loop}
+        """, 
+        "the loop: hi",
+        template_args=dict(loop='hi'),
+        filters=flatten_result,
+        enable_loop=False
+        )
+
+    def test_loop_disabled_lookup(self):
+        l = TemplateLookup(enable_loop=False)
+        l.put_string("x",
+        """
+            the loop: ${loop}
+        """
+        )
+
+        self._do_test(
+            l.get_template("x"),
+            "the loop: hi",
+            template_args=dict(loop='hi'),
+            filters=flatten_result,
+        )
+
+    def test_loop_disabled_override_template(self):
+        self._do_memory_test(
+        """
+            <%page enable_loop="True" />
+            % for i in (1, 2, 3):
+                ${i} ${loop.index}
+            % endfor
+        """, 
+        "1 0 2 1 3 2",
+        template_args=dict(loop='hi'),
+        filters=flatten_result,
+        enable_loop=False
+        )
+
+    def test_loop_disabled_override_lookup(self):
+        l = TemplateLookup(enable_loop=False)
+        l.put_string("x",
+        """
+            <%page enable_loop="True" />
+            % for i in (1, 2, 3):
+                ${i} ${loop.index}
+            % endfor
+        """
+        )
+
+        self._do_test(
+            l.get_template("x"),
+            "1 0 2 1 3 2",
+            template_args=dict(loop='hi'),
+            filters=flatten_result,
+        )
+
+    def test_loop_enabled_override_template(self):
+        self._do_memory_test(
+        """
+            <%page enable_loop="True" />
+            % for i in (1, 2, 3):
+                ${i} ${loop.index}
+            % endfor
+        """, 
+        "1 0 2 1 3 2",
+        template_args=dict(),
+        filters=flatten_result,
+        )
+
+    def test_loop_enabled_override_lookup(self):
+        l = TemplateLookup()
+        l.put_string("x",
+        """
+            <%page enable_loop="True" />
+            % for i in (1, 2, 3):
+                ${i} ${loop.index}
+            % endfor
+        """
+        )
+
+        self._do_test(
+            l.get_template("x"),
+            "1 0 2 1 3 2",
+            template_args=dict(),
+            filters=flatten_result,
+        )
+
diff --git a/lib/Mako-0.7.3/test/test_lru.py b/lib/Mako-0.7.3/test/test_lru.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_lru.py
@@ -0,0 +1,111 @@
+from mako.util import LRUCache
+import string, unittest, time, random
+
+import thread
+
+class item:
+    def __init__(self, id):
+        self.id = id
+
+    def __str__(self):
+        return "item id %d" % self.id
+
+class LRUTest(unittest.TestCase):
+
+
+    def testlru(self): 
+        l = LRUCache(10, threshold=.2)
+ 
+        for id in range(1,20):
+            l[id] = item(id)
+ 
+        # first couple of items should be gone
+        self.assert_(not l.has_key(1)) 
+        self.assert_(not l.has_key(2))
+ 
+        # next batch over the threshold of 10 should be present
+        for id in range(11,20):
+            self.assert_(l.has_key(id))
+
+        l[12]
+        l[15]
+        l[23] = item(23)
+        l[24] = item(24)
+        l[25] = item(25)
+        l[26] = item(26)
+        l[27] = item(27)
+
+        self.assert_(not l.has_key(11))
+        self.assert_(not l.has_key(13))
+ 
+        for id in (25, 24, 23, 14, 12, 19, 18, 17, 16, 15):
+            self.assert_(l.has_key(id)) 
+
+    def _disabled_test_threaded(self):
+        size = 100
+        threshold = .5
+        all_elems = 2000
+        hot_zone = range(30,40)
+        cache = LRUCache(size, threshold)
+ 
+        # element to store
+        class Element(object):
+            def __init__(self, id):
+                self.id = id
+                self.regets = 0
+ 
+        # return an element.  we will favor ids in the relatively small
+        # "hot zone" 25% of  the time.
+        def get_elem():
+            if random.randint(1,4) == 1:
+                return hot_zone[random.randint(0, len(hot_zone) - 1)]
+            else:
+                return random.randint(1, all_elems)
+ 
+        total = [0]
+        # request thread.
+        def request_elem():
+            while True:
+                total[0] += 1
+                id = get_elem()
+                try:
+                    elem = cache[id]
+                    elem.regets += 1
+                except KeyError:
+                    e = Element(id)
+                    cache[id] = e
+ 
+                time.sleep(random.random() / 1000)
+
+        for x in range(0,20):
+            thread.start_new_thread(request_elem, ())
+ 
+        # assert size doesn't grow unbounded, doesnt shrink well below size
+        for x in range(0,5):
+            time.sleep(1)
+            print "size:", len(cache)
+            assert len(cache) < size + size * threshold * 2
+            assert len(cache) > size - (size * .1)
+ 
+        # computs the average number of times a range of elements were "reused",
+        # i.e. without being removed from the cache.
+        def average_regets_in_range(start, end):
+            elem = [e for e in cache.values() if e.id >= start and e.id <= end]
+            if len(elem) == 0:
+                return 0
+            avg = sum([e.regets for e in elem]) / len(elem)
+            return avg
+
+        hotzone_avg = average_regets_in_range(30, 40)
+        control_avg = average_regets_in_range(450,760)
+        total_avg = average_regets_in_range(0, 2000)
+ 
+        # hotzone should be way above the others
+        print "total fetches", total[0], "hotzone", \
+                                hotzone_avg, "control", \
+                                control_avg, "total", total_avg
+ 
+        assert hotzone_avg > total_avg * 5 > control_avg * 5
+ 
+ 
+
diff --git a/lib/Mako-0.7.3/test/test_namespace.py b/lib/Mako-0.7.3/test/test_namespace.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_namespace.py
@@ -0,0 +1,792 @@
+from mako.template import Template
+from mako import lookup
+from util import flatten_result, result_lines
+from test import TemplateTest, eq_
+
+class NamespaceTest(TemplateTest):
+    def test_inline_crossreference(self):
+        self._do_memory_test(
+            """
+            <%namespace name="x">
+                <%def name="a()">
+                    this is x a
+                </%def>
+                <%def name="b()">
+                    this is x b, and heres ${a()}
+                </%def>
+            </%namespace>
+ 
+            ${x.a()}
+ 
+            ${x.b()}
+    """,
+            "this is x a this is x b, and heres this is x a",
+            filters=flatten_result
+        )
+
+    def test_inline_assignment(self):
+        self._do_memory_test(
+            """
+            <%namespace name="x">
+                <%def name="a()">
+                    <%
+                        x = 5
+                    %>
+                    this is x: ${x}
+                </%def>
+            </%namespace>
+
+            ${x.a()}
+
+    """,
+            "this is x: 5",
+            filters=flatten_result
+        )
+
+    def test_inline_arguments(self):
+        self._do_memory_test(
+            """
+            <%namespace name="x">
+                <%def name="a(x, y)">
+                    <%
+                        result = x * y
+                    %>
+                    result: ${result}
+                </%def>
+            </%namespace>
+
+            ${x.a(5, 10)}
+
+    """,
+            "result: 50",
+            filters=flatten_result
+        )
+
+    def test_inline_not_duped(self):
+        self._do_memory_test(
+            """
+            <%namespace name="x">
+                <%def name="a()">
+                    foo
+                </%def>
+            </%namespace>
+
+            <%
+                assert x.a is not UNDEFINED, "namespace x.a wasn't defined"
+                assert a is UNDEFINED, "name 'a' is in the body locals"
+            %>
+
+    """,
+            "",
+            filters=flatten_result
+        )
+
+    def test_dynamic(self):
+        collection = lookup.TemplateLookup()
+
+        collection.put_string('a', """
+        <%namespace name="b" file="${context['b_def']}"/>
+
+        a.  b: ${b.body()}
+""")
+
+        collection.put_string('b', """
+        b.
+""")
+
+        eq_(
+            flatten_result(collection.get_template('a').render(b_def='b')),
+            "a. b: b."
+        )
+ 
+    def test_template(self):
+        collection = lookup.TemplateLookup()
+
+        collection.put_string('main.html', """
+        <%namespace name="comp" file="defs.html"/>
+ 
+        this is main.  ${comp.def1("hi")}
+        ${comp.def2("there")}
+""")
+
+        collection.put_string('defs.html', """
+        <%def name="def1(s)">
+            def1: ${s}
+        </%def>
+ 
+        <%def name="def2(x)">
+            def2: ${x}
+        </%def>
+""")
+
+        assert flatten_result(collection.get_template('main.html').render()) == "this is main. def1: hi def2: there"
+ 
+    def test_module(self):
+        collection = lookup.TemplateLookup()
+
+        collection.put_string('main.html', """
+        <%namespace name="comp" module="test.sample_module_namespace"/>
+
+        this is main.  ${comp.foo1()}
+        ${comp.foo2("hi")}
+""")
+
+        assert flatten_result(collection.get_template('main.html').render()) == "this is main. this is foo1. this is foo2, x is hi"
+
+    def test_module_2(self):
+        collection = lookup.TemplateLookup()
+
+        collection.put_string('main.html', """
+        <%namespace name="comp" module="test.foo.test_ns"/>
+
+        this is main.  ${comp.foo1()}
+        ${comp.foo2("hi")}
+""")
+
+        assert flatten_result(collection.get_template('main.html').render()) == "this is main. this is foo1. this is foo2, x is hi"
+
+    def test_module_imports(self):
+        collection = lookup.TemplateLookup()
+
+        collection.put_string('main.html', """
+        <%namespace import="*" module="test.foo.test_ns"/>
+
+        this is main.  ${foo1()}
+        ${foo2("hi")}
+""")
+
+        assert flatten_result(collection.get_template('main.html').render()) == "this is main. this is foo1. this is foo2, x is hi"
+
+    def test_module_imports_2(self):
+        collection = lookup.TemplateLookup()
+
+        collection.put_string('main.html', """
+        <%namespace import="foo1, foo2" module="test.foo.test_ns"/>
+
+        this is main.  ${foo1()}
+        ${foo2("hi")}
+""")
+
+        assert flatten_result(collection.get_template('main.html').render()) == "this is main. this is foo1. this is foo2, x is hi"
+ 
+    def test_context(self):
+        """test that namespace callables get access to the current context"""
+        collection = lookup.TemplateLookup()
+
+        collection.put_string('main.html', """
+        <%namespace name="comp" file="defs.html"/>
+
+        this is main.  ${comp.def1()}
+        ${comp.def2("there")}
+""")
+
+        collection.put_string('defs.html', """
+        <%def name="def1()">
+            def1: x is ${x}
+        </%def>
+
+        <%def name="def2(x)">
+            def2: x is ${x}
+        </%def>
+""")
+
+        assert flatten_result(collection.get_template('main.html').render(x="context x")) == "this is main. def1: x is context x def2: x is there"
+ 
+    def test_overload(self):
+        collection = lookup.TemplateLookup()
+
+        collection.put_string('main.html', """
+        <%namespace name="comp" file="defs.html">
+            <%def name="def1(x, y)">
+                overridden def1 ${x}, ${y}
+            </%def>
+        </%namespace>
+
+        this is main.  ${comp.def1("hi", "there")}
+        ${comp.def2("there")}
+    """)
+
+        collection.put_string('defs.html', """
+        <%def name="def1(s)">
+            def1: ${s}
+        </%def>
+
+        <%def name="def2(x)">
+            def2: ${x}
+        </%def>
+    """)
+
+        assert flatten_result(collection.get_template('main.html').render()) == "this is main. overridden def1 hi, there def2: there"
+
+    def test_getattr(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("main.html", """
+            <%namespace name="foo" file="ns.html"/>
+            <%
+                 if hasattr(foo, 'lala'):
+                     foo.lala()
+                 if not hasattr(foo, 'hoho'):
+                     context.write('foo has no hoho.')
+            %>
+         """)
+        collection.put_string("ns.html", """
+          <%def name="lala()">this is lala.</%def>
+        """)
+        assert flatten_result(collection.get_template("main.html").render()) == "this is lala.foo has no hoho."
+
+    def test_in_def(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("main.html", """
+            <%namespace name="foo" file="ns.html"/>
+ 
+            this is main.  ${bar()}
+            <%def name="bar()">
+                this is bar, foo is ${foo.bar()}
+            </%def>
+        """)
+ 
+        collection.put_string("ns.html", """
+            <%def name="bar()">
+                this is ns.html->bar
+            </%def>
+        """)
+
+        assert result_lines(collection.get_template("main.html").render()) == [
+            "this is main.",
+            "this is bar, foo is" ,
+            "this is ns.html->bar"
+        ]
+
+
+    def test_in_remote_def(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("main.html", """
+            <%namespace name="foo" file="ns.html"/>
+
+            this is main.  ${bar()}
+            <%def name="bar()">
+                this is bar, foo is ${foo.bar()}
+            </%def>
+        """)
+
+        collection.put_string("ns.html", """
+            <%def name="bar()">
+                this is ns.html->bar
+            </%def>
+        """)
+ 
+        collection.put_string("index.html", """
+            <%namespace name="main" file="main.html"/>
+ 
+            this is index
+            ${main.bar()}
+        """)
+
+        assert result_lines(collection.get_template("index.html").render()) == [ 
+            "this is index",
+            "this is bar, foo is" ,
+            "this is ns.html->bar"
+        ]
+ 
+    def test_dont_pollute_self(self):
+        # test that get_namespace() doesn't modify the original context
+        # incompatibly
+ 
+        collection = lookup.TemplateLookup()
+        collection.put_string("base.html", """
+
+        <%def name="foo()">
+        <%
+            foo = local.get_namespace("foo.html")
+        %>
+        </%def>
+
+        name: ${self.name}
+        name via bar: ${bar()}
+
+        ${next.body()}
+
+        name: ${self.name}
+        name via bar: ${bar()}
+        <%def name="bar()">
+            ${self.name}
+        </%def>
+
+
+        """)
+
+        collection.put_string("page.html", """
+        <%inherit file="base.html"/>
+
+        ${self.foo()}
+
+        hello world
+
+        """)
+
+        collection.put_string("foo.html", """<%inherit file="base.html"/>""")
+        assert result_lines(collection.get_template("page.html").render()) == [
+            "name: self:page.html",
+            "name via bar:",
+            "self:page.html",
+            "hello world",
+            "name: self:page.html",
+            "name via bar:",
+            "self:page.html"
+        ]
+ 
+    def test_inheritance(self):
+        """test namespace initialization in a base inherited template that doesnt otherwise access the namespace"""
+        collection = lookup.TemplateLookup()
+        collection.put_string("base.html", """
+            <%namespace name="foo" file="ns.html" inheritable="True"/>
+ 
+            ${next.body()}
+""")
+        collection.put_string("ns.html", """
+            <%def name="bar()">
+                this is ns.html->bar
+            </%def>
+        """)
+
+        collection.put_string("index.html", """
+            <%inherit file="base.html"/>
+ 
+            this is index
+            ${self.foo.bar()}
+        """)
+ 
+        assert result_lines(collection.get_template("index.html").render()) == [
+            "this is index",
+            "this is ns.html->bar"
+        ]
+
+    def test_inheritance_two(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("base.html", """
+            <%def name="foo()">
+                base.foo
+            </%def>
+ 
+            <%def name="bat()">
+                base.bat
+            </%def>
+""")
+        collection.put_string("lib.html", """
+            <%inherit file="base.html"/>
+            <%def name="bar()">
+                lib.bar
+                ${parent.foo()}
+                ${self.foo()}
+                ${parent.bat()}
+                ${self.bat()}
+            </%def>
+ 
+            <%def name="foo()">
+                lib.foo
+            </%def>
+ 
+        """)
+
+        collection.put_string("front.html", """
+            <%namespace name="lib" file="lib.html"/>
+            ${lib.bar()}
+        """)
+
+        assert result_lines(collection.get_template("front.html").render()) == ['lib.bar', 'base.foo', 'lib.foo', 'base.bat', 'base.bat']
+
+    def test_attr(self):
+        l = lookup.TemplateLookup()
+
+        l.put_string("foo.html", """
+        <%!
+            foofoo = "foo foo"
+            onlyfoo = "only foo"
+        %>
+        <%inherit file="base.html"/>
+        <%def name="setup()">
+            <%
+            self.attr.foolala = "foo lala"
+            %>
+        </%def>
+        ${self.attr.basefoo}
+        ${self.attr.foofoo}
+        ${self.attr.onlyfoo}
+        ${self.attr.lala}
+        ${self.attr.foolala}
+        """)
+
+        l.put_string("base.html", """
+        <%!
+            basefoo = "base foo 1"
+            foofoo = "base foo 2"
+        %>
+        <%
+            self.attr.lala = "base lala"
+        %>
+ 
+        ${self.attr.basefoo}
+        ${self.attr.foofoo}
+        ${self.attr.onlyfoo}
+        ${self.attr.lala}
+        ${self.setup()}
+        ${self.attr.foolala}
+        body
+        ${self.body()}
+        """)
+
+        assert result_lines(l.get_template("foo.html").render()) == [
+            "base foo 1",
+            "foo foo",
+            "only foo",
+            "base lala",
+            "foo lala",
+            "body",
+            "base foo 1",
+            "foo foo",
+            "only foo",
+            "base lala",
+            "foo lala",
+        ]
+ 
+    def test_attr_raise(self):
+        l = lookup.TemplateLookup()
+
+        l.put_string("foo.html", """
+            <%def name="foo()">
+            </%def>
+        """)
+
+        l.put_string("bar.html", """
+        <%namespace name="foo" file="foo.html"/>
+ 
+        ${foo.notfoo()}
+        """)
+
+        self.assertRaises(AttributeError, l.get_template("bar.html").render)
+ 
+    def test_custom_tag_1(self):
+        template = Template("""
+ 
+            <%def name="foo(x, y)">
+                foo: ${x} ${y}
+            </%def>
+ 
+            <%self:foo x="5" y="${7+8}"/>
+        """)
+        assert result_lines(template.render()) == ['foo: 5 15']
+
+    def test_custom_tag_2(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("base.html", """
+            <%def name="foo(x, y)">
+                foo: ${x} ${y}
+            </%def>
+ 
+            <%def name="bat(g)"><%
+                return "the bat! %s" % g
+            %></%def>
+ 
+            <%def name="bar(x)">
+                ${caller.body(z=x)}
+            </%def>
+        """)
+ 
+        collection.put_string("index.html", """
+            <%namespace name="myns" file="base.html"/>
+ 
+            <%myns:foo x="${'some x'}" y="some y"/>
+ 
+            <%myns:bar x="${myns.bat(10)}" args="z">
+                record: ${z}
+            </%myns:bar>
+ 
+        """)
+ 
+        assert result_lines(collection.get_template("index.html").render()) == [
+            'foo: some x some y', 
+            'record: the bat! 10'
+        ]
+ 
+    def test_custom_tag_3(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("base.html", """
+            <%namespace name="foo" file="ns.html" inheritable="True"/>
+
+            ${next.body()}
+    """)
+        collection.put_string("ns.html", """
+            <%def name="bar()">
+                this is ns.html->bar
+                caller body: ${caller.body()}
+            </%def>
+        """)
+
+        collection.put_string("index.html", """
+            <%inherit file="base.html"/>
+
+            this is index
+            <%self.foo:bar>
+                call body
+            </%self.foo:bar>
+        """)
+ 
+        assert result_lines(collection.get_template("index.html").render()) == [
+            "this is index",
+            "this is ns.html->bar",
+            "caller body:",
+            "call body"
+        ]
+ 
+    def test_custom_tag_case_sensitive(self):
+        t = Template("""
+        <%def name="renderPanel()">
+            panel ${caller.body()}
+        </%def>
+
+        <%def name="renderTablePanel()">
+            <%self:renderPanel>
+                hi
+            </%self:renderPanel>
+        </%def>
+ 
+        <%self:renderTablePanel/>
+        """)
+        assert result_lines(t.render()) == ['panel', 'hi']
+ 
+ 
+    def test_expr_grouping(self):
+        """test that parenthesis are placed around string-embedded expressions."""
+ 
+        template = Template("""
+            <%def name="bar(x, y)">
+                ${x}
+                ${y}
+            </%def>
+ 
+            <%self:bar x=" ${foo} " y="x${g and '1' or '2'}y"/>
+        """, input_encoding='utf-8')
+
+        # the concat has to come out as "x + (g and '1' or '2') + y"
+        assert result_lines(template.render(foo='this is foo', g=False)) == [
+            "this is foo",
+            "x2y"
+        ]
+
+ 
+    def test_ccall(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("base.html", """
+            <%namespace name="foo" file="ns.html" inheritable="True"/>
+
+            ${next.body()}
+    """)
+        collection.put_string("ns.html", """
+            <%def name="bar()">
+                this is ns.html->bar
+                caller body: ${caller.body()}
+            </%def>
+        """)
+
+        collection.put_string("index.html", """
+            <%inherit file="base.html"/>
+
+            this is index
+            <%call expr="self.foo.bar()">
+                call body
+            </%call>
+        """)
+
+        assert result_lines(collection.get_template("index.html").render()) == [
+            "this is index",
+            "this is ns.html->bar",
+            "caller body:",
+            "call body"
+        ]
+
+    def test_ccall_2(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("base.html", """
+            <%namespace name="foo" file="ns1.html" inheritable="True"/>
+
+            ${next.body()}
+    """)
+        collection.put_string("ns1.html", """
+            <%namespace name="foo2" file="ns2.html"/>
+            <%def name="bar()">
+                <%call expr="foo2.ns2_bar()">
+                this is ns1.html->bar
+                caller body: ${caller.body()}
+                </%call>
+            </%def>
+        """)
+
+        collection.put_string("ns2.html", """
+            <%def name="ns2_bar()">
+                this is ns2.html->bar
+                caller body: ${caller.body()}
+            </%def>
+        """)
+
+        collection.put_string("index.html", """
+            <%inherit file="base.html"/>
+
+            this is index
+            <%call expr="self.foo.bar()">
+                call body
+            </%call>
+        """)
+
+        assert result_lines(collection.get_template("index.html").render()) == [
+            "this is index",
+            "this is ns2.html->bar",
+            "caller body:",
+            "this is ns1.html->bar",
+            "caller body:",
+            "call body"
+        ]
+
+    def test_import(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("functions.html","""
+            <%def name="foo()">
+                this is foo
+            </%def>
+ 
+            <%def name="bar()">
+                this is bar
+            </%def>
+ 
+            <%def name="lala()">
+                this is lala
+            </%def>
+        """)
+
+        collection.put_string("func2.html", """
+            <%def name="a()">
+                this is a
+            </%def>
+            <%def name="b()">
+                this is b
+            </%def>
+        """)
+        collection.put_string("index.html", """
+            <%namespace file="functions.html" import="*"/>
+            <%namespace file="func2.html" import="a, b"/>
+            ${foo()}
+            ${bar()}
+            ${lala()}
+            ${a()}
+            ${b()}
+            ${x}
+        """)
+
+        assert result_lines(collection.get_template("index.html").render(bar="this is bar", x="this is x")) == [
+            "this is foo",
+            "this is bar",
+            "this is lala",
+            "this is a",
+            "this is b",
+            "this is x"
+        ]
+ 
+    def test_import_calledfromdef(self):
+        l = lookup.TemplateLookup()
+        l.put_string("a", """
+        <%def name="table()">
+            im table
+        </%def>
+        """)
+
+        l.put_string("b","""
+        <%namespace file="a" import="table"/>
+
+        <%
+            def table2():
+                table()
+                return ""
+        %>
+
+        ${table2()}
+        """)
+
+        t = l.get_template("b")
+        assert flatten_result(t.render()) == "im table"
+ 
+    def test_closure_import(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("functions.html","""
+            <%def name="foo()">
+                this is foo
+            </%def>
+ 
+            <%def name="bar()">
+                this is bar
+            </%def>
+        """)
+ 
+        collection.put_string("index.html", """
+            <%namespace file="functions.html" import="*"/>
+            <%def name="cl1()">
+                ${foo()}
+            </%def>
+ 
+            <%def name="cl2()">
+                ${bar()}
+            </%def>
+ 
+            ${cl1()}
+            ${cl2()}
+        """)
+        assert result_lines(collection.get_template("index.html").render(bar="this is bar", x="this is x")) == [
+            "this is foo",
+            "this is bar",
+        ]
+
+    def test_import_local(self):
+        t = Template("""
+            <%namespace import="*">
+                <%def name="foo()">
+                    this is foo
+                </%def>
+            </%namespace>
+ 
+            ${foo()}
+ 
+        """)
+        assert flatten_result(t.render()) == "this is foo"
+ 
+    def test_ccall_import(self):
+        collection = lookup.TemplateLookup()
+        collection.put_string("functions.html","""
+            <%def name="foo()">
+                this is foo
+            </%def>
+ 
+            <%def name="bar()">
+                this is bar.
+                ${caller.body()}
+                ${caller.lala()}
+            </%def>
+        """)
+ 
+        collection.put_string("index.html", """
+            <%namespace name="func" file="functions.html" import="*"/>
+            <%call expr="bar()">
+                this is index embedded
+                foo is ${foo()}
+                <%def name="lala()">
+                     this is lala ${foo()}
+                </%def>
+            </%call>
+        """)
+        #print collection.get_template("index.html").code
+        #print collection.get_template("functions.html").code
+        assert result_lines(collection.get_template("index.html").render()) == [
+            "this is bar.",
+            "this is index embedded",
+            "foo is",
+            "this is foo",
+            "this is lala",
+            "this is foo"
+        ]
diff --git a/lib/Mako-0.7.3/test/test_pygen.py b/lib/Mako-0.7.3/test/test_pygen.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_pygen.py
@@ -0,0 +1,252 @@
+import unittest
+
+from mako.pygen import PythonPrinter, adjust_whitespace
+from StringIO import StringIO
+
+class GeneratePythonTest(unittest.TestCase):
+    def test_generate_normal(self):
+        stream = StringIO()
+        printer = PythonPrinter(stream)
+        printer.writeline("import lala")
+        printer.writeline("for x in foo:")
+        printer.writeline("print x")
+        printer.writeline(None)
+        printer.writeline("print y")
+        assert stream.getvalue() == \
+"""import lala
+for x in foo:
+    print x
+print y
+"""
+    def test_generate_adjusted(self):
+        block = """
+        x = 5 +6
+        if x > 7:
+            for y in range(1,5):
+                print "<td>%s</td>" % y
+"""
+        stream = StringIO()
+        printer = PythonPrinter(stream)
+        printer.write_indented_block(block)
+        printer.close()
+        #print stream.getvalue()
+        assert stream.getvalue() == \
+"""
+x = 5 +6
+if x > 7:
+    for y in range(1,5):
+        print "<td>%s</td>" % y
+
+"""
+    def test_generate_combo(self):
+        block = \
+"""
+                x = 5 +6
+                if x > 7:
+                    for y in range(1,5):
+                        print "<td>%s</td>" % y
+                    print "hi"
+                print "there"
+                foo(lala)
+        """
+        stream = StringIO()
+        printer = PythonPrinter(stream)
+        printer.writeline("import lala")
+        printer.writeline("for x in foo:")
+        printer.writeline("print x")
+        printer.write_indented_block(block)
+        printer.writeline(None)
+        printer.writeline("print y")
+        printer.close()
+        #print "->" + stream.getvalue().replace(' ', '#') + "<-"
+        assert stream.getvalue() == \
+"""import lala
+for x in foo:
+    print x
+
+    x = 5 +6
+    if x > 7:
+        for y in range(1,5):
+            print "<td>%s</td>" % y
+        print "hi"
+    print "there"
+    foo(lala)
+        
+print y
+"""
+    def test_multi_line(self):
+        block = \
+"""
+    if test:
+        print ''' this is a block of stuff.
+this is more stuff in the block.
+and more block.
+'''
+        do_more_stuff(g)
+"""
+        stream = StringIO()
+        printer = PythonPrinter(stream)
+        printer.write_indented_block(block)
+        printer.close()
+        #print stream.getvalue()
+        assert stream.getvalue() == \
+"""
+if test:
+    print ''' this is a block of stuff.
+this is more stuff in the block.
+and more block.
+'''
+    do_more_stuff(g)
+
+"""
+    
+    def test_false_unindentor(self):
+        stream = StringIO()
+        printer = PythonPrinter(stream)
+        for line in [
+            "try:",
+            "elsemyvar = 12",
+            "if True:",
+            "print 'hi'",
+            None,
+            "finally:",
+            "dosomething",
+            None
+        ]:
+            printer.writeline(line)
+        
+        assert stream.getvalue() == \
+"""try:
+    elsemyvar = 12
+    if True:
+        print 'hi'
+finally:
+    dosomething
+"""    , stream.getvalue()
+        
+        
+    def test_backslash_line(self):
+        block = \
+"""
+            # comment
+    if test:
+        if (lala + hoho) + \\
+(foobar + blat) == 5:
+            print "hi"
+    print "more indent"
+"""
+        stream = StringIO()
+        printer = PythonPrinter(stream)
+        printer.write_indented_block(block)
+        printer.close()
+        assert stream.getvalue() == \
+"""
+            # comment
+if test:
+    if (lala + hoho) + \\
+(foobar + blat) == 5:
+        print "hi"
+print "more indent"
+
+"""
+
+class WhitespaceTest(unittest.TestCase):
+    def test_basic(self):
+        text = """
+        for x in range(0,15):
+            print x
+        print "hi"
+        """
+        assert adjust_whitespace(text) == \
+"""
+for x in range(0,15):
+    print x
+print "hi"
+"""
+
+    def test_blank_lines(self):
+        text = """
+    print "hi"  # a comment
+    
+    # more comments
+    
+    print g
+"""
+        assert adjust_whitespace(text) == \
+"""
+print "hi"  # a comment
+
+# more comments
+
+print g
+"""
+
+    def test_open_quotes_with_pound(self):
+        text = '''
+        print """  this is text
+          # and this is text
+        # and this is too """
+'''
+        assert adjust_whitespace(text) == \
+'''
+print """  this is text
+          # and this is text
+        # and this is too """
+'''
+
+    def test_quote_with_comments(self):
+        text= """
+            print 'hi'
+            # this is a comment
+            # another comment
+            x = 7 # someone's '''comment
+            print '''
+        there
+        '''
+            # someone else's comment
+"""
+
+        assert adjust_whitespace(text) == \
+"""
+print 'hi'
+# this is a comment
+# another comment
+x = 7 # someone's '''comment
+print '''
+        there
+        '''
+# someone else's comment
+"""
+
+
+    def test_quotes_with_pound(self):
+        text = '''
+        if True:
+            """#"""
+        elif False:
+            "bar"
+'''
+        assert adjust_whitespace(text) == \
+'''
+if True:
+    """#"""
+elif False:
+    "bar"
+'''
+
+    def test_quotes(self):
+        text = """
+        print ''' aslkjfnas kjdfn
+askdjfnaskfd fkasnf dknf sadkfjn asdkfjna sdakjn
+asdkfjnads kfajns '''
+        if x:
+            print y
+"""
+        assert adjust_whitespace(text) == \
+"""
+print ''' aslkjfnas kjdfn
+askdjfnaskfd fkasnf dknf sadkfjn asdkfjna sdakjn
+asdkfjnads kfajns '''
+if x:
+    print y
+"""
diff --git a/lib/Mako-0.7.3/test/test_template.py b/lib/Mako-0.7.3/test/test_template.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_template.py
@@ -0,0 +1,1242 @@
+# -*- coding: utf-8 -*-
+
+from mako.template import Template, ModuleTemplate
+from mako.lookup import TemplateLookup
+from mako.ext.preprocessors import convert_comments
+from mako import exceptions, util, runtime
+import re
+import os
+from util import flatten_result, result_lines
+import codecs
+from test import TemplateTest, eq_, template_base, module_base, \
+    requires_python_26_or_greater, assert_raises, assert_raises_message, \
+    requires_python_2
+
+class EncodingTest(TemplateTest):
+    def test_escapes_html_tags(self):
+        from mako.exceptions import html_error_template
+
+        x = Template("""
+        X:
+        <% raise Exception('<span style="color:red">Foobar</span>') %>
+        """)
+
+        try:
+            x.render()
+        except:
+            # <h3>Exception: <span style="color:red">Foobar</span></h3>
+            markup = html_error_template().render(full=False, css=False)
+            if util.py3k:
+                assert '<span style="color:red">Foobar</span></h3>'\
+                            .encode('ascii') not in markup
+                assert '<span style="color:red"'\
+                            '>Foobar</span>'\
+                            .encode('ascii') in markup
+            else:
+                assert '<span style="color:red">Foobar</span></h3>' \
+                            not in markup
+                assert '<span style="color:red"'\
+                            '>Foobar</span>' in markup
+
+    def test_unicode(self):
+        self._do_memory_test(
+            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
+            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
+        )
+
+    def test_encoding_doesnt_conflict(self):
+        self._do_memory_test(
+            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
+            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
+            output_encoding='utf-8'
+        )
+
+    def test_unicode_arg(self):
+        val = u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
+        self._do_memory_test(
+            "${val}",
+            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
+            template_args={'val':val}
+        )
+
+    def test_unicode_file(self):
+        self._do_file_test(
+            "unicode.html",
+            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
+        )
+
+    def test_unicode_file_code(self):
+        self._do_file_test(
+            'unicode_code.html',
+            u"""hi, drôle de petite voix m’a réveillé.""",
+            filters=flatten_result
+        )
+
+    def test_unicode_file_lookup(self):
+        lookup = TemplateLookup(
+                    directories=[template_base],
+                    output_encoding='utf-8',
+                    default_filters=['decode.utf8'])
+        if util.py3k:
+            template = lookup.get_template('/chs_unicode_py3k.html')
+        else:
+            template = lookup.get_template('/chs_unicode.html')
+        eq_(
+            flatten_result(template.render_unicode(name='毛泽东')),
+            u'毛泽东 是 新中国的主席<br/> Welcome 你 to 北京.'
+        )
+
+    def test_unicode_bom(self):
+        self._do_file_test(
+            'bom.html',
+            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
+        )
+
+        self._do_file_test(
+            'bommagic.html',
+            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
+        )
+
+        self.assertRaises(
+            exceptions.CompileException,
+            Template, filename=self._file_path('badbom.html'),
+            module_directory=module_base
+        )
+
+    def test_unicode_memory(self):
+        val = u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
+        self._do_memory_test(
+            ("## -*- coding: utf-8 -*-\n" + val).encode('utf-8'),
+            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
+        )
+
+    def test_unicode_text(self):
+        val = u"""<%text>Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »</%text>"""
+        self._do_memory_test(
+            ("## -*- coding: utf-8 -*-\n" + val).encode('utf-8'),
+            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
+        )
+
+    def test_unicode_text_ccall(self):
+        val = u"""
+        <%def name="foo()">
+            ${capture(caller.body)}
+        </%def>
+        <%call expr="foo()">
+        <%text>Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »</%text>
+        </%call>"""
+        self._do_memory_test(
+            ("## -*- coding: utf-8 -*-\n" + val).encode('utf-8'),
+            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
+            filters=flatten_result
+        )
+
+    def test_unicode_literal_in_expr(self):
+        if util.py3k:
+            self._do_memory_test(
+                u"""## -*- coding: utf-8 -*-
+                ${"Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"}
+                """.encode('utf-8'),
+                u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
+                filters = lambda s:s.strip()
+            )
+        else:
+            self._do_memory_test(
+                u"""## -*- coding: utf-8 -*-
+                ${u"Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"}
+                """.encode('utf-8'),
+                u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
+                filters = lambda s:s.strip()
+            )
+
+    def test_unicode_literal_in_expr_file(self):
+        self._do_file_test(
+            'unicode_expr.html',
+            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
+            lambda t:t.strip()
+        )
+
+    def test_unicode_literal_in_code(self):
+        if util.py3k:
+            self._do_memory_test(
+                u"""## -*- coding: utf-8 -*-
+                <%
+                    context.write("Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »")
+                %>
+                """.encode('utf-8'),
+                u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
+                filters=lambda s:s.strip()
+            )
+        else:
+            self._do_memory_test(
+                u"""## -*- coding: utf-8 -*-
+                <%
+                    context.write(u"Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »")
+                %>
+                """.encode('utf-8'),
+                u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
+                filters=lambda s:s.strip()
+            )
+
+    def test_unicode_literal_in_controlline(self):
+        if util.py3k:
+            self._do_memory_test(
+                u"""## -*- coding: utf-8 -*-
+                <%
+                    x = "drôle de petite voix m’a réveillé."
+                %>
+                % if x=="drôle de petite voix m’a réveillé.":
+                    hi, ${x}
+                % endif
+                """.encode('utf-8'),
+                u"""hi, drôle de petite voix m’a réveillé.""",
+                filters=lambda s:s.strip(),
+            )
+        else:
+            self._do_memory_test(
+                u"""## -*- coding: utf-8 -*-
+                <%
+                    x = u"drôle de petite voix m’a réveillé."
+                %>
+                % if x==u"drôle de petite voix m’a réveillé.":
+                    hi, ${x}
+                % endif
+                """.encode('utf-8'),
+                u"""hi, drôle de petite voix m’a réveillé.""",
+                filters=lambda s:s.strip(),
+            )
+
+    def test_unicode_literal_in_tag(self):
+        self._do_file_test(
+            "unicode_arguments.html",
+            [
+                u'x is: drôle de petite voix m’a réveillé',
+                u'x is: drôle de petite voix m’a réveillé',
+                u'x is: drôle de petite voix m’a réveillé',
+                u'x is: drôle de petite voix m’a réveillé',
+            ],
+            filters=result_lines
+        )
+
+        self._do_memory_test(
+            open(self._file_path("unicode_arguments.html"), 'rb').read(),
+            [
+                u'x is: drôle de petite voix m’a réveillé',
+                u'x is: drôle de petite voix m’a réveillé',
+                u'x is: drôle de petite voix m’a réveillé',
+                u'x is: drôle de petite voix m’a réveillé',
+            ],
+            filters=result_lines
+        )
+
+    def test_unicode_literal_in_def(self):
+        if util.py3k:
+            self._do_memory_test(
+                u"""## -*- coding: utf-8 -*-
+                <%def name="bello(foo, bar)">
+                Foo: ${ foo }
+                Bar: ${ bar }
+                </%def>
+                <%call expr="bello(foo='árvíztűrő tükörfúrógép', bar='ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP')">
+                </%call>""".encode('utf-8'),
+                u"""Foo: árvíztűrő tükörfúrógép Bar: ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP""",
+                filters=flatten_result
+            )
+
+            self._do_memory_test(
+                u"""## -*- coding: utf-8 -*-
+                <%def name="hello(foo='árvíztűrő tükörfúrógép', bar='ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP')">
+                Foo: ${ foo }
+                Bar: ${ bar }
+                </%def>
+                ${ hello() }""".encode('utf-8'),
+                u"""Foo: árvíztűrő tükörfúrógép Bar: ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP""",
+                filters=flatten_result
+            )
+        else:
+            self._do_memory_test(
+                u"""## -*- coding: utf-8 -*-
+                <%def name="bello(foo, bar)">
+                Foo: ${ foo }
+                Bar: ${ bar }
+                </%def>
+                <%call expr="bello(foo=u'árvíztűrő tükörfúrógép', bar=u'ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP')">
+                </%call>""".encode('utf-8'),
+                u"""Foo: árvíztűrő tükörfúrógép Bar: ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP""",
+                filters=flatten_result
+            )
+
+            self._do_memory_test(
+                u"""## -*- coding: utf-8 -*-
+                <%def name="hello(foo=u'árvíztűrő tükörfúrógép', bar=u'ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP')">
+                Foo: ${ foo }
+                Bar: ${ bar }
+                </%def>
+                ${ hello() }""".encode('utf-8'),
+                u"""Foo: árvíztűrő tükörfúrógép Bar: ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP""",
+                filters=flatten_result
+            )
+
+    def test_input_encoding(self):
+        """test the 'input_encoding' flag on Template, and that unicode
+            objects arent double-decoded"""
+
+        if util.py3k:
+            self._do_memory_test(
+                u"hello ${f('śląsk')}",
+                u"hello śląsk",
+                input_encoding='utf-8',
+                template_args={'f':lambda x:x}
+            )
+
+            self._do_memory_test(
+                u"## -*- coding: utf-8 -*-\nhello ${f('śląsk')}",
+                u"hello śląsk",
+                template_args={'f':lambda x:x}
+            )
+        else:
+            self._do_memory_test(
+                u"hello ${f(u'śląsk')}",
+                u"hello śląsk",
+                input_encoding='utf-8',
+                template_args={'f':lambda x:x}
+            )
+
+            self._do_memory_test(
+                u"## -*- coding: utf-8 -*-\nhello ${f(u'śląsk')}",
+                u"hello śląsk",
+                template_args={'f':lambda x:x}
+            )
+
+    def test_raw_strings(self):
+        """test that raw strings go straight thru with default_filters turned off,
+        bytestring_passthrough enabled.
+
+        """
+
+        self._do_memory_test(
+            u"## -*- coding: utf-8 -*-\nhello ${x}",
+            "hello śląsk",
+            default_filters=[],
+            template_args={'x':'śląsk'},
+            unicode_=False,
+            bytestring_passthrough=True,
+            output_encoding=None #'ascii'
+        )
+
+        # now, the way you *should* be doing it....
+        self._do_memory_test(
+            u"## -*- coding: utf-8 -*-\nhello ${x}",
+            u"hello śląsk",
+            template_args={'x':u'śląsk'}
+        )
+
+    def test_encoding(self):
+        self._do_memory_test(
+            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
+            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""".encode('utf-8'),
+            output_encoding='utf-8',
+            unicode_=False
+        )
+
+    def test_encoding_errors(self):
+        self._do_memory_test(
+            u"""KGB (transliteration of "КГБ") is the Russian-language abbreviation for Committee for State Security, (Russian: Комит́ет Госуд́арственной Безоп́асности (help·info); Komitet Gosudarstvennoy Bezopasnosti)""",
+            u"""KGB (transliteration of "КГБ") is the Russian-language abbreviation for Committee for State Security, (Russian: Комит́ет Госуд́арственной Безоп́асности (help·info); Komitet Gosudarstvennoy Bezopasnosti)""".encode('iso-8859-1', 'replace'),
+            output_encoding='iso-8859-1', encoding_errors='replace',
+            unicode_=False
+        )
+
+    def test_read_unicode(self):
+        lookup = TemplateLookup(directories=[template_base],
+                                filesystem_checks=True, output_encoding='utf-8')
+        if util.py3k:
+            template = lookup.get_template('/read_unicode_py3k.html')
+        else:
+            template = lookup.get_template('/read_unicode.html')
+        # TODO: I've no idea what encoding this file is, Python 3.1.2
+        # won't read the file even with open(...encoding='utf-8') unless
+        # errors is specified.   or if there's some quirk in 3.1.2
+        # since I'm pretty sure this test worked with py3k when I wrote it.
+        data = template.render(path=self._file_path('internationalization.html'))
+
+    @requires_python_2
+    def test_bytestring_passthru(self):
+        self._do_file_test(
+            'chs_utf8.html',
+            '毛泽东 是 新中国的主席<br/> Welcome 你 to 北京. Welcome 你 to 北京.',
+            default_filters=[],
+            disable_unicode=True,
+            output_encoding=None,
+            template_args={'name':'毛泽东'},
+            filters=flatten_result,
+            unicode_=False
+        )
+
+        self._do_file_test(
+            'chs_utf8.html',
+            '毛泽东 是 新中国的主席<br/> Welcome 你 to 北京. Welcome 你 to 北京.',
+            disable_unicode=True,
+            output_encoding=None,
+            template_args={'name':'毛泽东'},
+            filters=flatten_result,
+            unicode_=False
+        )
+
+        template = self._file_template('chs_utf8.html',
+                    output_encoding=None,
+                    disable_unicode=True)
+        self.assertRaises(UnicodeDecodeError, template.render_unicode, name='毛泽东')
+
+        template = Template(
+            "${'Alors vous imaginez ma surprise, au lever"
+            " du jour, quand une drôle de petite voix m’a "
+            "réveillé. Elle disait: « S’il vous plaît… "
+            "dessine-moi un mouton! »'}",
+            output_encoding=None,
+            disable_unicode=True, input_encoding='utf-8')
+        assert template.render() == "Alors vous imaginez ma surprise, "\
+                "au lever du jour, quand une drôle de petite "\
+                "voix m’a réveillé. Elle disait: « S’il vous "\
+                "plaît… dessine-moi un mouton! »"
+        template = Template(
+                "${'Alors vous imaginez ma surprise, au "
+                "lever du jour, quand une drôle de petite "
+                "voix m’a réveillé. Elle disait: « S’il "
+                "vous plaît… dessine-moi un mouton! »'}",
+                input_encoding='utf8', output_encoding='utf8',
+                disable_unicode=False, default_filters=[])
+        # raises because expression contains an encoded bytestring which cannot be decoded
+        self.assertRaises(UnicodeDecodeError, template.render)
+
+
+class PageArgsTest(TemplateTest):
+    def test_basic(self):
+        template = Template("""
+            <%page args="x, y, z=7"/>
+
+            this is page, ${x}, ${y}, ${z}
+""")
+
+        assert flatten_result(template.render(x=5, y=10)) == "this is page, 5, 10, 7"
+        assert flatten_result(template.render(x=5, y=10, z=32)) == "this is page, 5, 10, 32"
+        try:
+            template.render(y=10)
+            assert False
+        except TypeError, e:
+            assert True
+
+    def test_inherits(self):
+        lookup = TemplateLookup()
+        lookup.put_string("base.tmpl",
+        """
+        <%page args="bar" />
+        ${bar}
+        ${pageargs['foo']}
+        ${self.body(**pageargs)}
+        """
+        )
+        lookup.put_string("index.tmpl", """
+        <%inherit file="base.tmpl" />
+        <%page args="variable" />
+        ${variable}
+        """)
+
+        self._do_test(
+            lookup.get_template("index.tmpl"),
+            "bar foo var",
+            filters=flatten_result,
+            template_args={'variable':'var', 'bar':'bar', 'foo':'foo'}
+
+        )
+
+    def test_includes(self):
+        lookup = TemplateLookup()
+        lookup.put_string("incl1.tmpl",
+        """
+        <%page args="bar" />
+        ${bar}
+        ${pageargs['foo']}
+        """
+        )
+        lookup.put_string("incl2.tmpl",
+        """
+        ${pageargs}
+        """
+        )
+        lookup.put_string("index.tmpl", """
+        <%include file="incl1.tmpl" args="**pageargs"/>
+        <%page args="variable" />
+        ${variable}
+        <%include file="incl2.tmpl" />
+        """)
+
+        self._do_test(
+            lookup.get_template("index.tmpl"),
+            "bar foo var {}",
+            filters=flatten_result,
+            template_args={'variable':'var', 'bar':'bar', 'foo':'foo'}
+
+        )
+
+    def test_context_small(self):
+        ctx = runtime.Context([].append, x=5, y=4)
+        eq_(sorted(ctx.keys()), ['caller', 'capture', 'x', 'y'])
+
+    def test_with_context(self):
+        template = Template("""
+            <%page args="x, y, z=7"/>
+
+            this is page, ${x}, ${y}, ${z}, ${w}
+""")
+        #print template.code
+        assert flatten_result(template.render(x=5, y=10, w=17)) == "this is page, 5, 10, 7, 17"
+
+    def test_overrides_builtins(self):
+        template = Template("""
+            <%page args="id"/>
+
+            this is page, id is ${id}
+        """)
+
+        assert flatten_result(template.render(id="im the id")) == "this is page, id is im the id"
+
+    def test_canuse_builtin_names(self):
+        template = Template("""
+            exception: ${Exception}
+            id: ${id}
+        """)
+        assert flatten_result(template.render(id='some id', Exception='some exception')) == "exception: some exception id: some id"
+
+    def test_builtin_names_dont_clobber_defaults_in_includes(self):
+        lookup = TemplateLookup()
+        lookup.put_string("test.mako",
+        """
+        <%include file="test1.mako"/>
+
+        """)
+
+        lookup.put_string("test1.mako", """
+        <%page args="id='foo'"/>
+
+        ${id}
+        """)
+
+        for template in ("test.mako", "test1.mako"):
+            assert flatten_result(lookup.get_template(template).render()) == "foo"
+            assert flatten_result(lookup.get_template(template).render(id=5)) == "5"
+            assert flatten_result(lookup.get_template(template).render(id=id)) == "<built-in function id>"
+
+    def test_dict_locals(self):
+        template = Template("""
+            <%
+                dict = "this is dict"
+                locals = "this is locals"
+            %>
+            dict: ${dict}
+            locals: ${locals}
+        """)
+        assert flatten_result(template.render()) == "dict: this is dict locals: this is locals"
+
+class IncludeTest(TemplateTest):
+    def test_basic(self):
+        lookup = TemplateLookup()
+        lookup.put_string("a", """
+            this is a
+            <%include file="b" args="a=3,b=4,c=5"/>
+        """)
+        lookup.put_string("b", """
+            <%page args="a,b,c"/>
+            this is b.  ${a}, ${b}, ${c}
+        """)
+        assert flatten_result(lookup.get_template("a").render()) == "this is a this is b. 3, 4, 5"
+
+    def test_localargs(self):
+        lookup = TemplateLookup()
+        lookup.put_string("a", """
+            this is a
+            <%include file="b" args="a=a,b=b,c=5"/>
+        """)
+        lookup.put_string("b", """
+            <%page args="a,b,c"/>
+            this is b.  ${a}, ${b}, ${c}
+        """)
+        assert flatten_result(lookup.get_template("a").render(a=7,b=8)) == "this is a this is b. 7, 8, 5"
+
+    def test_viakwargs(self):
+        lookup = TemplateLookup()
+        lookup.put_string("a", """
+            this is a
+            <%include file="b" args="c=5, **context.kwargs"/>
+        """)
+        lookup.put_string("b", """
+            <%page args="a,b,c"/>
+            this is b.  ${a}, ${b}, ${c}
+        """)
+        #print lookup.get_template("a").code
+        assert flatten_result(lookup.get_template("a").render(a=7,b=8)) == "this is a this is b. 7, 8, 5"
+
+    def test_include_withargs(self):
+        lookup = TemplateLookup()
+        lookup.put_string("a", """
+            this is a
+            <%include file="${i}" args="c=5, **context.kwargs"/>
+        """)
+        lookup.put_string("b", """
+            <%page args="a,b,c"/>
+            this is b.  ${a}, ${b}, ${c}
+        """)
+        assert flatten_result(lookup.get_template("a").render(a=7,b=8,i='b')) == "this is a this is b. 7, 8, 5"
+
+    def test_within_ccall(self):
+        lookup = TemplateLookup()
+        lookup.put_string("a", """this is a""")
+        lookup.put_string("b", """
+        <%def name="bar()">
+            bar: ${caller.body()}
+            <%include file="a"/>
+        </%def>
+        """)
+        lookup.put_string("c", """
+        <%namespace name="b" file="b"/>
+        <%b:bar>
+            calling bar
+        </%b:bar>
+        """)
+        assert flatten_result(lookup.get_template("c").render()) == "bar: calling bar this is a"
+
+class UndefinedVarsTest(TemplateTest):
+    def test_undefined(self):
+        t = Template("""
+            % if x is UNDEFINED:
+                undefined
+            % else:
+                x: ${x}
+            % endif
+        """)
+
+        assert result_lines(t.render(x=12)) == ["x: 12"]
+        assert result_lines(t.render(y=12)) == ["undefined"]
+
+    def test_strict(self):
+        t = Template("""
+            % if x is UNDEFINED:
+                undefined
+            % else:
+                x: ${x}
+            % endif
+        """, strict_undefined=True)
+
+        assert result_lines(t.render(x=12)) == ['x: 12']
+
+        assert_raises(
+            NameError,
+            t.render, y=12
+        )
+
+        l = TemplateLookup(strict_undefined=True)
+        l.put_string("a", "some template")
+        l.put_string("b", """
+            <%namespace name='a' file='a' import='*'/>
+            % if x is UNDEFINED:
+                undefined
+            % else:
+                x: ${x}
+            % endif
+        """)
+
+        assert result_lines(t.render(x=12)) == ['x: 12']
+
+        assert_raises(
+            NameError,
+            t.render, y=12
+        )
+
+    def test_expression_declared(self):
+        t = Template("""
+            ${",".join([t for t in ("a", "b", "c")])}
+        """, strict_undefined=True)
+
+        eq_(result_lines(t.render()), ['a,b,c'])
+
+        t = Template("""
+            <%self:foo value="${[(val, n) for val, n in [(1, 2)]]}"/>
+
+            <%def name="foo(value)">
+                ${value}
+            </%def>
+
+        """, strict_undefined=True)
+
+        eq_(result_lines(t.render()), ['[(1, 2)]'])
+
+        t = Template("""
+            <%call expr="foo(value=[(val, n) for val, n in [(1, 2)]])" />
+
+            <%def name="foo(value)">
+                ${value}
+            </%def>
+
+        """, strict_undefined=True)
+
+        eq_(result_lines(t.render()), ['[(1, 2)]'])
+
+        l = TemplateLookup(strict_undefined=True)
+        l.put_string("i", "hi, ${pageargs['y']}")
+        l.put_string("t", """
+            <%include file="i" args="y=[x for x in range(3)]" />
+        """)
+        eq_(
+            result_lines(l.get_template("t").render()), ['hi, [0, 1, 2]']
+        )
+
+        l.put_string('q', """
+            <%namespace name="i" file="${(str([x for x in range(3)][2]) + 'i')[-1]}" />
+            ${i.body(y='x')}
+        """)
+        eq_(
+            result_lines(l.get_template("q").render()), ['hi, x']
+        )
+
+        t = Template("""
+            <%
+                y = lambda q: str(q)
+            %>
+            ${y('hi')}
+        """, strict_undefined=True)
+        eq_(
+            result_lines(t.render()), ["hi"]
+        )
+
+    def test_list_comprehensions_plus_undeclared_nonstrict(self):
+        # traditional behavior.  variable inside a list comprehension
+        # is treated as an "undefined", so is pulled from the context.
+        t = Template("""
+            t is: ${t}
+
+            ${",".join([t for t in ("a", "b", "c")])}
+        """)
+
+        eq_(
+            result_lines(t.render(t="T")),
+            ['t is: T', 'a,b,c']
+        )
+
+    def test_traditional_assignment_plus_undeclared(self):
+        t = Template("""
+            t is: ${t}
+
+            <%
+                t = 12
+            %>
+        """)
+        assert_raises(
+            UnboundLocalError,
+            t.render, t="T"
+        )
+
+    def test_list_comprehensions_plus_undeclared_strict(self):
+        # with strict, a list comprehension now behaves
+        # like the undeclared case above.
+        t = Template("""
+            t is: ${t}
+
+            ${",".join([t for t in ("a", "b", "c")])}
+        """, strict_undefined=True)
+
+        eq_(
+            result_lines(t.render(t="T")),
+            ['t is: T', 'a,b,c']
+        )
+
+class ReservedNameTest(TemplateTest):
+    def test_names_on_context(self):
+        for name in ('context', 'loop', 'UNDEFINED'):
+            assert_raises_message(
+                exceptions.NameConflictError,
+                r"Reserved words passed to render\(\): %s" % name,
+                Template("x").render, **{name:'foo'}
+            )
+
+    def test_names_in_template(self):
+        for name in ('context', 'loop', 'UNDEFINED'):
+            assert_raises_message(
+                exceptions.NameConflictError,
+                r"Reserved words declared in template: %s" % name,
+                Template, "<%% %s = 5 %%>" % name
+            )
+
+    def test_exclude_loop_context(self):
+        self._do_memory_test(
+            "loop is ${loop}",
+            "loop is 5",
+            template_args=dict(loop=5),
+            enable_loop=False
+        )
+
+    def test_exclude_loop_template(self):
+        self._do_memory_test(
+            "<% loop = 12 %>loop is ${loop}",
+            "loop is 12",
+            enable_loop=False
+        )
+
+class ControlTest(TemplateTest):
+    def test_control(self):
+        t = Template("""
+    ## this is a template.
+    % for x in y:
+    %   if 'test' in x:
+        yes x has test
+    %   else:
+        no x does not have test
+    %endif
+    %endfor
+""")
+        assert result_lines(t.render(y=[{'test':'one'}, {'foo':'bar'}, {'foo':'bar', 'test':'two'}])) == [
+            "yes x has test",
+            "no x does not have test",
+            "yes x has test"
+        ]
+
+    def test_blank_control_1(self):
+        self._do_memory_test(
+            """
+            % if True:
+            % endif
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    def test_blank_control_2(self):
+        self._do_memory_test(
+            """
+            % if True:
+            % elif True:
+            % endif
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    def test_blank_control_3(self):
+        self._do_memory_test(
+            """
+            % if True:
+            % else:
+            % endif
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    def test_blank_control_4(self):
+        self._do_memory_test(
+            """
+            % if True:
+            % elif True:
+            % else:
+            % endif
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    def test_blank_control_5(self):
+        self._do_memory_test(
+            """
+            % for x in range(10):
+            % endfor
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    def test_blank_control_6(self):
+        self._do_memory_test(
+            """
+            % while False:
+            % endwhile
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    def test_blank_control_7(self):
+        self._do_memory_test(
+            """
+            % try:
+            % except:
+            % endtry
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    @requires_python_26_or_greater
+    def test_blank_control_8(self):
+        self._do_memory_test(
+            """
+            % with open('x', 'w') as fp:
+            % endwith
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    def test_commented_blank_control_1(self):
+        self._do_memory_test(
+            """
+            % if True:
+            ## comment
+            % endif
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    def test_commented_blank_control_2(self):
+        self._do_memory_test(
+            """
+            % if True:
+            ## comment
+            % elif True:
+            ## comment
+            % endif
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    def test_commented_blank_control_3(self):
+        self._do_memory_test(
+            """
+            % if True:
+            ## comment
+            % else:
+            ## comment
+            % endif
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    def test_commented_blank_control_4(self):
+        self._do_memory_test(
+            """
+            % if True:
+            ## comment
+            % elif True:
+            ## comment
+            % else:
+            ## comment
+            % endif
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    def test_commented_blank_control_5(self):
+        self._do_memory_test(
+            """
+            % for x in range(10):
+            ## comment
+            % endfor
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    def test_commented_blank_control_6(self):
+        self._do_memory_test(
+            """
+            % while False:
+            ## comment
+            % endwhile
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    def test_commented_blank_control_7(self):
+        self._do_memory_test(
+            """
+            % try:
+            ## comment
+            % except:
+            ## comment
+            % endtry
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    @requires_python_26_or_greater
+    def test_commented_blank_control_8(self):
+        self._do_memory_test(
+            """
+            % with open('x', 'w') as fp:
+            ## comment
+            % endwith
+            """,
+            "",
+            filters=lambda s:s.strip()
+        )
+
+    def test_multiline_control(self):
+        t = Template("""
+    % for x in \\
+        [y for y in [1,2,3]]:
+        ${x}
+    % endfor
+""")
+        #print t.code
+        assert flatten_result(t.render()) == "1 2 3"
+
+class GlobalsTest(TemplateTest):
+    def test_globals(self):
+        self._do_memory_test(
+            """
+                <%!
+                    y = "hi"
+                %>
+            y is ${y}
+            """,
+            "y is hi",
+            filters=lambda t:t.strip()
+        )
+
+class RichTracebackTest(TemplateTest):
+
+    def _do_test_traceback(self, utf8, memory, syntax):
+        if memory:
+            if syntax:
+                source = u'## coding: utf-8\n<% print "m’a réveillé. '\
+                        u'Elle disait: « S’il vous plaît… dessine-moi un mouton! » %>'
+            else:
+                source = u'## coding: utf-8\n<% print u"m’a réveillé. '\
+                        u'Elle disait: « S’il vous plaît… dessine-moi un mouton! »" + str(5/0) %>'
+            if utf8:
+                source = source.encode('utf-8')
+            else:
+                source = source
+            templateargs = {'text':source}
+        else:
+            if syntax:
+                filename = 'unicode_syntax_error.html'
+            else:
+                filename = 'unicode_runtime_error.html'
+            source = open(self._file_path(filename), 'rb').read()
+            if not utf8:
+                source = source.decode('utf-8')
+            templateargs = {'filename':self._file_path(filename)}
+        try:
+            template = Template(**templateargs)
+            if not syntax:
+                template.render_unicode()
+            assert False
+        except Exception, e:
+            tback = exceptions.RichTraceback()
+            if utf8:
+                assert tback.source == source.decode('utf-8')
+            else:
+                assert tback.source == source
+
+for utf8 in (True, False):
+    for memory in (True, False):
+        for syntax in (True, False):
+            def _do_test(self):
+                self._do_test_traceback(utf8, memory, syntax)
+            name = 'test_%s_%s_%s' % (utf8 and 'utf8' or 'unicode',
+                                        memory and 'memory' or 'file',
+                                        syntax and 'syntax' or 'runtime')
+            _do_test.__name__ = name
+            setattr(RichTracebackTest, name, _do_test)
+            del _do_test
+
+class ModuleDirTest(TemplateTest):
+    def tearDown(self):
+        import shutil
+        shutil.rmtree(module_base, True)
+
+    def test_basic(self):
+        t = self._file_template("modtest.html")
+        t2 = self._file_template('subdir/modtest.html')
+
+        eq_(
+            t.module.__file__,
+            os.path.join(module_base, 'modtest.html.py')
+        )
+        eq_(
+            t2.module.__file__,
+            os.path.join(module_base, 'subdir', 'modtest.html.py')
+        )
+
+    def test_callable(self):
+        def get_modname(filename, uri):
+            return os.path.join(
+                        module_base,
+                        os.path.dirname(uri)[1:],
+                        'foo',
+                        os.path.basename(filename) + ".py")
+
+        lookup = TemplateLookup(template_base, modulename_callable=get_modname)
+        t = lookup.get_template('/modtest.html')
+        t2 = lookup.get_template('/subdir/modtest.html')
+        eq_(
+            t.module.__file__,
+            os.path.join(module_base, 'foo', 'modtest.html.py')
+        )
+        eq_(
+            t2.module.__file__,
+            os.path.join(module_base, 'subdir', 'foo', 'modtest.html.py')
+        )
+
+    def test_custom_writer(self):
+        canary = []
+        def write_module(source, outputpath):
+            f = open(outputpath, 'wb')
+            canary.append(outputpath)
+            f.write(source)
+            f.close()
+        lookup = TemplateLookup(template_base, module_writer=write_module,
+                                            module_directory=module_base)
+        t = lookup.get_template('/modtest.html')
+        t2 = lookup.get_template('/subdir/modtest.html')
+        eq_(
+            canary,
+            [os.path.join(module_base, "modtest.html.py"),
+            os.path.join(module_base, "subdir/modtest.html.py")]
+        )
+
+class FilenameToURITest(TemplateTest):
+    def test_windows_paths(self):
+        """test that windows filenames are handled appropriately by Template."""
+
+        current_path = os.path
+        import ntpath
+        os.path = ntpath
+        try:
+            class NoCompileTemplate(Template):
+                def _compile_from_file(self, path, filename):
+                    self.path = path
+                    return Template("foo bar").module
+
+            t1 = NoCompileTemplate(
+                                    filename="c:\\foo\\template.html",
+                                    module_directory="c:\\modules\\")
+
+            eq_(t1.uri, "/foo/template.html")
+            eq_(t1.path, "c:\\modules\\foo\\template.html.py")
+
+            t1 = NoCompileTemplate(
+                                    filename="c:\\path\\to\\templates\\template.html",
+                                    uri = "/bar/template.html",
+                                    module_directory="c:\\modules\\")
+
+            eq_(t1.uri, "/bar/template.html")
+            eq_(t1.path, "c:\\modules\\bar\\template.html.py")
+
+        finally:
+            os.path = current_path
+
+    def test_posix_paths(self):
+        """test that posixs filenames are handled appropriately by Template."""
+
+        current_path = os.path
+        import posixpath
+        os.path = posixpath
+        try:
+            class NoCompileTemplate(Template):
+                def _compile_from_file(self, path, filename):
+                    self.path = path
+                    return Template("foo bar").module
+
+            t1 = NoCompileTemplate(
+                                    filename="/var/www/htdocs/includes/template.html",
+                                    module_directory="/var/lib/modules")
+
+            eq_(t1.uri, "/var/www/htdocs/includes/template.html")
+            eq_(t1.path, "/var/lib/modules/var/www/htdocs/includes/template.html.py")
+
+            t1 = NoCompileTemplate(
+                                    filename="/var/www/htdocs/includes/template.html",
+                                    uri = "/bar/template.html",
+                                    module_directory="/var/lib/modules")
+
+            eq_(t1.uri, "/bar/template.html")
+            eq_(t1.path, "/var/lib/modules/bar/template.html.py")
+
+        finally:
+            os.path = current_path
+
+    def test_dont_accept_relative_outside_of_root(self):
+        assert_raises_message(
+            exceptions.TemplateLookupException,
+            "Template uri \"../../foo.html\" is invalid - it "
+            "cannot be relative outside of the root path",
+            Template, "test", uri="../../foo.html",
+        )
+
+        assert_raises_message(
+            exceptions.TemplateLookupException,
+            "Template uri \"/../../foo.html\" is invalid - it "
+            "cannot be relative outside of the root path",
+            Template, "test", uri="/../../foo.html",
+        )
+
+        # normalizes in the root is OK
+        t = Template("test", uri="foo/bar/../../foo.html")
+        eq_(t.uri, "foo/bar/../../foo.html")
+
+
+class ModuleTemplateTest(TemplateTest):
+    def test_module_roundtrip(self):
+        lookup = TemplateLookup()
+
+        template = Template("""
+        <%inherit file="base.html"/>
+
+        % for x in range(5):
+            ${x}
+        % endfor
+""", lookup=lookup)
+
+        base = Template("""
+        This is base.
+        ${self.body()}
+""", lookup=lookup)
+
+        lookup.put_template("base.html", base)
+        lookup.put_template("template.html", template)
+
+        assert result_lines(template.render()) == [
+            "This is base.", "0", "1", "2", "3", "4"
+        ]
+
+        lookup = TemplateLookup()
+        template = ModuleTemplate(template.module, lookup=lookup)
+        base = ModuleTemplate(base.module, lookup=lookup)
+
+        lookup.put_template("base.html", base)
+        lookup.put_template("template.html", template)
+
+        assert result_lines(template.render()) == [
+            "This is base.", "0", "1", "2", "3", "4"
+        ]
+
+
+class PreprocessTest(TemplateTest):
+    def test_old_comments(self):
+        t = Template("""
+        im a template
+# old style comment
+    # more old style comment
+
+    ## new style comment
+    - # not a comment
+    - ## not a comment
+""", preprocessor=convert_comments)
+
+        assert flatten_result(t.render()) == "im a template - # not a comment - ## not a comment"
diff --git a/lib/Mako-0.7.3/test/test_tgplugin.py b/lib/Mako-0.7.3/test/test_tgplugin.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_tgplugin.py
@@ -0,0 +1,42 @@
+import unittest
+
+from mako.ext.turbogears import TGPlugin
+from util import flatten_result, result_lines
+from test import TemplateTest, template_base
+
+tl = TGPlugin(options=dict(directories=[template_base]), extension='html')
+
+class TestTGPlugin(TemplateTest):
+    def test_basic(self):
+        t = tl.load_template('/index.html')
+        assert result_lines(t.render()) == [
+            "this is index"
+        ]
+    def test_subdir(self):
+        t = tl.load_template('/subdir/index.html')
+        assert result_lines(t.render()) == [
+            "this is sub index",
+            "this is include 2"
+
+        ]
+
+        assert tl.load_template('/subdir/index.html').module_id == '_subdir_index_html'
+
+    def test_basic_dot(self):
+        t = tl.load_template('index')
+        assert result_lines(t.render()) == [
+            "this is index"
+        ]
+    def test_subdir_dot(self):
+        t = tl.load_template('subdir.index')
+        assert result_lines(t.render()) == [
+            "this is sub index",
+            "this is include 2"
+
+        ]
+
+        assert tl.load_template('subdir.index').module_id == '_subdir_index_html'
+ 
+    def test_string(self):
+        t = tl.load_template('foo', "hello world")
+        assert t.render() == "hello world"
diff --git a/lib/Mako-0.7.3/test/test_util.py b/lib/Mako-0.7.3/test/test_util.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/test_util.py
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+
+import os
+import unittest
+from mako import util, exceptions
+from test import eq_, skip_if, assert_raises_message
+
+class UtilTest(unittest.TestCase):
+    def test_fast_buffer_write(self):
+        buf = util.FastEncodingBuffer()
+        buf.write("string a ")
+        buf.write("string b")
+        eq_(buf.getvalue(), "string a string b")
+
+    def test_fast_buffer_truncate(self):
+        buf = util.FastEncodingBuffer()
+        buf.write("string a ")
+        buf.write("string b")
+        buf.truncate()
+        buf.write("string c ")
+        buf.write("string d")
+        eq_(buf.getvalue(), "string c string d")
+
+    def test_fast_buffer_encoded(self):
+        s = u"drôl m’a rée « S’il"
+        buf = util.FastEncodingBuffer(encoding='utf-8')
+        buf.write(s[0:10])
+        buf.write(s[10:])
+        q = buf.getvalue()
+        eq_(buf.getvalue(), s.encode('utf-8'))
+
+    def test_read_file(self):
+        fn = os.path.join(os.path.dirname(__file__), 'test_util.py')
+        data = util.read_file(fn, 'rb')
+        self.failUnless('test_util' in str(data)) # str() for py3k
+
+    @skip_if(lambda: util.pypy, "Pypy does this differently")
+    def test_load_module(self):
+        fn = os.path.join(os.path.dirname(__file__), 'test_util.py')
+        module = util.load_module('mako.template', fn)
+        import mako.template
+        self.assertEqual(module, mako.template)
+
+    def test_load_plugin_failure(self):
+        loader = util.PluginLoader("fakegroup")
+        assert_raises_message(
+            exceptions.RuntimeException,
+            "Can't load plugin fakegroup fake",
+            loader.load, "fake"
+        )
diff --git a/lib/Mako-0.7.3/test/util.py b/lib/Mako-0.7.3/test/util.py
new file mode 100644
--- /dev/null
+++ b/lib/Mako-0.7.3/test/util.py
@@ -0,0 +1,7 @@
+import re
+
+def flatten_result(result):
+    return re.sub(r'[\s\r\n]+', ' ', result).strip()
+
+def result_lines(result):
+    return [x.strip() for x in re.split(r'\r?\n', re.sub(r' +', ' ', result)) if x.strip() != '']
\ No newline at end of file
diff --git a/lib/mako-0.7.2/CHANGES b/lib/mako-0.7.2/CHANGES
deleted file mode 100644
--- a/lib/mako-0.7.2/CHANGES
+++ /dev/null
@@ -1,825 +0,0 @@
-0.7.2
-- [bug] Fixed regression in 0.7.1 where AST
-  parsing for Py2.4 was broken.
-  [ticket:193]
-
-0.7.1
-- [feature] Control lines with no bodies will
-  now succeed, as "pass" is added for these
-  when no statements are otherwise present.
-  Courtesy Ben Trofatter [ticket:146]
-
-- [bug] Fixed some long-broken scoping behavior
-  involving variables declared in defs and such,
-  which only became apparent when
-  the strict_undefined flag was turned on.
-  [ticket:192]
-
-- [bug] Can now use strict_undefined at the
-  same time args passed to def() are used
-  by other elements of the <%def> tag.
-  [ticket:191]
-
-0.7.0
-- [feature] Added new "loop" variable to templates,
-  is provided within a % for block to provide
-  info about the loop such as index, first/last,
-  odd/even, etc.  A migration path is also provided
-  for legacy templates via the "enable_loop" argument
-  available on Template, TemplateLookup, and <%page>.
-  Thanks to Ben Trofatter for all
-  the work on this [ticket:125]
-
-- [feature] Added a real check for "reserved"
-  names, that is names which are never pulled
-  from the context and cannot be passed to
-  the template.render() method.  Current names
-  are "context", "loop", "UNDEFINED".
-
-- [feature] The html_error_template() will now
-  apply Pygments highlighting to the source
-  code displayed in the traceback, if Pygments
-  if available.  Courtesy Ben Trofatter
-  [ticket:95]
-
-- [feature] Added support for context managers,
-  i.e. "% with x as e:/ % endwith" support.
-  Courtesy Ben Trofatter [ticket:147]
-
-- [feature] Added class-level flag to CacheImpl
-  "pass_context"; when True, the keyword argument
-  'context' will be passed to get_or_create()
-  containing the Mako Context object.
-  [ticket:185]
-
-- [bug] Fixed some Py3K resource warnings due
-  to filehandles being implicitly closed.
-  [ticket:182]
-
-- [bug] Fixed endless recursion bug when
-  nesting multiple def-calls with content.
-  Thanks to Jeff Dairiki. [ticket:186]
-
-- [feature] Added Jinja2 to the example
-  benchmark suite, courtesy Vincent Férotin
-
-0.6.2
-- [bug] The ${{"foo":"bar"}} parsing issue is fixed!!
-  The legendary Eevee has slain the dragon!
-  [ticket:20].  Also fixes quoting issue
-  at [ticket:86].
-
-0.6.1
-- [bug] Added special compatibility for the 0.5.0
-  Cache() constructor, which was preventing file
-  version checks and not allowing Mako 0.6 to
-  recompile the module files.
-
-0.6.0
-
-- [feature] Template caching has been converted into a plugin
-  system, whereby the usage of Beaker is just the
-  default plugin.   Template and TemplateLookup
-  now accept a string "cache_impl" parameter which
-  refers to the name of a cache plugin, defaulting
-  to the name 'beaker'.  New plugins can be
-  registered as pkg_resources entrypoints under
-  the group "mako.cache", or registered directly
-  using mako.cache.register_plugin().  The
-  core plugin is the mako.cache.CacheImpl
-  class.
-
-- [feature] Added support for Beaker cache regions
-  in templates.   Usage of regions should be considered
-  as superseding the very obsolete idea of passing in
-  backend options, timeouts, etc. within templates.
-
-- [feature] The 'put' method on Cache is now
-  'set'.  'put' is there for backwards compatibility.
-
-- [feature] The <%def>, <%block> and <%page> tags now accept
-  any argument named "cache_*", and the key
-  minus the "cache_" prefix will be passed as keyword
-  arguments to the CacheImpl methods.
-
-- [feature] Template and TemplateLookup now accept an argument
-  cache_args, which refers to a dictionary containing
-  cache parameters.  The cache_dir, cache_url, cache_type,
-  cache_timeout arguments are deprecated (will probably
-  never be removed, however) and can be passed
-  now as cache_args={'url':<some url>, 'type':'memcached',
-  'timeout':50, 'dir':'/path/to/some/directory'}
-
-- [feature/bug] Can now refer to context variables
-  within extra arguments to <%block>, <%def>, i.e.
-  <%block name="foo" cache_key="${somekey}">.
-  Filters can also be used in this way, i.e.
-  <%def name="foo()" filter="myfilter">
-  then template.render(myfilter=some_callable)
-  [ticket:180]
-
-- [feature] Added "--var name=value" option to the mako-render
-  script, allows passing of kw to the template from
-  the command line. [ticket:178]
-
-- [feature] Added module_writer argument to Template,
-  TemplateLookup, allows a callable to be passed which
-  takes over the writing of the template's module source
-  file, so that special environment-specific steps
-  can be taken.  [ticket:181]
-
-- [bug] The exception message in the html_error_template
-  is now escaped with the HTML filter. [ticket:142]
-
-- [bug] Added "white-space:pre" style to html_error_template()
-  for code blocks so that indentation is preserved
-  [ticket:173]
-
-- [bug] The "benchmark" example is now Python 3 compatible
-  (even though several of those old template libs aren't
-  available on Py3K, so YMMV) [ticket:175]
-
-0.5
-- A Template is explicitly disallowed
-  from having a url that normalizes to relative outside
-  of the root.   That is, if the Lookup is based
-  at /home/mytemplates, an include that would place
-  the ultimate template at
-  /home/mytemplates/../some_other_directory,
-  i.e. outside of /home/mytemplates,
-  is disallowed.   This usage was never intended
-  despite the lack of an explicit check.
-  The main issue this causes
-  is that module files can be written outside
-  of the module root (or raise an error, if file perms aren't
-  set up), and can also lead to the same template being
-  cached in the lookup under multiple, relative roots.
-  TemplateLookup instead has always supported multiple
-  file roots for this purpose.
-  [ticket:174]
-
-0.4.2
-- Fixed bug regarding <%call>/def calls w/ content
-  whereby the identity of the "caller" callable
-  inside the <%def> would be corrupted by the
-  presence of another <%call> in the same block.
-  [ticket:170]
-
-- Fixed the babel plugin to accommodate <%block>
-  [ticket:169]
-
-0.4.1
-- New tag: <%block>.  A variant on <%def> that
-  evaluates its contents in-place.
-  Can be named or anonymous,
-  the named version is intended for inheritance
-  layouts where any given section can be
-  surrounded by the <%block> tag in order for
-  it to become overrideable by inheriting
-  templates, without the need to specify a
-  top-level <%def> plus explicit call.
-  Modified scoping and argument rules as well as a
-  more strictly enforced usage scheme make it ideal
-  for this purpose without at all replacing most
-  other things that defs are still good for.
-  Lots of new docs. [ticket:164]
-
-- a slight adjustment to the "highlight" logic
-  for generating template bound stacktraces.
-  Will stick to known template source lines
-  without any extra guessing. [ticket:165]
-
-0.4.0
-- A 20% speedup for a basic two-page
-  inheritance setup rendering
-  a table of escaped data
-  (see http://techspot.zzzeek.org/2010/11/19/quick-mako-vs.-jinja-speed-test/).
-  A few configurational changes which
-  affect those in the I-don't-do-unicode
-  camp should be noted below.
-
-- The FastEncodingBuffer is now used
-  by default instead of cStringIO or StringIO,
-  regardless of whether output_encoding
-  is set to None or not.  FEB is faster than
-  both.  Only StringIO allows bytestrings
-  of unknown encoding to pass right
-  through, however - while it is of course
-  not recommended to send bytestrings of unknown
-  encoding to the output stream, this
-  mode of usage can be re-enabled by
-  setting the flag bytestring_passthrough
-  to True.
-
-- disable_unicode mode requires that
-  output_encoding be set to None - it also
-  forces the bytestring_passthrough flag
-  to True.
-
-- the <%namespace> tag raises an error
-  if the 'template' and 'module' attributes
-  are specified at the same time in
-  one tag.  A different class is used
-  for each case which allows a reduction in
-  runtime conditional logic and function
-  call overhead. [ticket:156]
-
-- the keys() in the Context, as well as
-  it's internal _data dictionary, now
-  include just what was specified to
-  render() as well as Mako builtins
-  'caller', 'capture'.  The contents
-  of __builtin__ are no longer copied.
-  Thanks to Daniel Lopez for pointing
-  this out. [ticket:159]
-
-0.3.6
-- Documentation is on Sphinx.
-  [ticket:126]
-
-- Beaker is now part of "extras" in
-  setup.py instead of "install_requires".
-  This to produce a lighter weight install
-  for those who don't use the caching
-  as well as to conform to Pyramid
-  deployment practices.  [ticket:154]
-
-- The Beaker import (or attempt thereof)
-  is delayed until actually needed;
-  this to remove the performance penalty
-  from startup, particularly for
-  "single execution" environments
-  such as shell scripts. [ticket:153]
-
-- Patch to lexer to not generate an empty
-  '' write in the case of backslash-ended
-  lines.  [ticket:155]
-
-- Fixed missing **extra collection in
-  setup.py which prevented setup.py
-  from running 2to3 on install.
-  [ticket:148]
-
-- New flag on Template, TemplateLookup -
-  strict_undefined=True, will cause
-  variables not found in the context to
-  raise a NameError immediately, instead of
-  defaulting to the UNDEFINED value.
-
-- The range of Python identifiers that
-  are considered "undefined", meaning they
-  are pulled from the context, has been
-  trimmed back to not include variables
-  declared inside of expressions (i.e. from
-  list comprehensions), as well as
-  in the argument list of lambdas.  This
-  to better support the strict_undefined
-  feature.  The change should be
-  fully backwards-compatible but involved
-  a little bit of tinkering in the AST code,
-  which hadn't really been touched for
-  a couple of years, just FYI.
-
-0.3.5
-- The <%namespace> tag allows expressions
-  for the `file` argument, i.e. with ${}.
-  The `context` variable, if needed,
-  must be referenced explicitly.
-  [ticket:141]
-
-- ${} expressions embedded in tags,
-  such as <%foo:bar x="${...}">, now
-  allow multiline Python expressions.
-
-- Fixed previously non-covered regular
-  expression, such that using a ${} expression
-  inside of a tag element that doesn't allow
-  them raises a CompileException instead of
-  silently failing.
-
-- Added a try/except around "import markupsafe".
-  This to support GAE which can't run markupsafe.
-  [ticket:151] No idea whatsoever if the
-  install_requires in setup.py also breaks GAE,
-  couldn't get an answer on this.
-
-0.3.4
-- Now using MarkupSafe for HTML escaping,
-  i.e. in place of cgi.escape().  Faster
-  C-based implementation and also escapes
-  single quotes for additional security.
-  Supports the __html__ attribute for
-  the given expression as well.
-
-  When using "disable_unicode" mode,
-  a pure Python HTML escaper function
-  is used which also quotes single quotes.
-
-  Note that Pylons by default doesn't
-  use Mako's filter - check your
-  environment.py file.
-
-- Fixed call to "unicode.strip" in
-  exceptions.text_error_template which
-  is not Py3k compatible.  [ticket:137]
-
-0.3.3
-- Added conditional to RichTraceback
-  such that if no traceback is passed
-  and sys.exc_info() has been reset,
-  the formatter just returns blank
-  for the "traceback" portion.
-  [ticket:135]
-
-- Fixed sometimes incorrect usage of
-  exc.__class__.__name__
-  in html/text error templates when using
-  Python 2.4 [ticket:131]
-
-- Fixed broken @property decorator on
-  template.last_modified
-
-- Fixed error formatting when a stacktrace
-  line contains no line number, as in when
-  inside an eval/exec-generated function.
-  [ticket:132]
-
-- When a .py is being created, the tempfile
-  where the source is stored temporarily is
-  now made in the same directory as that of
-  the .py file.  This ensures that the two
-  files share the same filesystem, thus
-  avoiding cross-filesystem synchronization
-  issues.  Thanks to Charles Cazabon.
-
-0.3.2
-- Calling a def from the top, via
-  template.get_def(...).render() now checks the
-  argument signature the same way as it did in
-  0.2.5, so that TypeError is not raised.
-  reopen of [ticket:116]
-
-
-0.3.1
-- Fixed incorrect dir name in setup.py
-  [ticket:129]
-
-0.3
-- Python 2.3 support is dropped. [ticket:123]
-
-- Python 3 support is added ! See README.py3k
-  for installation and testing notes.
-  [ticket:119]
-
-- Unit tests now run with nose.  [ticket:127]
-
-- Source code escaping has been simplified.
-  In particular, module source files are now
-  generated with the Python "magic encoding
-  comment", and source code is passed through
-  mostly unescaped, except for that code which
-  is regenerated from parsed Python source.
-  This fixes usage of unicode in
-  <%namespace:defname> tags.  [ticket:99]
-
-- RichTraceback(), html_error_template().render(),
-  text_error_template().render() now accept "error"
-  and "traceback" as optional arguments, and
-  these are now actually used.  [ticket:122]
-
-- The exception output generated when
-  format_exceptions=True will now be as a Python
-  unicode if it occurred during render_unicode(),
-  or an encoded string if during render().
-
-- A percent sign can be emitted as the first
-  non-whitespace character on a line by escaping
-  it as in "%%". [ticket:112]
-
-- Template accepts empty control structure, i.e.
-  % if: %endif, etc. [ticket:94]
-
-- The <%page args> tag can now be used in a base
-  inheriting template - the full set of render()
-  arguments are passed down through the inherits
-  chain.  Undeclared arguments go into **pageargs
-  as usual.  [ticket:116]
-
-- defs declared within a <%namespace> section, an
-  uncommon feature, have been improved.  The defs
-  no longer get doubly-rendered in the body() scope,
-  and now allow local variable assignment without
-  breakage.  [ticket:109]
-
-- Windows paths are handled correctly if a Template
-  is passed only an absolute filename (i.e. with c:
-  drive etc.)  and no URI - the URI is converted
-  to a forward-slash path and module_directory
-  is treated as a windows path.  [ticket:128]
-
-- TemplateLookup raises TopLevelLookupException for
-  a given path that is a directory, not a filename,
-  instead of passing through to the template to
-  generate IOError.  [ticket:73]
-
-0.2.6
-
-- Fix mako function decorators to preserve the
-  original function's name in all cases. Patch
-  from Scott Torborg.
-
-- Support the <%namespacename:defname> syntax in
-  the babel extractor. [ticket:118]
-
-- Further fixes to unicode handling of .py files with the
-  html_error_template. [ticket:88]
-
-0.2.5
-- Added a "decorator" kw argument to <%def>,
-  allows custom decoration functions to wrap
-  rendering callables.  Mainly intended for
-  custom caching algorithms, not sure what
-  other uses there may be (but there may be).
-  Examples are in the "filtering" docs.
-
-- When Mako creates subdirectories in which
-  to store templates, it uses the more
-  permissive mode of 0775 instead of 0750,
-  helping out with certain multi-process
-  scenarios. Note that the mode is always
-  subject to the restrictions of the existing
-  umask. [ticket:101]
-
-- Fixed namespace.__getattr__() to raise
-  AttributeError on attribute not found
-  instead of RuntimeError.  [ticket:104]
-
-- Added last_modified accessor to Template,
-  returns the time.time() when the module
-  was created. [ticket:97]
-
-- Fixed lexing support for whitespace
-  around '=' sign in defs. [ticket:102]
-
-- Removed errant "lower()" in the lexer which
-  was causing tags to compile with
-  case-insensitive names, thus messing up
-  custom <%call> names. [ticket:108]
-
-- added "mako.__version__" attribute to
-  the base module.  [ticket:110]
-
-0.2.4
-- Fixed compatibility with Jython 2.5b1.
-
-0.2.3
-- the <%namespacename:defname> syntax described at
-  http://techspot.zzzeek.org/?p=28 has now
-  been added as a built in syntax, and is recommended
-  as a more modern syntax versus <%call expr="expression">.
-  The %call tag itself will always remain,
-  with <%namespacename:defname> presenting a more HTML-like
-  alternative to calling defs, both plain and
-  nested.  Many examples of the new syntax are in the
-  "Calling a def with embedded content" section
-  of the docs.
-
-- added support for Jython 2.5.
-
-- cache module now uses Beaker's CacheManager
-  object directly, so that all cache types are included.
-  memcached is available as both "ext:memcached" and
-  "memcached", the latter for backwards compatibility.
-
-- added "cache" accessor to Template, Namespace.
-  e.g.  ${local.cache.get('somekey')} or
-  template.cache.invalidate_body()
-
-- added "cache_enabled=True" flag to Template,
-  TemplateLookup.  Setting this to False causes cache
-  operations to "pass through" and execute every time;
-  this flag should be integrated in Pylons with its own
-  cache_enabled configuration setting.
-
-- the Cache object now supports invalidate_def(name),
-  invalidate_body(), invalidate_closure(name),
-  invalidate(key), which will remove the given key
-  from the cache, if it exists.  The cache arguments
-  (i.e. storage type) are derived from whatever has
-  been already persisted for that template.
-  [ticket:92]
-
-- For cache changes to work fully, Beaker 1.1 is required.
-  1.0.1 and up will work as well with the exception of
-  cache expiry.  Note that Beaker 1.1 is **required**
-  for applications which use dynamically generated keys,
-  since previous versions will permanently store state in memory
-  for each individual key, thus consuming all available
-  memory for an arbitrarily large number of distinct
-  keys.
-
-- fixed bug whereby an <%included> template with
-  <%page> args named the same as a __builtin__ would not
-  honor the default value specified in <%page> [ticket:93]
-
-- fixed the html_error_template not handling tracebacks from
-  normal .py files with a magic encoding comment [ticket:88]
-
-- RichTraceback() now accepts an optional traceback object
-  to be used in place of sys.exc_info()[2].  html_error_template()
-  and text_error_template() accept an optional
-  render()-time argument "traceback" which is passed to the
-  RichTraceback object.
-
-- added ModuleTemplate class, which allows the construction
-  of a Template given a Python module generated by a previous
-  Template.   This allows Python modules alone to be used
-  as templates with no compilation step.   Source code
-  and template source are optional but allow error reporting
-  to work correctly.
-
-- fixed Python 2.3 compat. in mako.pyparser [ticket:90]
-
-- fix Babel 0.9.3 compatibility; stripping comment tags is now
-  optional (and enabled by default).
-
-
-0.2.2
-- cached blocks now use the current context when rendering
-an expired section, instead of the original context
-passed in [ticket:87]
-- fixed a critical issue regarding caching, whereby
-a cached block would raise an error when called within a
-cache-refresh operation that was initiated after the
-initiating template had completed rendering.
-
-0.2.1
-- fixed bug where 'output_encoding' parameter would prevent
-render_unicode() from returning a unicode object.
-- bumped magic number, which forces template recompile for
-this version (fixes incompatible compile symbols from 0.1
-series).
-- added a few docs for cache options, specifically those that
-help with memcached.
-
-0.2.0
-- Speed improvements (as though we needed them, but people
-  contributed and there you go):
-
-  - added "bytestring passthru" mode, via
-    `disable_unicode=True` argument passed to Template or
-    TemplateLookup. All unicode-awareness and filtering is
-    turned off, and template modules are generated with
-    the appropriate magic encoding comment. In this mode,
-    template expressions can only receive raw bytestrings
-    or Unicode objects which represent straight ASCII, and
-    render_unicode() may not be used if multibyte
-    characters are present. When enabled, speed
-    improvement around 10-20%. [ticket:77] (courtesy
-    anonymous guest)
-
-  - inlined the "write" function of Context into a local
-    template variable. This affords a 12-30% speedup in
-    template render time. (idea courtesy same anonymous
-    guest) [ticket:76]
-
-- New Features, API changes:
-
-  - added "attr" accessor to namespaces. Returns
-    attributes configured as module level attributes, i.e.
-    within <%! %> sections.  [ticket:62] i.e.:
-
-    # somefile.html
-    <%!
-        foo = 27
-    %>
-
-    # some other template
-    <%namespace name="myns" file="somefile.html"/>
-    ${myns.attr.foo}
-
-    The slight backwards incompatibility here is, you
-    can't have namespace defs named "attr" since the
-    "attr" descriptor will occlude it.
-
-  - cache_key argument can now render arguments passed
-    directly to the %page or %def, i.e. <%def
-    name="foo(x)" cached="True" cache_key="${x}"/>
-    [ticket:78]
-
-  - some functions on Context are now private:
-    _push_buffer(), _pop_buffer(),
-    caller_stack._push_frame(), caller_stack._pop_frame().
-
-  - added a runner script "mako-render" which renders
-    standard input as a template to stdout [ticket:81]
-    [ticket:56]
-
-- Bugfixes:
-  - can now use most names from __builtins__ as variable
-    names without explicit declaration (i.e. 'id',
-    'exception', 'range', etc.) [ticket:83] [ticket:84]
-
-  - can also use builtin names as local variable names
-    (i.e. dict, locals) (came from fix for [ticket:84])
-
-  - fixed bug in python generation when variable names are
-    used with identifiers like "else", "finally", etc.
-    inside them [ticket:68]
-
-  - fixed codegen bug which occured when using <%page>
-    level caching, combined with an expression-based
-    cache_key, combined with the usage of <%namespace
-    import="*"/> - fixed lexer exceptions not cleaning up
-    temporary files, which could lead to a maximum number
-    of file descriptors used in the process [ticket:69]
-
-  - fixed issue with inline format_exceptions that was
-    producing blank exception pages when an inheriting
-    template is present [ticket:71]
-
-  - format_exceptions will apply the encoding options of
-    html_error_template() to the buffered output
-
-  - rewrote the "whitespace adjuster" function to work
-    with more elaborate combinations of quotes and
-    comments [ticket:75]
-
-0.1.10
-- fixed propagation of 'caller' such that nested %def calls
-  within a <%call> tag's argument list propigates 'caller'
-  to the %call function itself (propigates to the inner
-  calls too, this is a slight side effect which previously
-  existed anyway)
-- fixed bug where local.get_namespace() could put an
-  incorrect "self" in the current context
-- fixed another namespace bug where the namespace functions
-  did not have access to the correct context containing
-  their 'self' and 'parent'
-
-0.1.9
-- filters.Decode filter can also accept a non-basestring
-object and will call str() + unicode() on it [ticket:47]
-- comments can be placed at the end of control lines,
-i.e. if foo: # a comment, [ticket:53], thanks to
-Paul Colomiets
-- fixed expressions and page tag arguments and with embedded
-newlines in CRLF templates, follow up to [ticket:16], thanks
-Eric Woroshow
-- added an IOError catch for source file not found in RichTraceback
-exception reporter [ticket:51]
-
-0.1.8
-- variable names declared in render methods by internal
-codegen prefixed by "__M_" to prevent name collisions
-with user code
-- added a Babel (http://babel.edgewall.org/) extractor entry
-point, allowing extraction of gettext messages directly from
-mako templates via Babel [ticket:45]
-- fix to turbogears plugin to work with dot-separated names
-(i.e. load_template('foo.bar')).  also takes file extension
-as a keyword argument (default is 'mak').
-- more tg fix:  fixed [ticket:35], allowing string-based
-templates with tgplugin even if non-compatible args were sent
-
-0.1.7
-- one small fix to the unit tests to support python 2.3
-- a slight hack to how cache.py detects Beaker's memcached,
-works around unexplained import behavior observed on some
-python 2.3 installations
-
-0.1.6
-- caching is now supplied directly by Beaker, which has
-  all of MyghtyUtils merged into it now.  The latest Beaker
-  (0.7.1) also fixes a bug related to how Mako was using the
-  cache API.
-- fix to module_directory path generation when the path is "./"
-  [ticket:34]
-- TGPlugin passes options to string-based templates [ticket:35]
-- added an explicit stack frame step to template runtime, which
-  allows much simpler and hopefully bug-free tracking of 'caller',
-  fixes #28
-- if plain Python defs are used with <%call>, a decorator
-  @runtime.supports_callable exists to ensure that the "caller"
-  stack is properly handled for the def.
-- fix to RichTraceback and exception reporting to get template
-  source code as a unicode object #37
-- html_error_template includes options "full=True", "css=True"
-  which control generation of HTML tags, CSS [ticket:39]
-- added the 'encoding_errors' parameter to Template/TemplateLookup
-  for specifying the error handler associated with encoding to
-  'output_encoding' [ticket:40]
-- the Template returned by html_error_template now defaults to
-  output_encoding=sys.getdefaultencoding(),
-  encoding_errors='htmlentityreplace' [ticket:37]
-- control lines, i.e. % lines, support backslashes to continue long
-  lines (#32)
-- fixed codegen bug when defining <%def> within <%call> within <%call>
-- leading utf-8 BOM in template files is honored according to pep-0263
-
-0.1.5
-- AST expression generation - added in just about everything
-  expression-wise from the AST module  [ticket:26]
-- AST parsing, properly detects imports of the form "import foo.bar"
-  [ticket:27]
-- fix to lexing of <%docs> tag nested in other tags
-- fix to context-arguments inside of <%include> tag which broke
-during 0.1.4 [ticket:29]
-- added "n" filter, disables *all* filters normally applied to an expression
-via <%page> or default_filters (but not those within the filter)
-- added buffer_filters argument, defines filters applied to the return value
-of buffered/cached/filtered %defs, after all filters defined with the %def
-itself have been applied.  allows the creation of default expression filters
-that let the output of return-valued %defs "opt out" of that filtering
-via passing special attributes or objects.
-
-0.1.4
-- got defs-within-defs to be cacheable
-- fixes to code parsing/whitespace adjusting where plain python comments
-  may contain quote characters [ticket:23]
-- fix to variable scoping for identifiers only referenced within
-  functions
-- added a path normalization step to lookup so URIs like
-  "/foo/bar/../etc/../foo" pre-process the ".." tokens before checking
-  the filesystem
-- fixed/improved "caller" semantics so that undefined caller is
-  "UNDEFINED", propigates __nonzero__ method so it evaulates to False if
-  not present, True otherwise. this way you can say % if caller:\n
-  ${caller.body()}\n% endif
-- <%include> has an "args" attribute that can pass arguments to the
-  called template (keyword arguments only, must be declared in that
-  page's <%page> tag.)
-- <%include> plus arguments is also programmatically available via
-  self.include_file(<filename>, **kwargs)
-- further escaping added for multibyte expressions in %def, %call
-  attributes [ticket:24]
-
-
-0.1.3
-- ***Small Syntax Change*** - the single line comment character is now
-*two* hash signs, i.e. "## this is a comment".  This avoids a common
-collection with CSS selectors.
-- the magic "coding" comment (i.e. # coding:utf-8) will still work with
-either one "#" sign or two for now; two is preferred going forward, i.e.
-## coding:<someencoding>.
-- new multiline comment form: "<%doc> a comment </%doc>"
-- UNDEFINED evaluates to False
-- improvement to scoping of "caller" variable when using <%call> tag
-- added lexer error for unclosed control-line (%) line
-- added "preprocessor" argument to Template, TemplateLookup - is a single
-  callable or list of callables which will be applied to the template text
-  before lexing.  given the text as an argument, returns the new text.
-- added mako.ext.preprocessors package, contains one preprocessor so far:
-  'convert_comments', which will convert single # comments to the new ##
-  format
-
-0.1.2
-- fix to parsing of code/expression blocks to insure that non-ascii
-  characters, combined with a template that indicates a non-standard
-  encoding, are expanded into backslash-escaped glyphs before being AST
-  parsed [ticket:11]
-- all template lexing converts the template to unicode first, to
-  immediately catch any encoding issues and ensure internal unicode
-  representation.
-- added module_filename argument to Template to allow specification of a
-  specific module file
-- added modulename_callable to TemplateLookup to allow a function to
-  determine module filenames (takes filename, uri arguments). used for
-  [ticket:14]
-- added optional input_encoding flag to Template, to allow sending a
-  unicode() object with no magic encoding comment
-- "expression_filter" argument in <%page> applies only to expressions
-- added "default_filters" argument to Template, TemplateLookup. applies only
-  to expressions, gets prepended to "expression_filter" arg from <%page>.
-  defaults to ["unicode"], so that all expressions get stringified into u''
-  by default (this is what Mako already does). By setting to [], expressions
-  are passed through raw.
-- added "imports" argument to Template, TemplateLookup. so you can predefine
-  a list of import statements at the top of the template. can be used in
-  conjunction with default_filters.
-- support for CRLF templates...whoops ! welcome to all the windows users.
-  [ticket:16]
-- small fix to local variable propigation for locals that are conditionally
-  declared
-- got "top level" def calls to work, i.e. template.get_def("somedef").render()
-
-0.1.1
-- buffet plugin supports string-based templates, allows ToscaWidgets to work
-  [ticket:8]
-- AST parsing fixes: fixed TryExcept identifier parsing
-- removed textmate tmbundle from contrib and into separate SVN location;
-  windows users cant handle those files, setuptools not very good at
-  "pruning" certain directories
-- fix so that "cache_timeout" parameter is propigated
-- fix to expression filters so that string conversion (actually unicode)
-  properly occurs before filtering
-- better error message when a lookup is attempted with a template that has no
-  lookup
-- implemented "module" attribute for namespace
-- fix to code generation to correctly track multiple defs with the same name
-- "directories" can be passed to TemplateLookup as a scalar in which case it
-  gets converted to a list [ticket:9]
-
-0.1.0
-
-Initial release.
diff --git a/lib/mako-0.7.2/LICENSE b/lib/mako-0.7.2/LICENSE
deleted file mode 100644
--- a/lib/mako-0.7.2/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-This is the MIT license: http://www.opensource.org/licenses/mit-license.php
-
-Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>.
-Mako is a trademark of Michael Bayer.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this
-software and associated documentation files (the "Software"), to deal in the Software
-without restriction, including without limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
-to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or
-substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
-FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
diff --git a/lib/mako-0.7.2/MANIFEST.in b/lib/mako-0.7.2/MANIFEST.in
deleted file mode 100644
--- a/lib/mako-0.7.2/MANIFEST.in
+++ /dev/null
@@ -1,11 +0,0 @@
-# any kind of "*" pulls in __init__.pyc files,
-# so all extensions are explicit.
-
-recursive-include doc *.html *.css *.txt *.js *.png *.py Makefile *.rst *.mako
-recursive-include examples *.py *.xml *.mako *.myt *.kid *.tmpl
-recursive-include test *.py *.html *.mako
-
-include README* LICENSE distribute_setup.py ez_setup.py CHANGES*
-
-prune doc/build/output
-
diff --git a/lib/mako-0.7.2/Mako.egg-info/PKG-INFO b/lib/mako-0.7.2/Mako.egg-info/PKG-INFO
deleted file mode 100644
--- a/lib/mako-0.7.2/Mako.egg-info/PKG-INFO
+++ /dev/null
@@ -1,71 +0,0 @@
-Metadata-Version: 1.0
-Name: Mako
-Version: 0.7.2
-Summary: A super-fast templating language that borrows the  best ideas from the existing templating languages.
-Home-page: http://www.makotemplates.org/
-Author: Mike Bayer
-Author-email: mike at zzzcomputing.com
-License: MIT
-Description: =========================
-        Mako Templates for Python
-        =========================
-        
-        Mako is a template library written in Python. It provides a familiar, non-XML 
-        syntax which compiles into Python modules for maximum performance. Mako's 
-        syntax and API borrows from the best ideas of many others, including Django
-        templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded 
-        Python (i.e. Python Server Page) language, which refines the familiar ideas
-        of componentized layout and inheritance to produce one of the most 
-        straightforward and flexible models available, while also maintaining close 
-        ties to Python calling and scoping semantics.
-        
-        Nutshell
-        ========
-        
-        ::
-        
-            <%inherit file="base.html"/>
-            <%
-                rows = [[v for v in range(0,10)] for row in range(0,10)]
-            %>
-            <table>
-                % for row in rows:
-                    ${makerow(row)}
-                % endfor
-            </table>
-        
-            <%def name="makerow(row)">
-                <tr>
-                % for name in row:
-                    <td>${name}</td>\
-                % endfor
-                </tr>
-            </%def>
-        
-        Philosophy
-        ===========
-        
-        Python is a great scripting language. Don't reinvent the wheel...your templates can handle it !
-        
-        Documentation
-        ==============
-        
-        See documentation for Mako at http://www.makotemplates.org/docs/
-        
-        License
-        ========
-        
-        Mako is licensed under an MIT-style license (see LICENSE).
-        Other incorporated projects may be licensed under different licenses.
-        All licenses allow for non-commercial and commercial use.
-        
-Keywords: templates
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Environment :: Web Environment
-Classifier: Intended Audience :: Developers
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: Implementation :: CPython
-Classifier: Programming Language :: Python :: Implementation :: PyPy
-Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
diff --git a/lib/mako-0.7.2/Mako.egg-info/SOURCES.txt b/lib/mako-0.7.2/Mako.egg-info/SOURCES.txt
deleted file mode 100644
--- a/lib/mako-0.7.2/Mako.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,171 +0,0 @@
-CHANGES
-LICENSE
-MANIFEST.in
-README.rst
-distribute_setup.py
-setup.cfg
-setup.py
-Mako.egg-info/PKG-INFO
-Mako.egg-info/SOURCES.txt
-Mako.egg-info/dependency_links.txt
-Mako.egg-info/entry_points.txt
-Mako.egg-info/not-zip-safe
-Mako.egg-info/requires.txt
-Mako.egg-info/top_level.txt
-doc/caching.html
-doc/defs.html
-doc/filtering.html
-doc/genindex.html
-doc/index.html
-doc/inheritance.html
-doc/namespaces.html
-doc/runtime.html
-doc/search.html
-doc/searchindex.js
-doc/syntax.html
-doc/unicode.html
-doc/usage.html
-doc/_sources/caching.txt
-doc/_sources/defs.txt
-doc/_sources/filtering.txt
-doc/_sources/index.txt
-doc/_sources/inheritance.txt
-doc/_sources/namespaces.txt
-doc/_sources/runtime.txt
-doc/_sources/syntax.txt
-doc/_sources/unicode.txt
-doc/_sources/usage.txt
-doc/_static/basic.css
-doc/_static/comment-bright.png
-doc/_static/comment-close.png
-doc/_static/comment.png
-doc/_static/default.css
-doc/_static/docs.css
-doc/_static/doctools.js
-doc/_static/down-pressed.png
-doc/_static/down.png
-doc/_static/file.png
-doc/_static/jquery.js
-doc/_static/makoLogo.png
-doc/_static/minus.png
-doc/_static/plus.png
-doc/_static/pygments.css
-doc/_static/searchtools.js
-doc/_static/sidebar.js
-doc/_static/site.css
-doc/_static/underscore.js
-doc/_static/up-pressed.png
-doc/_static/up.png
-doc/_static/websupport.js
-doc/build/Makefile
-doc/build/caching.rst
-doc/build/conf.py
-doc/build/defs.rst
-doc/build/filtering.rst
-doc/build/index.rst
-doc/build/inheritance.rst
-doc/build/namespaces.rst
-doc/build/runtime.rst
-doc/build/syntax.rst
-doc/build/unicode.rst
-doc/build/usage.rst
-doc/build/builder/__init__.py
-doc/build/builder/builders.py
-doc/build/builder/util.py
-doc/build/static/docs.css
-doc/build/static/makoLogo.png
-doc/build/static/site.css
-doc/build/templates/base.mako
-doc/build/templates/genindex.mako
-doc/build/templates/layout.mako
-doc/build/templates/page.mako
-doc/build/templates/rtd_layout.mako
-doc/build/templates/search.mako
-examples/bench/basic.py
-examples/bench/cheetah/footer.tmpl
-examples/bench/cheetah/header.tmpl
-examples/bench/cheetah/template.tmpl
-examples/bench/django/templatetags/__init__.py
-examples/bench/django/templatetags/bench.py
-examples/bench/kid/base.kid
-examples/bench/kid/template.kid
-examples/bench/myghty/base.myt
-examples/bench/myghty/template.myt
-examples/wsgi/run_wsgi.py
-mako/__init__.py
-mako/_ast_util.py
-mako/ast.py
-mako/cache.py
-mako/codegen.py
-mako/exceptions.py
-mako/filters.py
-mako/lexer.py
-mako/lookup.py
-mako/parsetree.py
-mako/pygen.py
-mako/pyparser.py
-mako/runtime.py
-mako/template.py
-mako/util.py
-mako/ext/__init__.py
-mako/ext/autohandler.py
-mako/ext/babelplugin.py
-mako/ext/beaker_cache.py
-mako/ext/preprocessors.py
-mako/ext/pygmentplugin.py
-mako/ext/turbogears.py
-scripts/mako-render
-test/__init__.py
-test/sample_module_namespace.py
-test/test_ast.py
-test/test_babelplugin.py
-test/test_block.py
-test/test_cache.py
-test/test_call.py
-test/test_decorators.py
-test/test_def.py
-test/test_exceptions.py
-test/test_filters.py
-test/test_inheritance.py
-test/test_lexer.py
-test/test_lookup.py
-test/test_loop.py
-test/test_lru.py
-test/test_namespace.py
-test/test_pygen.py
-test/test_template.py
-test/test_tgplugin.py
-test/test_util.py
-test/util.py
-test/foo/__init__.py
-test/foo/test_ns.py
-test/templates/badbom.html
-test/templates/bom.html
-test/templates/bommagic.html
-test/templates/chs_unicode.html
-test/templates/chs_unicode_py3k.html
-test/templates/chs_utf8.html
-test/templates/crlf.html
-test/templates/gettext.mako
-test/templates/index.html
-test/templates/internationalization.html
-test/templates/modtest.html
-test/templates/read_unicode.html
-test/templates/read_unicode_py3k.html
-test/templates/runtimeerr.html
-test/templates/runtimeerr_py3k.html
-test/templates/unicode.html
-test/templates/unicode_arguments.html
-test/templates/unicode_arguments_py3k.html
-test/templates/unicode_code.html
-test/templates/unicode_code_py3k.html
-test/templates/unicode_expr.html
-test/templates/unicode_expr_py3k.html
-test/templates/unicode_runtime_error.html
-test/templates/unicode_syntax_error.html
-test/templates/foo/modtest.html.py
-test/templates/othersubdir/foo.html
-test/templates/subdir/incl.html
-test/templates/subdir/index.html
-test/templates/subdir/modtest.html
-test/templates/subdir/foo/modtest.html.py
\ No newline at end of file
diff --git a/lib/mako-0.7.2/Mako.egg-info/dependency_links.txt b/lib/mako-0.7.2/Mako.egg-info/dependency_links.txt
deleted file mode 100644
--- a/lib/mako-0.7.2/Mako.egg-info/dependency_links.txt
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/lib/mako-0.7.2/Mako.egg-info/entry_points.txt b/lib/mako-0.7.2/Mako.egg-info/entry_points.txt
deleted file mode 100644
--- a/lib/mako-0.7.2/Mako.egg-info/entry_points.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-
-      [python.templating.engines]
-      mako = mako.ext.turbogears:TGPlugin
- 
-      [pygments.lexers]
-      mako = mako.ext.pygmentplugin:MakoLexer
-      html+mako = mako.ext.pygmentplugin:MakoHtmlLexer
-      xml+mako = mako.ext.pygmentplugin:MakoXmlLexer
-      js+mako = mako.ext.pygmentplugin:MakoJavascriptLexer
-      css+mako = mako.ext.pygmentplugin:MakoCssLexer
-
-      [babel.extractors]
-      mako = mako.ext.babelplugin:extract
-      
\ No newline at end of file
diff --git a/lib/mako-0.7.2/Mako.egg-info/not-zip-safe b/lib/mako-0.7.2/Mako.egg-info/not-zip-safe
deleted file mode 100644
--- a/lib/mako-0.7.2/Mako.egg-info/not-zip-safe
+++ /dev/null
@@ -1,1 +0,0 @@
-
diff --git a/lib/mako-0.7.2/Mako.egg-info/requires.txt b/lib/mako-0.7.2/Mako.egg-info/requires.txt
deleted file mode 100644
--- a/lib/mako-0.7.2/Mako.egg-info/requires.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-MarkupSafe>=0.9.2
-
-[beaker]
-Beaker>=1.1
\ No newline at end of file
diff --git a/lib/mako-0.7.2/Mako.egg-info/top_level.txt b/lib/mako-0.7.2/Mako.egg-info/top_level.txt
deleted file mode 100644
--- a/lib/mako-0.7.2/Mako.egg-info/top_level.txt
+++ /dev/null
@@ -1,1 +0,0 @@
-mako
diff --git a/lib/mako-0.7.2/PKG-INFO b/lib/mako-0.7.2/PKG-INFO
deleted file mode 100644
--- a/lib/mako-0.7.2/PKG-INFO
+++ /dev/null
@@ -1,71 +0,0 @@
-Metadata-Version: 1.0
-Name: Mako
-Version: 0.7.2
-Summary: A super-fast templating language that borrows the  best ideas from the existing templating languages.
-Home-page: http://www.makotemplates.org/
-Author: Mike Bayer
-Author-email: mike at zzzcomputing.com
-License: MIT
-Description: =========================
-        Mako Templates for Python
-        =========================
-        
-        Mako is a template library written in Python. It provides a familiar, non-XML 
-        syntax which compiles into Python modules for maximum performance. Mako's 
-        syntax and API borrows from the best ideas of many others, including Django
-        templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded 
-        Python (i.e. Python Server Page) language, which refines the familiar ideas
-        of componentized layout and inheritance to produce one of the most 
-        straightforward and flexible models available, while also maintaining close 
-        ties to Python calling and scoping semantics.
-        
-        Nutshell
-        ========
-        
-        ::
-        
-            <%inherit file="base.html"/>
-            <%
-                rows = [[v for v in range(0,10)] for row in range(0,10)]
-            %>
-            <table>
-                % for row in rows:
-                    ${makerow(row)}
-                % endfor
-            </table>
-        
-            <%def name="makerow(row)">
-                <tr>
-                % for name in row:
-                    <td>${name}</td>\
-                % endfor
-                </tr>
-            </%def>
-        
-        Philosophy
-        ===========
-        
-        Python is a great scripting language. Don't reinvent the wheel...your templates can handle it !
-        
-        Documentation
-        ==============
-        
-        See documentation for Mako at http://www.makotemplates.org/docs/
-        
-        License
-        ========
-        
-        Mako is licensed under an MIT-style license (see LICENSE).
-        Other incorporated projects may be licensed under different licenses.
-        All licenses allow for non-commercial and commercial use.
-        
-Keywords: templates
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Environment :: Web Environment
-Classifier: Intended Audience :: Developers
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: Implementation :: CPython
-Classifier: Programming Language :: Python :: Implementation :: PyPy
-Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
diff --git a/lib/mako-0.7.2/README.rst b/lib/mako-0.7.2/README.rst
deleted file mode 100644
--- a/lib/mako-0.7.2/README.rst
+++ /dev/null
@@ -1,52 +0,0 @@
-=========================
-Mako Templates for Python
-=========================
-
-Mako is a template library written in Python. It provides a familiar, non-XML 
-syntax which compiles into Python modules for maximum performance. Mako's 
-syntax and API borrows from the best ideas of many others, including Django
-templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded 
-Python (i.e. Python Server Page) language, which refines the familiar ideas
-of componentized layout and inheritance to produce one of the most 
-straightforward and flexible models available, while also maintaining close 
-ties to Python calling and scoping semantics.
-
-Nutshell
-========
-
-::
-
-    <%inherit file="base.html"/>
-    <%
-        rows = [[v for v in range(0,10)] for row in range(0,10)]
-    %>
-    <table>
-        % for row in rows:
-            ${makerow(row)}
-        % endfor
-    </table>
-
-    <%def name="makerow(row)">
-        <tr>
-        % for name in row:
-            <td>${name}</td>\
-        % endfor
-        </tr>
-    </%def>
-
-Philosophy
-===========
-
-Python is a great scripting language. Don't reinvent the wheel...your templates can handle it !
-
-Documentation
-==============
-
-See documentation for Mako at http://www.makotemplates.org/docs/
-
-License
-========
-
-Mako is licensed under an MIT-style license (see LICENSE).
-Other incorporated projects may be licensed under different licenses.
-All licenses allow for non-commercial and commercial use.
diff --git a/lib/mako-0.7.2/distribute_setup.py b/lib/mako-0.7.2/distribute_setup.py
deleted file mode 100644
--- a/lib/mako-0.7.2/distribute_setup.py
+++ /dev/null
@@ -1,485 +0,0 @@
-#!python
-"""Bootstrap distribute installation
-
-If you want to use setuptools in your package's setup.py, just include this
-file in the same directory with it, and add this to the top of your setup.py::
-
-    from distribute_setup import use_setuptools
-    use_setuptools()
-
-If you want to require a specific version of setuptools, set a download
-mirror, or use an alternate download directory, you can do so by supplying
-the appropriate options to ``use_setuptools()``.
-
-This file can also be run as a script to install or upgrade setuptools.
-"""
-import os
-import sys
-import time
-import fnmatch
-import tempfile
-import tarfile
-from distutils import log
-
-try:
-    from site import USER_SITE
-except ImportError:
-    USER_SITE = None
-
-try:
-    import subprocess
-
-    def _python_cmd(*args):
-        args = (sys.executable,) + args
-        return subprocess.call(args) == 0
-
-except ImportError:
-    # will be used for python 2.3
-    def _python_cmd(*args):
-        args = (sys.executable,) + args
-        # quoting arguments if windows
-        if sys.platform == 'win32':
-            def quote(arg):
-                if ' ' in arg:
-                    return '"%s"' % arg
-                return arg
-            args = [quote(arg) for arg in args]
-        return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
-
-DEFAULT_VERSION = "0.6.13"
-DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
-SETUPTOOLS_FAKED_VERSION = "0.6c11"
-
-SETUPTOOLS_PKG_INFO = """\
-Metadata-Version: 1.0
-Name: setuptools
-Version: %s
-Summary: xxxx
-Home-page: xxx
-Author: xxx
-Author-email: xxx
-License: xxx
-Description: xxx
-""" % SETUPTOOLS_FAKED_VERSION
-
-
-def _install(tarball):
-    # extracting the tarball
-    tmpdir = tempfile.mkdtemp()
-    log.warn('Extracting in %s', tmpdir)
-    old_wd = os.getcwd()
-    try:
-        os.chdir(tmpdir)
-        tar = tarfile.open(tarball)
-        _extractall(tar)
-        tar.close()
-
-        # going in the directory
-        subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
-        os.chdir(subdir)
-        log.warn('Now working in %s', subdir)
-
-        # installing
-        log.warn('Installing Distribute')
-        if not _python_cmd('setup.py', 'install'):
-            log.warn('Something went wrong during the installation.')
-            log.warn('See the error message above.')
-    finally:
-        os.chdir(old_wd)
-
-
-def _build_egg(egg, tarball, to_dir):
-    # extracting the tarball
-    tmpdir = tempfile.mkdtemp()
-    log.warn('Extracting in %s', tmpdir)
-    old_wd = os.getcwd()
-    try:
-        os.chdir(tmpdir)
-        tar = tarfile.open(tarball)
-        _extractall(tar)
-        tar.close()
-
-        # going in the directory
-        subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
-        os.chdir(subdir)
-        log.warn('Now working in %s', subdir)
-
-        # building an egg
-        log.warn('Building a Distribute egg in %s', to_dir)
-        _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir)
-
-    finally:
-        os.chdir(old_wd)
-    # returning the result
-    log.warn(egg)
-    if not os.path.exists(egg):
-        raise IOError('Could not build the egg.')
-
-
-def _do_download(version, download_base, to_dir, download_delay):
-    egg = os.path.join(to_dir, 'distribute-%s-py%d.%d.egg'
-                       % (version, sys.version_info[0], sys.version_info[1]))
-    if not os.path.exists(egg):
-        tarball = download_setuptools(version, download_base,
-                                      to_dir, download_delay)
-        _build_egg(egg, tarball, to_dir)
-    sys.path.insert(0, egg)
-    import setuptools
-    setuptools.bootstrap_install_from = egg
-
-
-def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
-                   to_dir=os.curdir, download_delay=15, no_fake=True):
-    # making sure we use the absolute path
-    to_dir = os.path.abspath(to_dir)
-    was_imported = 'pkg_resources' in sys.modules or \
-        'setuptools' in sys.modules
-    try:
-        try:
-            import pkg_resources
-            if not hasattr(pkg_resources, '_distribute'):
-                if not no_fake:
-                    _fake_setuptools()
-                raise ImportError
-        except ImportError:
-            return _do_download(version, download_base, to_dir, download_delay)
-        try:
-            pkg_resources.require("distribute>="+version)
-            return
-        except pkg_resources.VersionConflict:
-            e = sys.exc_info()[1]
-            if was_imported:
-                sys.stderr.write(
-                "The required version of distribute (>=%s) is not available,\n"
-                "and can't be installed while this script is running. Please\n"
-                "install a more recent version first, using\n"
-                "'easy_install -U distribute'."
-                "\n\n(Currently using %r)\n" % (version, e.args[0]))
-                sys.exit(2)
-            else:
-                del pkg_resources, sys.modules['pkg_resources']    # reload ok
-                return _do_download(version, download_base, to_dir,
-                                    download_delay)
-        except pkg_resources.DistributionNotFound:
-            return _do_download(version, download_base, to_dir,
-                                download_delay)
-    finally:
-        if not no_fake:
-            _create_fake_setuptools_pkg_info(to_dir)
-
-def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
-                        to_dir=os.curdir, delay=15):
-    """Download distribute from a specified location and return its filename
-
-    `version` should be a valid distribute version number that is available
-    as an egg for download under the `download_base` URL (which should end
-    with a '/'). `to_dir` is the directory where the egg will be downloaded.
-    `delay` is the number of seconds to pause before an actual download
-    attempt.
-    """
-    # making sure we use the absolute path
-    to_dir = os.path.abspath(to_dir)
-    try:
-        from urllib.request import urlopen
-    except ImportError:
-        from urllib2 import urlopen
-    tgz_name = "distribute-%s.tar.gz" % version
-    url = download_base + tgz_name
-    saveto = os.path.join(to_dir, tgz_name)
-    src = dst = None
-    if not os.path.exists(saveto):  # Avoid repeated downloads
-        try:
-            log.warn("Downloading %s", url)
-            src = urlopen(url)
-            # Read/write all in one block, so we don't create a corrupt file
-            # if the download is interrupted.
-            data = src.read()
-            dst = open(saveto, "wb")
-            dst.write(data)
-        finally:
-            if src:
-                src.close()
-            if dst:
-                dst.close()
-    return os.path.realpath(saveto)
-
-def _no_sandbox(function):
-    def __no_sandbox(*args, **kw):
-        try:
-            from setuptools.sandbox import DirectorySandbox
-            if not hasattr(DirectorySandbox, '_old'):
-                def violation(*args):
-                    pass
-                DirectorySandbox._old = DirectorySandbox._violation
-                DirectorySandbox._violation = violation
-                patched = True
-            else:
-                patched = False
-        except ImportError:
-            patched = False
-
-        try:
-            return function(*args, **kw)
-        finally:
-            if patched:
-                DirectorySandbox._violation = DirectorySandbox._old
-                del DirectorySandbox._old
-
-    return __no_sandbox
-
-def _patch_file(path, content):
-    """Will backup the file then patch it"""
-    existing_content = open(path).read()
-    if existing_content == content:
-        # already patched
-        log.warn('Already patched.')
-        return False
-    log.warn('Patching...')
-    _rename_path(path)
-    f = open(path, 'w')
-    try:
-        f.write(content)
-    finally:
-        f.close()
-    return True
-
-_patch_file = _no_sandbox(_patch_file)
-
-def _same_content(path, content):
-    return open(path).read() == content
-
-def _rename_path(path):
-    new_name = path + '.OLD.%s' % time.time()
-    log.warn('Renaming %s into %s', path, new_name)
-    os.rename(path, new_name)
-    return new_name
-
-def _remove_flat_installation(placeholder):
-    if not os.path.isdir(placeholder):
-        log.warn('Unkown installation at %s', placeholder)
-        return False
-    found = False
-    for file in os.listdir(placeholder):
-        if fnmatch.fnmatch(file, 'setuptools*.egg-info'):
-            found = True
-            break
-    if not found:
-        log.warn('Could not locate setuptools*.egg-info')
-        return
-
-    log.warn('Removing elements out of the way...')
-    pkg_info = os.path.join(placeholder, file)
-    if os.path.isdir(pkg_info):
-        patched = _patch_egg_dir(pkg_info)
-    else:
-        patched = _patch_file(pkg_info, SETUPTOOLS_PKG_INFO)
-
-    if not patched:
-        log.warn('%s already patched.', pkg_info)
-        return False
-    # now let's move the files out of the way
-    for element in ('setuptools', 'pkg_resources.py', 'site.py'):
-        element = os.path.join(placeholder, element)
-        if os.path.exists(element):
-            _rename_path(element)
-        else:
-            log.warn('Could not find the %s element of the '
-                     'Setuptools distribution', element)
-    return True
-
-_remove_flat_installation = _no_sandbox(_remove_flat_installation)
-
-def _after_install(dist):
-    log.warn('After install bootstrap.')
-    placeholder = dist.get_command_obj('install').install_purelib
-    _create_fake_setuptools_pkg_info(placeholder)
-
-def _create_fake_setuptools_pkg_info(placeholder):
-    if not placeholder or not os.path.exists(placeholder):
-        log.warn('Could not find the install location')
-        return
-    pyver = '%s.%s' % (sys.version_info[0], sys.version_info[1])
-    setuptools_file = 'setuptools-%s-py%s.egg-info' % \
-            (SETUPTOOLS_FAKED_VERSION, pyver)
-    pkg_info = os.path.join(placeholder, setuptools_file)
-    if os.path.exists(pkg_info):
-        log.warn('%s already exists', pkg_info)
-        return
-
-    log.warn('Creating %s', pkg_info)
-    f = open(pkg_info, 'w')
-    try:
-        f.write(SETUPTOOLS_PKG_INFO)
-    finally:
-        f.close()
-
-    pth_file = os.path.join(placeholder, 'setuptools.pth')
-    log.warn('Creating %s', pth_file)
-    f = open(pth_file, 'w')
-    try:
-        f.write(os.path.join(os.curdir, setuptools_file))
-    finally:
-        f.close()
-
-_create_fake_setuptools_pkg_info = _no_sandbox(_create_fake_setuptools_pkg_info)
-
-def _patch_egg_dir(path):
-    # let's check if it's already patched
-    pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
-    if os.path.exists(pkg_info):
-        if _same_content(pkg_info, SETUPTOOLS_PKG_INFO):
-            log.warn('%s already patched.', pkg_info)
-            return False
-    _rename_path(path)
-    os.mkdir(path)
-    os.mkdir(os.path.join(path, 'EGG-INFO'))
-    pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
-    f = open(pkg_info, 'w')
-    try:
-        f.write(SETUPTOOLS_PKG_INFO)
-    finally:
-        f.close()
-    return True
-
-_patch_egg_dir = _no_sandbox(_patch_egg_dir)
-
-def _before_install():
-    log.warn('Before install bootstrap.')
-    _fake_setuptools()
-
-
-def _under_prefix(location):
-    if 'install' not in sys.argv:
-        return True
-    args = sys.argv[sys.argv.index('install')+1:]
-    for index, arg in enumerate(args):
-        for option in ('--root', '--prefix'):
-            if arg.startswith('%s=' % option):
-                top_dir = arg.split('root=')[-1]
-                return location.startswith(top_dir)
-            elif arg == option:
-                if len(args) > index:
-                    top_dir = args[index+1]
-                    return location.startswith(top_dir)
-        if arg == '--user' and USER_SITE is not None:
-            return location.startswith(USER_SITE)
-    return True
-
-
-def _fake_setuptools():
-    log.warn('Scanning installed packages')
-    try:
-        import pkg_resources
-    except ImportError:
-        # we're cool
-        log.warn('Setuptools or Distribute does not seem to be installed.')
-        return
-    ws = pkg_resources.working_set
-    try:
-        setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools',
-                                  replacement=False))
-    except TypeError:
-        # old distribute API
-        setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools'))
-
-    if setuptools_dist is None:
-        log.warn('No setuptools distribution found')
-        return
-    # detecting if it was already faked
-    setuptools_location = setuptools_dist.location
-    log.warn('Setuptools installation detected at %s', setuptools_location)
-
-    # if --root or --preix was provided, and if
-    # setuptools is not located in them, we don't patch it
-    if not _under_prefix(setuptools_location):
-        log.warn('Not patching, --root or --prefix is installing Distribute'
-                 ' in another location')
-        return
-
-    # let's see if its an egg
-    if not setuptools_location.endswith('.egg'):
-        log.warn('Non-egg installation')
-        res = _remove_flat_installation(setuptools_location)
-        if not res:
-            return
-    else:
-        log.warn('Egg installation')
-        pkg_info = os.path.join(setuptools_location, 'EGG-INFO', 'PKG-INFO')
-        if (os.path.exists(pkg_info) and
-            _same_content(pkg_info, SETUPTOOLS_PKG_INFO)):
-            log.warn('Already patched.')
-            return
-        log.warn('Patching...')
-        # let's create a fake egg replacing setuptools one
-        res = _patch_egg_dir(setuptools_location)
-        if not res:
-            return
-    log.warn('Patched done.')
-    _relaunch()
-
-
-def _relaunch():
-    log.warn('Relaunching...')
-    # we have to relaunch the process
-    # pip marker to avoid a relaunch bug
-    if sys.argv[:3] == ['-c', 'install', '--single-version-externally-managed']:
-        sys.argv[0] = 'setup.py'
-    args = [sys.executable] + sys.argv
-    sys.exit(subprocess.call(args))
-
-
-def _extractall(self, path=".", members=None):
-    """Extract all members from the archive to the current working
-       directory and set owner, modification time and permissions on
-       directories afterwards. `path' specifies a different directory
-       to extract to. `members' is optional and must be a subset of the
-       list returned by getmembers().
-    """
-    import copy
-    import operator
-    from tarfile import ExtractError
-    directories = []
-
-    if members is None:
-        members = self
-
-    for tarinfo in members:
-        if tarinfo.isdir():
-            # Extract directories with a safe mode.
-            directories.append(tarinfo)
-            tarinfo = copy.copy(tarinfo)
-            tarinfo.mode = 448 # decimal for oct 0700
-        self.extract(tarinfo, path)
-
-    # Reverse sort directories.
-    if sys.version_info < (2, 4):
-        def sorter(dir1, dir2):
-            return cmp(dir1.name, dir2.name)
-        directories.sort(sorter)
-        directories.reverse()
-    else:
-        directories.sort(key=operator.attrgetter('name'), reverse=True)
-
-    # Set correct owner, mtime and filemode on directories.
-    for tarinfo in directories:
-        dirpath = os.path.join(path, tarinfo.name)
-        try:
-            self.chown(tarinfo, dirpath)
-            self.utime(tarinfo, dirpath)
-            self.chmod(tarinfo, dirpath)
-        except ExtractError:
-            e = sys.exc_info()[1]
-            if self.errorlevel > 1:
-                raise
-            else:
-                self._dbg(1, "tarfile: %s" % e)
-
-
-def main(argv, version=DEFAULT_VERSION):
-    """Install or upgrade setuptools and EasyInstall"""
-    tarball = download_setuptools()
-    _install(tarball)
-
-
-if __name__ == '__main__':
-    main(sys.argv[1:])
diff --git a/lib/mako-0.7.2/doc/_sources/caching.txt b/lib/mako-0.7.2/doc/_sources/caching.txt
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_sources/caching.txt
+++ /dev/null
@@ -1,393 +0,0 @@
-.. _caching_toplevel:
-
-=======
-Caching
-=======
-
-Any template or component can be cached using the ``cache``
-argument to the ``<%page>``, ``<%def>`` or ``<%block>`` directives:
-
-.. sourcecode:: mako
-
-    <%page cached="True"/>
-
-    template text
-
-The above template, after being executed the first time, will
-store its content within a cache that by default is scoped
-within memory. Subsequent calls to the template's :meth:`~.Template.render`
-method will return content directly from the cache. When the
-:class:`.Template` object itself falls out of scope, its corresponding
-cache is garbage collected along with the template.
-
-By default, caching requires that the `Beaker <http://beaker.readthedocs.org/>`_ package be installed on the
-system, however the mechanism of caching can be customized to use
-any third party or user defined system -- see :ref:`cache_plugins`.
-
-In addition to being available on the ``<%page>`` tag, the caching flag and all
-its options can be used with the ``<%def>`` tag as well:
-
-.. sourcecode:: mako
-
-    <%def name="mycomp" cached="True" cache_timeout="60">
-        other text
-    </%def>
-
-... and equivalently with the ``<%block>`` tag, anonymous or named:
-
-.. sourcecode:: mako
-
-    <%block cached="True" cache_timeout="60">
-        other text
-    </%block>
-
-Cache Arguments
-===============
-
-Mako has two cache arguments available on tags that are
-available in all cases.   The rest of the arguments
-available are specific to a backend.
-
-The two generic tags arguments are:
-
-* ``cached="True"`` - enable caching for this ``<%page>``,
-  ``<%def>``, or ``<%block>``.
-* ``cache_key`` - the "key" used to uniquely identify this content
-  in the cache.   Usually, this key is chosen automatically
-  based on the name of the rendering callable (i.e. ``body``
-  when used in ``<%page>``, the name of the def when using ``<%def>``,
-  the explicit or internally-generated name when using ``<%block>``).
-  Using the ``cache_key`` parameter, the key can be overridden
-  using a fixed or programmatically generated value.
-
-  For example, here's a page
-  that caches any page which inherits from it, based on the
-  filename of the calling template:
-
-  .. sourcecode:: mako
-
-     <%page cached="True" cache_key="${self.filename}"/>
-
-     ${next.body()}
-
-     ## rest of template
-
-On a :class:`.Template` or :class:`.TemplateLookup`, the
-caching can be configured using these arguments:
-
-* ``cache_enabled`` - Setting this
-  to ``False`` will disable all caching functionality
-  when the template renders.  Defaults to ``True``.
-  e.g.:
-
-  .. sourcecode:: python
-
-      lookup = TemplateLookup(
-                      directories='/path/to/templates',
-                      cache_enabled = False
-                      )
-
-* ``cache_impl`` - The string name of the cache backend
-  to use.   This defaults to ``'beaker'``, which has historically
-  been the only cache backend supported by Mako.
-
-  .. versionadded:: 0.6.0
-
-  For example, here's how to use the upcoming
-  `dogpile.cache <http://dogpilecache.readthedocs.org>`_
-  backend:
-
-  .. sourcecode:: python
-
-      lookup = TemplateLookup(
-                      directories='/path/to/templates',
-                      cache_impl = 'dogpile.cache',
-                      cache_args = {'regions':my_dogpile_regions}
-                      )
-
-* ``cache_args`` - A dictionary of cache parameters that
-  will be consumed by the cache backend.   See
-  :ref:`beaker_backend` for examples.
-
-  .. versionadded:: 0.6.0
-
-Backend-Specific Cache Arguments
---------------------------------
-
-The ``<%page>``, ``<%def>``, and ``<%block>`` tags
-accept any named argument that starts with the prefix ``"cache_"``.
-Those arguments are then packaged up and passed along to the
-underlying caching implementation, minus the ``"cache_"`` prefix.
-
-The actual arguments understood are determined by the backend.
-
-* :ref:`beaker_backend` - Includes arguments understood by
-  Beaker.
-* :ref:`dogpile.cache_backend` - Includes arguments understood by
-  dogpile.cache.
-
-.. _beaker_backend:
-
-Using the Beaker Cache Backend
-------------------------------
-
-When using Beaker, new implementations will want to make usage
-of **cache regions** so that cache configurations can be maintained
-externally to templates.  These configurations live under
-named "regions" that can be referred to within templates themselves.
-
-.. versionadded:: 0.6.0
-   Support for Beaker cache regions.
-
-For example, suppose we would like two regions.  One is a "short term"
-region that will store content in a memory-based dictionary,
-expiring after 60 seconds.   The other is a Memcached region,
-where values should expire in five minutes.   To configure
-our :class:`.TemplateLookup`, first we get a handle to a
-:class:`beaker.cache.CacheManager`:
-
-.. sourcecode:: python
-
-    from beaker.cache import CacheManager
-
-    manager = CacheManager(cache_regions={
-        'short_term':{
-            'type': 'memory',
-            'expire': 60
-        },
-        'long_term':{
-            'type': 'ext:memcached',
-            'url': '127.0.0.1:11211',
-            'expire': 300
-        }
-    })
-
-    lookup = TemplateLookup(
-                    directories=['/path/to/templates'],
-                    module_directory='/path/to/modules',
-                    cache_impl='beaker',
-                    cache_args={
-                        'manager':manager
-                    }
-            )
-
-Our templates can then opt to cache data in one of either region,
-using the ``cache_region`` argument.   Such as using ``short_term``
-at the ``<%page>`` level:
-
-.. sourcecode:: mako
-
-    <%page cached="True" cache_region="short_term">
-
-    ## ...
-
-Or, ``long_term`` at the ``<%block>`` level:
-
-.. sourcecode:: mako
-
-    <%block name="header" cached="True" cache_region="long_term">
-        other text
-    </%block>
-
-The Beaker backend also works without regions.   There are a
-variety of arguments that can be passed to the ``cache_args``
-dictionary, which are also allowable in templates via the
-``<%page>``, ``<%block>``,
-and ``<%def>`` tags specific to those sections.   The values
-given override those specified at the  :class:`.TemplateLookup`
-or :class:`.Template` level.
-
-With the possible exception
-of ``cache_timeout``, these arguments are probably better off
-staying at the template configuration level.  Each argument
-specified as ``cache_XYZ`` in a template tag is specified
-without the ``cache_`` prefix in the ``cache_args`` dictionary:
-
-* ``cache_timeout`` - number of seconds in which to invalidate the
-  cached data.  After this timeout, the content is re-generated
-  on the next call.  Available as ``timeout`` in the ``cache_args``
-  dictionary.
-* ``cache_type`` - type of caching. ``'memory'``, ``'file'``, ``'dbm'``, or
-  ``'ext:memcached'`` (note that  the string ``memcached`` is
-  also accepted by the dogpile.cache Mako plugin, though not by Beaker itself).
-  Available as ``type`` in the ``cache_args`` dictionary.
-* ``cache_url`` - (only used for ``memcached`` but required) a single
-  IP address or a semi-colon separated list of IP address of
-  memcache servers to use.  Available as ``url`` in the ``cache_args``
-  dictionary.
-* ``cache_dir`` - in the case of the ``'file'`` and ``'dbm'`` cache types,
-  this is the filesystem directory with which to store data
-  files. If this option is not present, the value of
-  ``module_directory`` is used (i.e. the directory where compiled
-  template modules are stored). If neither option is available
-  an exception is thrown.  Available as ``dir`` in the
-  ``cache_args`` dictionary.
-
-.. _dogpile.cache_backend:
-
-Using the dogpile.cache Backend
--------------------------------
-
-`dogpile.cache`_ is a new replacement for Beaker.   It provides
-a modernized, slimmed down interface and is generally easier to use
-than Beaker.   As of this writing it has not yet been released.  dogpile.cache
-includes its own Mako cache plugin -- see :mod:`dogpile.cache.plugins.mako_cache` in the
-dogpile.cache documentation.
-
-Programmatic Cache Access
-=========================
-
-The :class:`.Template`, as well as any template-derived :class:`.Namespace`, has
-an accessor called ``cache`` which returns the :class:`.Cache` object
-for that template. This object is a facade on top of the underlying
-:class:`.CacheImpl` object, and provides some very rudimental
-capabilities, such as the ability to get and put arbitrary
-values:
-
-.. sourcecode:: mako
-
-    <%
-        local.cache.set("somekey", type="memory", "somevalue")
-    %>
-
-Above, the cache associated with the ``local`` namespace is
-accessed and a key is placed within a memory cache.
-
-More commonly, the ``cache`` object is used to invalidate cached
-sections programmatically:
-
-.. sourcecode:: python
-
-    template = lookup.get_template('/sometemplate.html')
-
-    # invalidate the "body" of the template
-    template.cache.invalidate_body()
-
-    # invalidate an individual def
-    template.cache.invalidate_def('somedef')
-
-    # invalidate an arbitrary key
-    template.cache.invalidate('somekey')
-
-You can access any special method or attribute of the :class:`.CacheImpl`
-itself using the :attr:`impl <.Cache.impl>` attribute:
-
-.. sourcecode:: python
-
-    template.cache.impl.do_something_special()
-
-Note that using implementation-specific methods will mean you can't
-swap in a different kind of :class:`.CacheImpl` implementation at a
-later time.
-
-.. _cache_plugins:
-
-Cache Plugins
-=============
-
-The mechanism used by caching can be plugged in
-using a :class:`.CacheImpl` subclass.    This class implements
-the rudimental methods Mako needs to implement the caching
-API.   Mako includes the :class:`.BeakerCacheImpl` class to
-provide the default implementation.  A :class:`.CacheImpl` class
-is acquired by Mako using a ``pkg_resources`` entrypoint, using
-the name given as the ``cache_impl`` argument to :class:`.Template`
-or :class:`.TemplateLookup`.    This entry point can be
-installed via the standard `setuptools`/``setup()`` procedure, underneath
-the `EntryPoint` group named ``"mako.cache"``.  It can also be
-installed at runtime via a convenience installer :func:`.register_plugin`
-which accomplishes essentially the same task.
-
-An example plugin that implements a local dictionary cache:
-
-.. sourcecode:: python
-
-    from mako.cache import Cacheimpl, register_plugin
-
-    class SimpleCacheImpl(CacheImpl):
-        def __init__(self, cache):
-            super(SimpleCacheImpl, self).__init__(cache)
-            self._cache = {}
-
-        def get_or_create(self, key, creation_function, **kw):
-            if key in self._cache:
-                return self._cache[key]
-            else:
-                self._cache[key] = value = creation_function()
-                return value
-
-        def set(self, key, value, **kwargs):
-            self._cache[key] = value
-
-        def get(self, key, **kwargs):
-            return self._cache.get(key)
-
-        def invalidate(self, key, **kwargs):
-            self._cache.pop(key, None)
-
-    # optional - register the class locally
-    register_plugin("simple", __name__, "SimpleCacheImpl")
-
-Enabling the above plugin in a template would look like:
-
-.. sourcecode:: python
-
-    t = Template("mytemplate",
-                 file="mytemplate.html",
-                 cache_impl='simple')
-
-Guidelines for Writing Cache Plugins
-------------------------------------
-
-* The :class:`.CacheImpl` is created on a per-:class:`.Template` basis.  The
-  class should ensure that only data for the parent :class:`.Template` is
-  persisted or returned by the cache methods.    The actual :class:`.Template`
-  is available via the ``self.cache.template`` attribute.   The ``self.cache.id``
-  attribute, which is essentially the unique modulename of the template, is
-  a good value to use in order to represent a unique namespace of keys specific
-  to the template.
-* Templates only use the :meth:`.CacheImpl.get_or_create()` method
-  in an implicit fashion.  The :meth:`.CacheImpl.set`,
-  :meth:`.CacheImpl.get`, and :meth:`.CacheImpl.invalidate` methods are
-  only used in response to direct programmatic access to the corresponding
-  methods on the :class:`.Cache` object.
-* :class:`.CacheImpl` will be accessed in a multithreaded fashion if the
-  :class:`.Template` itself is used multithreaded.  Care should be taken
-  to ensure caching implementations are threadsafe.
-* A library like `Dogpile <http://pypi.python.org/pypi/dogpile.core>`_, which
-  is a minimal locking system derived from Beaker, can be used to help
-  implement the :meth:`.CacheImpl.get_or_create` method in a threadsafe
-  way that can maximize effectiveness across multiple threads as well
-  as processes. :meth:`.CacheImpl.get_or_create` is the
-  key method used by templates.
-* All arguments passed to ``**kw`` come directly from the parameters
-  inside the ``<%def>``, ``<%block>``, or ``<%page>`` tags directly,
-  minus the ``"cache_"`` prefix, as strings, with the exception of
-  the argument ``cache_timeout``, which is passed to the plugin
-  as the name ``timeout`` with the value converted to an integer.
-  Arguments present in ``cache_args`` on :class:`.Template` or
-  :class:`.TemplateLookup` are passed directly, but are superseded
-  by those present in the most specific template tag.
-* The directory where :class:`.Template` places module files can
-  be acquired using the accessor ``self.cache.template.module_directory``.
-  This directory can be a good place to throw cache-related work
-  files, underneath a prefix like ``_my_cache_work`` so that name
-  conflicts with generated modules don't occur.
-
-API Reference
-=============
-
-.. autoclass:: mako.cache.Cache
-    :members:
-    :show-inheritance:
-
-.. autoclass:: mako.cache.CacheImpl
-    :members:
-    :show-inheritance:
-
-.. autofunction:: mako.cache.register_plugin
-
-.. autoclass:: mako.ext.beaker_cache.BeakerCacheImpl
-    :members:
-    :show-inheritance:
-
diff --git a/lib/mako-0.7.2/doc/_sources/defs.txt b/lib/mako-0.7.2/doc/_sources/defs.txt
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_sources/defs.txt
+++ /dev/null
@@ -1,622 +0,0 @@
-.. _defs_toplevel:
-
-===============
-Defs and Blocks
-===============
-
-``<%def>`` and ``<%block>`` are two tags that both demarcate any block of text
-and/or code.   They both exist within generated Python as a callable function,
-i.e., a Python ``def``.   They differ in their scope and calling semantics.
-Whereas ``<%def>`` provides a construct that is very much like a named Python
-``def``, the ``<%block>`` is more layout oriented.
-
-Using Defs
-==========
-
-The ``<%def>`` tag requires a ``name`` attribute, where the ``name`` references
-a Python function signature:
-
-.. sourcecode:: mako
-
-    <%def name="hello()">
-        hello world
-    </%def>
-
-To invoke the ``<%def>``, it is normally called as an expression:
-
-.. sourcecode:: mako
-
-    the def:  ${hello()}
-
-If the ``<%def>`` is not nested inside of another ``<%def>``,
-it's known as a **top level def** and can be accessed anywhere in
-the template, including above where it was defined.
-
-All defs, top level or not, have access to the current
-contextual namespace in exactly the same way their containing
-template does. Suppose the template below is executed with the
-variables ``username`` and ``accountdata`` inside the context:
-
-.. sourcecode:: mako
-
-    Hello there ${username}, how are ya.  Lets see what your account says:
-
-    ${account()}
-
-    <%def name="account()">
-        Account for ${username}:<br/>
-
-        % for row in accountdata:
-            Value: ${row}<br/>
-        % endfor
-    </%def>
-
-The ``username`` and ``accountdata`` variables are present
-within the main template body as well as the body of the
-``account()`` def.
-
-Since defs are just Python functions, you can define and pass
-arguments to them as well:
-
-.. sourcecode:: mako
-
-    ${account(accountname='john')}
-
-    <%def name="account(accountname, type='regular')">
-        account name: ${accountname}, type: ${type}
-    </%def>
-
-When you declare an argument signature for your def, they are
-required to follow normal Python conventions (i.e., all
-arguments are required except keyword arguments with a default
-value). This is in contrast to using context-level variables,
-which evaluate to ``UNDEFINED`` if you reference a name that
-does not exist.
-
-Calling Defs from Other Files
------------------------------
-
-Top level ``<%def>``\ s are **exported** by your template's
-module, and can be called from the outside; including from other
-templates, as well as normal Python code. Calling a ``<%def>``
-from another template is something like using an ``<%include>``
--- except you are calling a specific function within the
-template, not the whole template.
-
-The remote ``<%def>`` call is also a little bit like calling
-functions from other modules in Python. There is an "import"
-step to pull the names from another template into your own
-template; then the function or functions are available.
-
-To import another template, use the ``<%namespace>`` tag:
-
-.. sourcecode:: mako
-
-    <%namespace name="mystuff" file="mystuff.html"/>
-
-The above tag adds a local variable ``mystuff`` to the current
-scope.
-
-Then, just call the defs off of ``mystuff``:
-
-.. sourcecode:: mako
-
-    ${mystuff.somedef(x=5,y=7)}
-
-The ``<%namespace>`` tag also supports some of the other
-semantics of Python's ``import`` statement, including pulling
-names into the local variable space, or using ``*`` to represent
-all names, using the ``import`` attribute:
-
-.. sourcecode:: mako
-
-    <%namespace file="mystuff.html" import="foo, bar"/>
-
-This is just a quick intro to the concept of a **namespace**,
-which is a central Mako concept that has its own chapter in
-these docs. For more detail and examples, see
-:ref:`namespaces_toplevel`.
-
-Calling Defs Programmatically
------------------------------
-
-You can call defs programmatically from any :class:`.Template` object
-using the :meth:`~.Template.get_def()` method, which returns a :class:`.DefTemplate`
-object. This is a :class:`.Template` subclass which the parent
-:class:`.Template` creates, and is usable like any other template:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-
-    template = Template("""
-        <%def name="hi(name)">
-            hi ${name}!
-        </%def>
-
-        <%def name="bye(name)">
-            bye ${name}!
-        </%def>
-    """)
-
-    print template.get_def("hi").render(name="ed")
-    print template.get_def("bye").render(name="ed")
-
-Defs within Defs
-----------------
-
-The def model follows regular Python rules for closures.
-Declaring ``<%def>`` inside another ``<%def>`` declares it
-within the parent's **enclosing scope**:
-
-.. sourcecode:: mako
-
-    <%def name="mydef()">
-        <%def name="subdef()">
-            a sub def
-        </%def>
-
-        i'm the def, and the subcomponent is ${subdef()}
-    </%def>
-
-Just like Python, names that exist outside the inner ``<%def>``
-exist inside it as well:
-
-.. sourcecode:: mako
-
-    <%
-        x = 12
-    %>
-    <%def name="outer()">
-        <%
-            y = 15
-        %>
-        <%def name="inner()">
-            inner, x is ${x}, y is ${y}
-        </%def>
-
-        outer, x is ${x}, y is ${y}
-    </%def>
-
-Assigning to a name inside of a def declares that name as local
-to the scope of that def (again, like Python itself). This means
-the following code will raise an error:
-
-.. sourcecode:: mako
-
-    <%
-        x = 10
-    %>
-    <%def name="somedef()">
-        ## error !
-        somedef, x is ${x}
-        <%
-            x = 27
-        %>
-    </%def>
-
-...because the assignment to ``x`` declares ``x`` as local to the
-scope of ``somedef``, rendering the "outer" version unreachable
-in the expression that tries to render it.
-
-.. _defs_with_content:
-
-Calling a Def with Embedded Content and/or Other Defs
------------------------------------------------------
-
-A flip-side to def within def is a def call with content. This
-is where you call a def, and at the same time declare a block of
-content (or multiple blocks) that can be used by the def being
-called. The main point of such a call is to create custom,
-nestable tags, just like any other template language's
-custom-tag creation system -- where the external tag controls the
-execution of the nested tags and can communicate state to them.
-Only with Mako, you don't have to use any external Python
-modules, you can define arbitrarily nestable tags right in your
-templates.
-
-To achieve this, the target def is invoked using the form
-``<%namepacename:defname>`` instead of the normal ``${}``
-syntax. This syntax, introduced in Mako 0.2.3, is functionally
-equivalent to another tag known as ``%call``, which takes the form
-``<%call expr='namespacename.defname(args)'>``. While ``%call``
-is available in all versions of Mako, the newer style is
-probably more familiar looking. The ``namespace`` portion of the
-call is the name of the **namespace** in which the def is
-defined -- in the most simple cases, this can be ``local`` or
-``self`` to reference the current template's namespace (the
-difference between ``local`` and ``self`` is one of inheritance
--- see :ref:`namespaces_builtin` for details).
-
-When the target def is invoked, a variable ``caller`` is placed
-in its context which contains another namespace containing the
-body and other defs defined by the caller. The body itself is
-referenced by the method ``body()``. Below, we build a ``%def``
-that operates upon ``caller.body()`` to invoke the body of the
-custom tag:
-
-.. sourcecode:: mako
-
-    <%def name="buildtable()">
-        <table>
-            <tr><td>
-                ${caller.body()}
-            </td></tr>
-        </table>
-    </%def>
-
-    <%self:buildtable>
-        I am the table body.
-    </%self:buildtable>
-
-This produces the output (whitespace formatted):
-
-.. sourcecode:: html
-
-    <table>
-        <tr><td>
-            I am the table body.
-        </td></tr>
-    </table>
-
-Using the older ``%call`` syntax looks like:
-
-.. sourcecode:: mako
-
-    <%def name="buildtable()">
-        <table>
-            <tr><td>
-                ${caller.body()}
-            </td></tr>
-        </table>
-    </%def>
-
-    <%call expr="buildtable()">
-        I am the table body.
-    </%call>
-
-The ``body()`` can be executed multiple times or not at all.
-This means you can use def-call-with-content to build iterators,
-conditionals, etc:
-
-.. sourcecode:: mako
-
-    <%def name="lister(count)">
-        % for x in range(count):
-            ${caller.body()}
-        % endfor
-    </%def>
-
-    <%self:lister count="${3}">
-        hi
-    </%self:lister>
-
-Produces:
-
-.. sourcecode:: html
-
-    hi
-    hi
-    hi
-
-Notice above we pass ``3`` as a Python expression, so that it
-remains as an integer.
-
-A custom "conditional" tag:
-
-.. sourcecode:: mako
-
-    <%def name="conditional(expression)">
-        % if expression:
-            ${caller.body()}
-        % endif
-    </%def>
-
-    <%self:conditional expression="${4==4}">
-        i'm the result
-    </%self:conditional>
-
-Produces:
-
-.. sourcecode:: html
-
-    i'm the result
-
-But that's not all. The ``body()`` function also can handle
-arguments, which will augment the local namespace of the body
-callable. The caller must define the arguments which it expects
-to receive from its target def using the ``args`` attribute,
-which is a comma-separated list of argument names. Below, our
-``<%def>`` calls the ``body()`` of its caller, passing in an
-element of data from its argument:
-
-.. sourcecode:: mako
-
-    <%def name="layoutdata(somedata)">
-        <table>
-        % for item in somedata:
-            <tr>
-            % for col in item:
-                <td>${caller.body(col=col)}</td>
-            % endfor
-            </tr>
-        % endfor
-        </table>
-    </%def>
-
-    <%self:layoutdata somedata="${[[1,2,3],[4,5,6],[7,8,9]]}" args="col">\
-    Body data: ${col}\
-    </%self:layoutdata>
-
-Produces:
-
-.. sourcecode:: html
-
-    <table>
-        <tr>
-            <td>Body data: 1</td>
-            <td>Body data: 2</td>
-            <td>Body data: 3</td>
-        </tr>
-        <tr>
-            <td>Body data: 4</td>
-            <td>Body data: 5</td>
-            <td>Body data: 6</td>
-        </tr>
-        <tr>
-            <td>Body data: 7</td>
-            <td>Body data: 8</td>
-            <td>Body data: 9</td>
-        </tr>
-    </table>
-
-You don't have to stick to calling just the ``body()`` function.
-The caller can define any number of callables, allowing the
-``<%call>`` tag to produce whole layouts:
-
-.. sourcecode:: mako
-
-    <%def name="layout()">
-        ## a layout def
-        <div class="mainlayout">
-            <div class="header">
-                ${caller.header()}
-            </div>
-
-            <div class="sidebar">
-                ${caller.sidebar()}
-            </div>
-
-            <div class="content">
-                ${caller.body()}
-            </div>
-        </div>
-    </%def>
-
-    ## calls the layout def
-    <%self:layout>
-        <%def name="header()">
-            I am the header
-        </%def>
-        <%def name="sidebar()">
-            <ul>
-                <li>sidebar 1</li>
-                <li>sidebar 2</li>
-            </ul>
-        </%def>
-
-            this is the body
-    </%self:layout>
-
-The above layout would produce:
-
-.. sourcecode:: html
-
-    <div class="mainlayout">
-        <div class="header">
-        I am the header
-        </div>
-
-        <div class="sidebar">
-        <ul>
-            <li>sidebar 1</li>
-            <li>sidebar 2</li>
-        </ul>
-        </div>
-
-        <div class="content">
-        this is the body
-        </div>
-    </div>
-
-The number of things you can do with ``<%call>`` and/or the
-``<%namespacename:defname>`` calling syntax is enormous. You can
-create form widget libraries, such as an enclosing ``<FORM>``
-tag and nested HTML input elements, or portable wrapping schemes
-using ``<div>`` or other elements. You can create tags that
-interpret rows of data, such as from a database, providing the
-individual columns of each row to a ``body()`` callable which
-lays out the row any way it wants. Basically anything you'd do
-with a "custom tag" or tag library in some other system, Mako
-provides via ``<%def>`` tags and plain Python callables which are
-invoked via ``<%namespacename:defname>`` or ``<%call>``.
-
-.. _blocks:
-
-Using Blocks
-============
-
-The ``<%block>`` tag introduces some new twists on the
-``<%def>`` tag which make it more closely tailored towards layout.
-
-.. versionadded:: 0.4.1
-
-An example of a block:
-
-.. sourcecode:: mako
-
-    <html>
-        <body>
-            <%block>
-                this is a block.
-            </%block>
-        </body>
-    </html>
-
-In the above example, we define a simple block.  The block renders its content in the place
-that it's defined.  Since the block is called for us, it doesn't need a name and the above
-is referred to as an **anonymous block**.  So the output of the above template will be:
-
-.. sourcecode:: html
-
-    <html>
-        <body>
-                this is a block.
-        </body>
-    </html>
-
-So in fact the above block has absolutely no effect.  Its usefulness comes when we start
-using modifiers.  Such as, we can apply a filter to our block:
-
-.. sourcecode:: mako
-
-    <html>
-        <body>
-            <%block filter="h">
-                <html>this is some escaped html.</html>
-            </%block>
-        </body>
-    </html>
-
-or perhaps a caching directive:
-
-.. sourcecode:: mako
-
-    <html>
-        <body>
-            <%block cached="True" cache_timeout="60">
-                This content will be cached for 60 seconds.
-            </%block>
-        </body>
-    </html>
-
-Blocks also work in iterations, conditionals, just like defs:
-
-.. sourcecode:: mako
-
-    % if some_condition:
-        <%block>condition is met</%block>
-    % endif
-
-While the block renders at the point it is defined in the template,
-the underlying function is present in the generated Python code only
-once, so there's no issue with placing a block inside of a loop or
-similar. Anonymous blocks are defined as closures in the local
-rendering body, so have access to local variable scope:
-
-.. sourcecode:: mako
-
-    % for i in range(1, 4):
-        <%block>i is ${i}</%block>
-    % endfor
-
-Using Named Blocks
-------------------
-
-Possibly the more important area where blocks are useful is when we
-do actually give them names. Named blocks are tailored to behave
-somewhat closely to Jinja2's block tag, in that they define an area
-of a layout which can be overridden by an inheriting template. In
-sharp contrast to the ``<%def>`` tag, the name given to a block is
-global for the entire template regardless of how deeply it's nested:
-
-.. sourcecode:: mako
-
-    <html>
-    <%block name="header">
-        <head>
-            <title>
-                <%block name="title">Title</%block>
-            </title>
-        </head>
-    </%block>
-    <body>
-        ${next.body()}
-    </body>
-    </html>
-
-The above example has two named blocks "``header``" and "``title``", both of which can be referred to
-by an inheriting template. A detailed walkthrough of this usage can be found at :ref:`inheritance_toplevel`.
-
-Note above that named blocks don't have any argument declaration the way defs do. They still implement themselves
-as Python functions, however, so they can be invoked additional times beyond their initial definition:
-
-.. sourcecode:: mako
-
-    <div name="page">
-        <%block name="pagecontrol">
-            <a href="">previous page</a> |
-            <a href="">next page</a>
-        </%block>
-
-        <table>
-            ## some content
-        </table>
-
-        ${pagecontrol()}
-    </div>
-
-The content referenced by ``pagecontrol`` above will be rendered both above and below the ``<table>`` tags.
-
-To keep things sane, named blocks have restrictions that defs do not:
-
-* The ``<%block>`` declaration cannot have any argument signature.
-* The name of a ``<%block>`` can only be defined once in a template -- an error is raised if two blocks of the same
-  name occur anywhere in a single template, regardless of nesting.  A similar error is raised if a top level def
-  shares the same name as that of a block.
-* A named ``<%block>`` cannot be defined within a ``<%def>``, or inside the body of a "call", i.e.
-  ``<%call>`` or ``<%namespacename:defname>`` tag.  Anonymous blocks can, however.
-
-Using Page Arguments in Named Blocks
-------------------------------------
-
-A named block is very much like a top level def. It has a similar
-restriction to these types of defs in that arguments passed to the
-template via the ``<%page>`` tag aren't automatically available.
-Using arguments with the ``<%page>`` tag is described in the section
-:ref:`namespaces_body`, and refers to scenarios such as when the
-``body()`` method of a template is called from an inherited template passing
-arguments, or the template is invoked from an ``<%include>`` tag
-with arguments. To allow a named block to share the same arguments
-passed to the page, the ``args`` attribute can be used:
-
-.. sourcecode:: mako
-
-    <%page args="post"/>
-
-    <a name="${post.title}" />
-
-    <span class="post_prose">
-        <%block name="post_prose" args="post">
-            ${post.content}
-        </%block>
-    </span>
-
-Where above, if the template is called via a directive like
-``<%include file="post.mako" args="post=post" />``, the ``post``
-variable is available both in the main body as well as the
-``post_prose`` block.
-
-Similarly, the ``**pageargs`` variable is present, in named blocks only,
-for those arguments not explicit in the ``<%page>`` tag:
-
-.. sourcecode:: mako
-
-    <%block name="post_prose">
-        ${pageargs['post'].content}
-    </%block>
-
-The ``args`` attribute is only allowed with named blocks. With
-anonymous blocks, the Python function is always rendered in the same
-scope as the call itself, so anything available directly outside the
-anonymous block is available inside as well.
diff --git a/lib/mako-0.7.2/doc/_sources/filtering.txt b/lib/mako-0.7.2/doc/_sources/filtering.txt
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_sources/filtering.txt
+++ /dev/null
@@ -1,344 +0,0 @@
-.. _filtering_toplevel:
-
-=======================
-Filtering and Buffering
-=======================
-
-Expression Filtering
-====================
-
-As described in the chapter :ref:`syntax_toplevel`, the "``|``" operator can be
-applied to a "``${}``" expression to apply escape filters to the
-output:
-
-.. sourcecode:: mako
-
-    ${"this is some text" | u}
-
-The above expression applies URL escaping to the expression, and
-produces ``this+is+some+text``.
-
-The built-in escape flags are:
-
-* ``u`` : URL escaping, provided by
-  ``urllib.quote_plus(string.encode('utf-8'))``
-* ``h`` : HTML escaping, provided by
-  ``markupsafe.escape(string)``
-
-  .. versionadded:: 0.3.4
-     Prior versions use ``cgi.escape(string, True)``.
-
-* ``x`` : XML escaping
-* ``trim`` : whitespace trimming, provided by ``string.strip()``
-* ``entity`` : produces HTML entity references for applicable
-  strings, derived from ``htmlentitydefs``
-* ``unicode`` (``str`` on Python 3): produces a Python unicode
-  string (this function is applied by default)
-* ``decode.<some encoding>``: decode input into a Python
-  unicode with the specified encoding
-* ``n`` : disable all default filtering; only filters specified
-  in the local expression tag will be applied.
-
-To apply more than one filter, separate them by a comma:
-
-.. sourcecode:: mako
-
-    ${" <tag>some value</tag> " | h,trim}
-
-The above produces ``<tag>some value</tag>``, with
-no leading or trailing whitespace. The HTML escaping function is
-applied first, the "trim" function second.
-
-Naturally, you can make your own filters too. A filter is just a
-Python function that accepts a single string argument, and
-returns the filtered result. The expressions after the ``|``
-operator draw upon the local namespace of the template in which
-they appear, meaning you can define escaping functions locally:
-
-.. sourcecode:: mako
-
-    <%!
-        def myescape(text):
-            return "<TAG>" + text + "</TAG>"
-    %>
-
-    Here's some tagged text: ${"text" | myescape}
-
-Or from any Python module:
-
-.. sourcecode:: mako
-
-    <%!
-        import myfilters
-    %>
-
-    Here's some tagged text: ${"text" | myfilters.tagfilter}
-
-A page can apply a default set of filters to all expression tags
-using the ``expression_filter`` argument to the ``%page`` tag:
-
-.. sourcecode:: mako
-
-    <%page expression_filter="h"/>
-
-    Escaped text:  ${"<html>some html</html>"}
-
-Result:
-
-.. sourcecode:: html
-
-    Escaped text: <html>some html</html>
-
-.. _filtering_default_filters:
-
-The ``default_filters`` Argument
---------------------------------
-
-In addition to the ``expression_filter`` argument, the
-``default_filters`` argument to both :class:`.Template` and
-:class:`.TemplateLookup` can specify filtering for all expression tags
-at the programmatic level. This array-based argument, when given
-its default argument of ``None``, will be internally set to
-``["unicode"]`` (or ``["str"]`` on Python 3), except when
-``disable_unicode=True`` is set in which case it defaults to
-``["str"]``:
-
-.. sourcecode:: python
-
-    t = TemplateLookup(directories=['/tmp'], default_filters=['unicode'])
-
-To replace the usual ``unicode``/``str`` function with a
-specific encoding, the ``decode`` filter can be substituted:
-
-.. sourcecode:: python
-
-    t = TemplateLookup(directories=['/tmp'], default_filters=['decode.utf8'])
-
-To disable ``default_filters`` entirely, set it to an empty
-list:
-
-.. sourcecode:: python
-
-    t = TemplateLookup(directories=['/tmp'], default_filters=[])
-
-Any string name can be added to ``default_filters`` where it
-will be added to all expressions as a filter. The filters are
-applied from left to right, meaning the leftmost filter is
-applied first.
-
-.. sourcecode:: python
-
-    t = Template(templatetext, default_filters=['unicode', 'myfilter'])
-
-To ease the usage of ``default_filters`` with custom filters,
-you can also add imports (or other code) to all templates using
-the ``imports`` argument:
-
-.. sourcecode:: python
-
-    t = TemplateLookup(directories=['/tmp'],
-                       default_filters=['unicode', 'myfilter'],
-                       imports=['from mypackage import myfilter'])
-
-The above will generate templates something like this:
-
-.. sourcecode:: python
-
-    # ....
-    from mypackage import myfilter
-
-    def render_body(context):
-        context.write(myfilter(unicode("some text")))
-
-Turning off Filtering with the ``n`` Filter
--------------------------------------------
-
-In all cases the special ``n`` filter, used locally within an
-expression, will **disable** all filters declared in the
-``<%page>`` tag as well as in ``default_filters``. Such as:
-
-.. sourcecode:: mako
-
-    ${'myexpression' | n}
-
-will render ``myexpression`` with no filtering of any kind, and:
-
-.. sourcecode:: mako
-
-    ${'myexpression' | n,trim}
-
-will render ``myexpression`` using the ``trim`` filter only.
-
-Filtering Defs and Blocks
-=========================
-
-The ``%def`` and ``%block`` tags have an argument called ``filter`` which will apply the
-given list of filter functions to the output of the ``%def``:
-
-.. sourcecode:: mako
-
-    <%def name="foo()" filter="h, trim">
-        <b>this is bold</b>
-    </%def>
-
-When the ``filter`` attribute is applied to a def as above, the def
-is automatically **buffered** as well. This is described next.
-
-Buffering
-=========
-
-One of Mako's central design goals is speed. To this end, all of
-the textual content within a template and its various callables
-is by default piped directly to the single buffer that is stored
-within the :class:`.Context` object. While this normally is easy to
-miss, it has certain side effects. The main one is that when you
-call a def using the normal expression syntax, i.e.
-``${somedef()}``, it may appear that the return value of the
-function is the content it produced, which is then delivered to
-your template just like any other expression substitution,
-except that normally, this is not the case; the return value of
-``${somedef()}`` is simply the empty string ``''``. By the time
-you receive this empty string, the output of ``somedef()`` has
-been sent to the underlying buffer.
-
-You may not want this effect, if for example you are doing
-something like this:
-
-.. sourcecode:: mako
-
-    ${" results " + somedef() + " more results "}
-
-If the ``somedef()`` function produced the content "``somedef's
-results``", the above template would produce this output:
-
-.. sourcecode:: html
-
-    somedef's results results more results
-
-This is because ``somedef()`` fully executes before the
-expression returns the results of its concatenation; the
-concatenation in turn receives just the empty string as its
-middle expression.
-
-Mako provides two ways to work around this. One is by applying
-buffering to the ``%def`` itself:
-
-.. sourcecode:: mako
-
-    <%def name="somedef()" buffered="True">
-        somedef's results
-    </%def>
-
-The above definition will generate code similar to this:
-
-.. sourcecode:: python
-
-    def somedef():
-        context.push_buffer()
-        try:
-            context.write("somedef's results")
-        finally:
-            buf = context.pop_buffer()
-        return buf.getvalue()
-
-So that the content of ``somedef()`` is sent to a second buffer,
-which is then popped off the stack and its value returned. The
-speed hit inherent in buffering the output of a def is also
-apparent.
-
-Note that the ``filter`` argument on ``%def`` also causes the def to
-be buffered. This is so that the final content of the ``%def`` can
-be delivered to the escaping function in one batch, which
-reduces method calls and also produces more deterministic
-behavior for the filtering function itself, which can possibly
-be useful for a filtering function that wishes to apply a
-transformation to the text as a whole.
-
-The other way to buffer the output of a def or any Mako callable
-is by using the built-in ``capture`` function. This function
-performs an operation similar to the above buffering operation
-except it is specified by the caller.
-
-.. sourcecode:: mako
-
-    ${" results " + capture(somedef) + " more results "}
-
-Note that the first argument to the ``capture`` function is
-**the function itself**, not the result of calling it. This is
-because the ``capture`` function takes over the job of actually
-calling the target function, after setting up a buffered
-environment. To send arguments to the function, just send them
-to ``capture`` instead:
-
-.. sourcecode:: mako
-
-    ${capture(somedef, 17, 'hi', use_paging=True)}
-
-The above call is equivalent to the unbuffered call:
-
-.. sourcecode:: mako
-
-    ${somedef(17, 'hi', use_paging=True)}
-
-Decorating
-==========
-
-.. versionadded:: 0.2.5
-
-Somewhat like a filter for a ``%def`` but more flexible, the ``decorator``
-argument to ``%def`` allows the creation of a function that will
-work in a similar manner to a Python decorator. The function can
-control whether or not the function executes. The original
-intent of this function is to allow the creation of custom cache
-logic, but there may be other uses as well.
-
-``decorator`` is intended to be used with a regular Python
-function, such as one defined in a library module. Here we'll
-illustrate the python function defined in the template for
-simplicities' sake:
-
-.. sourcecode:: mako
-
-    <%!
-        def bar(fn):
-            def decorate(context, *args, **kw):
-                context.write("BAR")
-                fn(*args, **kw)
-                context.write("BAR")
-                return ''
-            return decorate
-    %>
-
-    <%def name="foo()" decorator="bar">
-        this is foo
-    </%def>
-
-    ${foo()}
-
-The above template will return, with more whitespace than this,
-``"BAR this is foo BAR"``. The function is the render callable
-itself (or possibly a wrapper around it), and by default will
-write to the context. To capture its output, use the :func:`.capture`
-callable in the ``mako.runtime`` module (available in templates
-as just ``runtime``):
-
-.. sourcecode:: mako
-
-    <%!
-        def bar(fn):
-            def decorate(context, *args, **kw):
-                return "BAR" + runtime.capture(context, fn, *args, **kw) + "BAR"
-            return decorate
-    %>
-
-    <%def name="foo()" decorator="bar">
-        this is foo
-    </%def>
-
-    ${foo()}
-
-The decorator can be used with top-level defs as well as nested
-defs, and blocks too. Note that when calling a top-level def from the
-:class:`.Template` API, i.e. ``template.get_def('somedef').render()``,
-the decorator has to write the output to the ``context``, i.e.
-as in the first example. The return value gets discarded.
diff --git a/lib/mako-0.7.2/doc/_sources/index.txt b/lib/mako-0.7.2/doc/_sources/index.txt
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_sources/index.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Table of Contents
-=================
-
-.. toctree::
-    :maxdepth: 2
-
-    usage
-    syntax
-    defs
-    runtime
-    namespaces
-    inheritance
-    filtering
-    unicode
-    caching
-
-Indices and Tables
-------------------
-
-* :ref:`genindex`
-* :ref:`search`
-
diff --git a/lib/mako-0.7.2/doc/_sources/inheritance.txt b/lib/mako-0.7.2/doc/_sources/inheritance.txt
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_sources/inheritance.txt
+++ /dev/null
@@ -1,534 +0,0 @@
-.. _inheritance_toplevel:
-
-===========
-Inheritance
-===========
-
-.. note::  Most of the inheritance examples here take advantage of a feature that's
-    new in Mako as of version 0.4.1 called the "block".  This tag is very similar to
-    the "def" tag but is more streamlined for usage with inheritance.  Note that
-    all of the examples here which use blocks can also use defs instead.  Contrasting
-    usages will be illustrated.
-
-Using template inheritance, two or more templates can organize
-themselves into an **inheritance chain**, where content and
-functions from all involved templates can be intermixed. The
-general paradigm of template inheritance is this: if a template
-``A`` inherits from template ``B``, then template ``A`` agrees
-to send the executional control to template ``B`` at runtime
-(``A`` is called the **inheriting** template). Template ``B``,
-the **inherited** template, then makes decisions as to what
-resources from ``A`` shall be executed.
-
-In practice, it looks like this. Here's a hypothetical inheriting
-template, ``index.html``:
-
-.. sourcecode:: mako
-
-    ## index.html
-    <%inherit file="base.html"/>
-
-    <%block name="header">
-        this is some header content
-    </%block>
-
-    this is the body content.
-
-And ``base.html``, the inherited template:
-
-.. sourcecode:: mako
-
-    ## base.html
-    <html>
-        <body>
-            <div class="header">
-                <%block name="header"/>
-            </div>
-
-            ${self.body()}
-
-            <div class="footer">
-                <%block name="footer">
-                    this is the footer
-                </%block>
-            </div>
-        </body>
-    </html>
-
-Here is a breakdown of the execution:
-
-#. When ``index.html`` is rendered, control immediately passes to
-   ``base.html``.
-#. ``base.html`` then renders the top part of an HTML document,
-   then invokes the ``<%block name="header">`` block.  It invokes the
-   underlying ``header()`` function off of a built-in namespace
-   called ``self`` (this namespace was first introduced in the
-   :doc:`Namespaces chapter <namespaces>` in :ref:`namespace_self`). Since
-   ``index.html`` is the topmost template and also defines a block
-   called ``header``, it's this ``header`` block that ultimately gets
-   executed -- instead of the one that's present in ``base.html``.
-#. Control comes back to ``base.html``. Some more HTML is
-   rendered.
-#. ``base.html`` executes ``self.body()``. The ``body()``
-   function on all template-based namespaces refers to the main
-   body of the template, therefore the main body of
-   ``index.html`` is rendered.
-#. When ``<%block name="header">`` is encountered in ``index.html`` 
-   during the ``self.body()`` call, a conditional is checked -- does the
-   current inherited template, i.e. ``base.html``, also define this block? If yes,
-   the ``<%block>`` is **not** executed here -- the inheritance
-   mechanism knows that the parent template is responsible for rendering
-   this block (and in fact it already has).  In other words a block
-   only renders in its *basemost scope*.
-#. Control comes back to ``base.html``. More HTML is rendered,
-   then the ``<%block name="footer">`` expression is invoked.
-#. The ``footer`` block is only defined in ``base.html``, so being
-   the topmost definition of ``footer``, it's the one that
-   executes. If ``index.html`` also specified ``footer``, then
-   its version would **override** that of the base.
-#. ``base.html`` finishes up rendering its HTML and the template
-   is complete, producing:
-
-   .. sourcecode:: html
-
-        <html>
-            <body>
-                <div class="header">
-                    this is some header content
-                </div>
-
-                this is the body content.
-
-                <div class="footer">
-                    this is the footer
-                </div>
-            </body>
-        </html>
-
-...and that is template inheritance in a nutshell. The main idea
-is that the methods that you call upon ``self`` always
-correspond to the topmost definition of that method. Very much
-the way ``self`` works in a Python class, even though Mako is
-not actually using Python class inheritance to implement this
-functionality. (Mako doesn't take the "inheritance" metaphor too
-seriously; while useful to setup some commonly recognized
-semantics, a textual template is not very much like an
-object-oriented class construct in practice).
-
-Nesting Blocks
-==============
-
-The named blocks defined in an inherited template can also be nested within
-other blocks.  The name given to each block is globally accessible via any inheriting
-template.  We can add a new block ``title`` to our ``header`` block:
-
-.. sourcecode:: mako
-
-    ## base.html
-    <html>
-        <body>
-            <div class="header">
-                <%block name="header">
-                    <h2>
-                        <%block name="title"/>
-                    </h2>
-                </%block>
-            </div>
-
-            ${self.body()}
-
-            <div class="footer">
-                <%block name="footer">
-                    this is the footer
-                </%block>
-            </div>
-        </body>
-    </html>
-
-The inheriting template can name either or both of ``header`` and ``title``, separately
-or nested themselves:
-
-.. sourcecode:: mako
-
-    ## index.html
-    <%inherit file="base.html"/>
-
-    <%block name="header">
-        this is some header content
-        ${parent.header()}
-    </%block>
-
-    <%block name="title">
-        this is the title
-    </%block>
-
-    this is the body content.
-
-Note when we overrode ``header``, we added an extra call ``${parent.header()}`` in order to invoke
-the parent's ``header`` block in addition to our own.  That's described in more detail below,
-in :ref:`parent_namespace`.
-
-Rendering a Named Block Multiple Times
-======================================
-
-Recall from the section :ref:`blocks` that a named block is just like a ``<%def>``,
-with some different usage rules.  We can call one of our named sections distinctly, for example
-a section that is used more than once, such as the title of a page:
-
-.. sourcecode:: mako
-
-    <html>
-        <head>
-            <title>${self.title()}</title>
-        </head>
-        <body>
-        <%block name="header">
-            <h2><%block name="title"/></h2>
-        </%block>
-        ${self.body()}
-        </body>
-    </html>
-
-Where above an inheriting template can define ``<%block name="title">`` just once, and it will be
-used in the base template both in the ``<title>`` section as well as the ``<h2>``.
-
-But what about Defs?
-====================
-
-The previous example used the ``<%block>`` tag to produce areas of content
-to be overridden.  Before Mako 0.4.1, there wasn't any such tag -- instead
-there was only the ``<%def>`` tag.   As it turns out, named blocks and defs are
-largely interchangeable.  The def simply doesn't call itself automatically,
-and has more open-ended naming and scoping rules that are more flexible and similar
-to Python itself, but less suited towards layout.  The first example from
-this chapter using defs would look like:
-
-.. sourcecode:: mako
-
-    ## index.html
-    <%inherit file="base.html"/>
-
-    <%def name="header()">
-        this is some header content
-    </%def>
-
-    this is the body content.
-
-And ``base.html``, the inherited template:
-
-.. sourcecode:: mako
-
-    ## base.html
-    <html>
-        <body>
-            <div class="header">
-                ${self.header()}
-            </div>
-
-            ${self.body()}
-
-            <div class="footer">
-                ${self.footer()}
-            </div>
-        </body>
-    </html>
-
-    <%def name="header()"/>
-    <%def name="footer()">
-        this is the footer
-    </%def>
-
-Above, we illustrate that defs differ from blocks in that their definition
-and invocation are defined in two separate places, instead of at once. You can *almost* do exactly what a
-block does if you put the two together:
-
-.. sourcecode:: mako
-
-    <div class="header">
-        <%def name="header()"></%def>${self.header()}
-    </div>
-
-The ``<%block>`` is obviously more streamlined than the ``<%def>`` for this kind
-of usage.  In addition,
-the above "inline" approach with ``<%def>`` does not work with nesting:
-
-.. sourcecode:: mako
-
-    <head>
-        <%def name="header()">
-            <title>
-            ## this won't work !
-            <%def name="title()">default title</%def>${self.title()}
-            </title>
-        </%def>${self.header()}
-    </head>
-
-Where above, the ``title()`` def, because it's a def within a def, is not part of the
-template's exported namespace and will not be part of ``self``.  If the inherited template
-did define its own ``title`` def at the top level, it would be called, but the "default title"
-above is not present at all on ``self`` no matter what.  For this to work as expected
-you'd instead need to say:
-
-.. sourcecode:: mako
-
-    <head>
-        <%def name="header()">
-            <title>
-            ${self.title()}
-            </title>
-        </%def>${self.header()}
-
-        <%def name="title()"/>
-    </head>
-
-That is, ``title`` is defined outside of any other defs so that it is in the ``self`` namespace.
-It works, but the definition needs to be potentially far away from the point of render.
-
-A named block is always placed in the ``self`` namespace, regardless of nesting,
-so this restriction is lifted:
-
-.. sourcecode:: mako
-
-    ## base.html
-    <head>
-        <%block name="header">
-            <title>
-            <%block name="title"/>
-            </title>
-        </%block>
-    </head>
-
-The above template defines ``title`` inside of ``header``, and an inheriting template can define
-one or both in **any** configuration, nested inside each other or not, in order for them to be used:
-
-.. sourcecode:: mako
-
-    ## index.html
-    <%inherit file="base.html"/>
-    <%block name="title">
-        the title
-    </%block>
-    <%block name="header">
-        the header
-    </%block>
-
-So while the ``<%block>`` tag lifts the restriction of nested blocks not being available externally,
-in order to achieve this it *adds* the restriction that all block names in a single template need
-to be globally unique within the template, and additionally that a ``<%block>`` can't be defined
-inside of a ``<%def>``. It's a more restricted tag suited towards a more specific use case than ``<%def>``.
-
-Using the ``next`` Namespace to Produce Content Wrapping
-========================================================
-
-Sometimes you have an inheritance chain that spans more than two
-templates. Or maybe you don't, but you'd like to build your
-system such that extra inherited templates can be inserted in
-the middle of a chain where they would be smoothly integrated.
-If each template wants to define its layout just within its main
-body, you can't just call ``self.body()`` to get at the
-inheriting template's body, since that is only the topmost body.
-To get at the body of the *next* template, you call upon the
-namespace ``next``, which is the namespace of the template
-**immediately following** the current template.
-
-Lets change the line in ``base.html`` which calls upon
-``self.body()`` to instead call upon ``next.body()``:
-
-.. sourcecode:: mako
-
-    ## base.html
-    <html>
-        <body>
-            <div class="header">
-                <%block name="header"/>
-            </div>
-
-            ${next.body()}
-
-            <div class="footer">
-                <%block name="footer">
-                    this is the footer
-                </%block>
-            </div>
-        </body>
-    </html>
-
-
-Lets also add an intermediate template called ``layout.html``,
-which inherits from ``base.html``:
-
-.. sourcecode:: mako
-
-    ## layout.html
-    <%inherit file="base.html"/>
-    <ul>
-        <%block name="toolbar">
-            <li>selection 1</li>
-            <li>selection 2</li>
-            <li>selection 3</li>
-        </%block>
-    </ul>
-    <div class="mainlayout">
-        ${next.body()}
-    </div>
-
-And finally change ``index.html`` to inherit from
-``layout.html`` instead:
-
-.. sourcecode:: mako
-
-    ## index.html
-    <%inherit file="layout.html"/>
-
-    ## .. rest of template
-
-In this setup, each call to ``next.body()`` will render the body
-of the next template in the inheritance chain (which can be
-written as ``base.html -> layout.html -> index.html``). Control
-is still first passed to the bottommost template ``base.html``,
-and ``self`` still references the topmost definition of any
-particular def.
-
-The output we get would be:
-
-.. sourcecode:: html
-
-    <html>
-        <body>
-            <div class="header">
-                this is some header content
-            </div>
-
-            <ul>
-                <li>selection 1</li>
-                <li>selection 2</li>
-                <li>selection 3</li>
-            </ul>
-
-            <div class="mainlayout">
-            this is the body content.
-            </div>
-
-            <div class="footer">
-                this is the footer
-            </div>
-        </body>
-    </html>
-
-So above, we have the ``<html>``, ``<body>`` and
-``header``/``footer`` layout of ``base.html``, we have the
-``<ul>`` and ``mainlayout`` section of ``layout.html``, and the
-main body of ``index.html`` as well as its overridden ``header``
-def. The ``layout.html`` template is inserted into the middle of
-the chain without ``base.html`` having to change anything.
-Without the ``next`` namespace, only the main body of
-``index.html`` could be used; there would be no way to call
-``layout.html``'s body content.
-
-.. _parent_namespace:
-
-Using the ``parent`` Namespace to Augment Defs
-==============================================
-
-Lets now look at the other inheritance-specific namespace, the
-opposite of ``next`` called ``parent``. ``parent`` is the
-namespace of the template **immediately preceding** the current
-template. What's useful about this namespace is that
-defs or blocks can call upon their overridden versions.
-This is not as hard as it sounds and
-is very much like using the ``super`` keyword in Python. Lets
-modify ``index.html`` to augment the list of selections provided
-by the ``toolbar`` function in ``layout.html``:
-
-.. sourcecode:: mako
-
-    ## index.html
-    <%inherit file="layout.html"/>
-
-    <%block name="header">
-        this is some header content
-    </%block>
-
-    <%block name="toolbar">
-        ## call the parent's toolbar first
-        ${parent.toolbar()}
-        <li>selection 4</li>
-        <li>selection 5</li>
-    </%block>
-
-    this is the body content.
-
-Above, we implemented a ``toolbar()`` function, which is meant
-to override the definition of ``toolbar`` within the inherited
-template ``layout.html``. However, since we want the content
-from that of ``layout.html`` as well, we call it via the
-``parent`` namespace whenever we want it's content, in this case
-before we add our own selections. So the output for the whole
-thing is now:
-
-.. sourcecode:: html
-
-    <html>
-        <body>
-            <div class="header">
-                this is some header content
-            </div>
-
-            <ul>
-                <li>selection 1</li>
-                <li>selection 2</li>
-                <li>selection 3</li>
-                <li>selection 4</li>
-                <li>selection 5</li>
-            </ul>
-
-            <div class="mainlayout">
-            this is the body content.
-            </div>
-
-            <div class="footer">
-                this is the footer
-            </div>
-        </body>
-    </html>
-
-and you're now a template inheritance ninja!
-
-Inheritable Attributes
-======================
-
-The :attr:`attr <.Namespace.attr>` accessor of the :class:`.Namespace` object
-allows access to module level variables declared in a template. By accessing
-``self.attr``, you can access regular attributes from the
-inheritance chain as declared in ``<%! %>`` sections. Such as:
-
-.. sourcecode:: mako
-
-    <%!
-        class_ = "grey"
-    %>
-
-    <div class="${self.attr.class_}">
-        ${self.body()}
-    </div>
-
-If an inheriting template overrides ``class_`` to be
-``"white"``, as in:
-
-.. sourcecode:: mako
-
-    <%!
-        class_ = "white"
-    %>
-    <%inherit file="parent.html"/>
-
-    This is the body
-
-you'll get output like:
-
-.. sourcecode:: html
-
-    <div class="white">
-        This is the body
-    </div>
-
diff --git a/lib/mako-0.7.2/doc/_sources/namespaces.txt b/lib/mako-0.7.2/doc/_sources/namespaces.txt
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_sources/namespaces.txt
+++ /dev/null
@@ -1,349 +0,0 @@
-.. _namespaces_toplevel:
-
-==========
-Namespaces
-==========
-
-Namespaces are used to organize groups of defs into
-categories, and also to "import" defs from other files.
-
-If the file ``components.html`` defines these two defs:
-
-.. sourcecode:: mako
-
-    ## components.html
-    <%def name="comp1()">
-        this is comp1
-    </%def>
-
-    <%def name="comp2(x)">
-        this is comp2, x is ${x}
-    </%def>
-
-you can make another file, for example ``index.html``, that
-pulls those two defs into a namespace called ``comp``:
-
-.. sourcecode:: mako
-
-    ## index.html
-    <%namespace name="comp" file="components.html"/>
-
-    Here's comp1:  ${comp.comp1()}
-    Here's comp2:  ${comp.comp2(x=5)}
-
-The ``comp`` variable above is an instance of
-:class:`.Namespace`, a **proxy object** which delivers
-method calls to the underlying template callable using the
-current context.
-
-``<%namespace>`` also provides an ``import`` attribute which can
-be used to pull the names into the local namespace, removing the
-need to call it via the "``.``" operator. When ``import`` is used, the
-``name`` attribute is optional.
-
-.. sourcecode:: mako
-
-    <%namespace file="components.html" import="comp1, comp2"/>
-
-    Heres comp1:  ${comp1()}
-    Heres comp2:  ${comp2(x=5)}
-
-``import`` also supports the "``*``" operator:
-
-.. sourcecode:: mako
-
-    <%namespace file="components.html" import="*"/>
-
-    Heres comp1:  ${comp1()}
-    Heres comp2:  ${comp2(x=5)}
-
-The names imported by the ``import`` attribute take precedence
-over any names that exist within the current context.
-
-.. note:: In current versions of Mako, usage of ``import='*'`` is
-   known to decrease performance of the template. This will be
-   fixed in a future release.
-
-The ``file`` argument allows expressions -- if looking for
-context variables, the ``context`` must be named explicitly:
-
-.. sourcecode:: mako
-
-    <%namespace name="dyn" file="${context['namespace_name']}"/>
-
-Ways to Call Namespaces
-=======================
-
-There are essentially four ways to call a function from a
-namespace.
-
-The "expression" format, as described previously. Namespaces are
-just Python objects with functions on them, and can be used in
-expressions like any other function:
-
-.. sourcecode:: mako
-
-    ${mynamespace.somefunction('some arg1', 'some arg2', arg3='some arg3', arg4='some arg4')}
-
-Synonymous with the "expression" format is the "custom tag"
-format, when a "closed" tag is used. This format, introduced in
-Mako 0.2.3, allows the usage of a "custom" Mako tag, with the
-function arguments passed in using named attributes:
-
-.. sourcecode:: mako
-
-    <%mynamespace:somefunction arg1="some arg1" arg2="some arg2" arg3="some arg3" arg4="some arg4"/>
-
-When using tags, the values of the arguments are taken as
-literal strings by default. To embed Python expressions as
-arguments, use the embedded expression format:
-
-.. sourcecode:: mako
-
-    <%mynamespace:somefunction arg1="${someobject.format()}" arg2="${somedef(5, 12)}"/>
-
-The "custom tag" format is intended mainly for namespace
-functions which recognize body content, which in Mako is known
-as a "def with embedded content":
-
-.. sourcecode:: mako
-
-    <%mynamespace:somefunction arg1="some argument" args="x, y">
-        Some record: ${x}, ${y}
-    </%mynamespace:somefunction>
-
-The "classic" way to call defs with embedded content is the ``<%call>`` tag:
-
-.. sourcecode:: mako
-
-    <%call expr="mynamespace.somefunction(arg1='some argument')" args="x, y">
-        Some record: ${x}, ${y}
-    </%call>
-
-For information on how to construct defs that embed content from
-the caller, see :ref:`defs_with_content`.
-
-.. _namespaces_python_modules:
-
-Namespaces from Regular Python Modules
-======================================
-
-Namespaces can also import regular Python functions from
-modules. These callables need to take at least one argument,
-``context``, an instance of :class:`.Context`. A module file 
-``some/module.py`` might contain the callable:
-
-.. sourcecode:: python
-
-    def my_tag(context):
-        context.write("hello world")
-        return ''
-
-A template can use this module via:
-
-.. sourcecode:: mako
-
-    <%namespace name="hw" module="some.module"/>
-
-    ${hw.my_tag()}
-
-Note that the ``context`` argument is not needed in the call;
-the :class:`.Namespace` tag creates a locally-scoped callable which
-takes care of it. The ``return ''`` is so that the def does not
-dump a ``None`` into the output stream -- the return value of any
-def is rendered after the def completes, in addition to whatever
-was passed to :meth:`.Context.write` within its body.
-
-If your def is to be called in an "embedded content" context,
-that is as described in :ref:`defs_with_content`, you should use
-the :func:`.supports_caller` decorator, which will ensure that Mako
-will ensure the correct "caller" variable is available when your
-def is called, supporting embedded content:
-
-.. sourcecode:: python
-
-    from mako.runtime import supports_caller
-
-    @supports_caller
-    def my_tag(context):
-        context.write("<div>")
-        context['caller'].body()
-        context.write("</div>")
-        return ''
-
-Capturing of output is available as well, using the
-outside-of-templates version of the :func:`.capture` function,
-which accepts the "context" as its first argument:
-
-.. sourcecode:: python
-
-    from mako.runtime import supports_caller, capture
-
-    @supports_caller
-    def my_tag(context):
-        return "<div>%s</div>" % \
-                capture(context, context['caller'].body, x="foo", y="bar")
-
-Declaring Defs in Namespaces
-============================
-
-The ``<%namespace>`` tag supports the definition of ``<%def>``\ s
-directly inside the tag. These defs become part of the namespace
-like any other function, and will override the definitions
-pulled in from a remote template or module:
-
-.. sourcecode:: mako
-
-    ## define a namespace
-    <%namespace name="stuff">
-        <%def name="comp1()">
-            comp1
-        </%def>
-    </%namespace>
-
-    ## then call it
-    ${stuff.comp1()}
-
-.. _namespaces_body:
-
-The ``body()`` Method
-=====================
-
-Every namespace that is generated from a template contains a
-method called ``body()``. This method corresponds to the main
-body of the template, and plays its most important roles when
-using inheritance relationships as well as
-def-calls-with-content.
-
-Since the ``body()`` method is available from a namespace just
-like all the other defs defined in a template, what happens if
-you send arguments to it? By default, the ``body()`` method
-accepts no positional arguments, and for usefulness in
-inheritance scenarios will by default dump all keyword arguments
-into a dictionary called ``pageargs``. But if you actually want
-to get at the keyword arguments, Mako recommends you define your
-own argument signature explicitly. You do this via using the
-``<%page>`` tag:
-
-.. sourcecode:: mako
-
-    <%page args="x, y, someval=8, scope='foo', **kwargs"/>
-
-A template which defines the above signature requires that the
-variables ``x`` and ``y`` are defined, defines default values
-for ``someval`` and ``scope``, and sets up ``**kwargs`` to
-receive all other keyword arguments. If ``**kwargs`` or similar
-is not present, the argument ``**pageargs`` gets tacked on by
-Mako. When the template is called as a top-level template (i.e.
-via :meth:`~.Template.render`) or via the ``<%include>`` tag, the
-values for these arguments will be pulled from the ``Context``.
-In all other cases, i.e. via calling the ``body()`` method, the
-arguments are taken as ordinary arguments from the method call.
-So above, the body might be called as:
-
-.. sourcecode:: mako
-
-    ${self.body(5, y=10, someval=15, delta=7)}
-
-The :class:`.Context` object also supplies a :attr:`~.Context.kwargs` accessor, for
-cases when you'd like to pass along whatever is in the context to
-a ``body()`` callable:
-
-.. sourcecode:: mako
-
-    ${next.body(**context.kwargs)}
-
-The usefulness of calls like the above become more apparent when
-one works with inheriting templates. For more information on
-this, as well as the meanings of the names ``self`` and
-``next``, see :ref:`inheritance_toplevel`.
-
-.. _namespaces_builtin:
-
-Built-in Namespaces
-===================
-
-The namespace is so great that Mako gives your template one (or
-two) for free. The names of these namespaces are ``local`` and
-``self``. Other built-in namespaces include ``parent`` and
-``next``, which are optional and are described in
-:ref:`inheritance_toplevel`.
-
-.. _namespace_local:
-
-``local``
----------
-
-The ``local`` namespace is basically the namespace for the
-currently executing template. This means that all of the top
-level defs defined in your template, as well as your template's
-``body()`` function, are also available off of the ``local``
-namespace.
-
-The ``local`` namespace is also where properties like ``uri``,
-``filename``, and ``module`` and the ``get_namespace`` method
-can be particularly useful.
-
-.. _namespace_self:
-
-``self``
---------
-
-The ``self`` namespace, in the case of a template that does not
-use inheritance, is synonymous with ``local``. If inheritance is
-used, then ``self`` references the topmost template in the
-inheritance chain, where it is most useful for providing the
-ultimate form of various "method" calls which may have been
-overridden at various points in an inheritance chain. See
-:ref:`inheritance_toplevel`.
-
-Inheritable Namespaces
-======================
-
-The ``<%namespace>`` tag includes an optional attribute
-``inheritable="True"``, which will cause the namespace to be
-attached to the ``self`` namespace. Since ``self`` is globally
-available throughout an inheritance chain (described in the next
-section), all the templates in an inheritance chain can get at
-the namespace imported in a super-template via ``self``.
-
-.. sourcecode:: mako
-
-    ## base.html
-    <%namespace name="foo" file="foo.html" inheritable="True"/>
-
-    ${next.body()}
-
-    ## somefile.html
-    <%inherit file="base.html"/>
-
-    ${self.foo.bar()}
-
-This allows a super-template to load a whole bunch of namespaces
-that its inheriting templates can get to, without them having to
-explicitly load those namespaces themselves.
-
-The ``import="*"`` part of the ``<%namespace>`` tag doesn't yet
-interact with the ``inheritable`` flag, so currently you have to
-use the explicit namespace name off of ``self``, followed by the
-desired function name. But more on this in a future release.
-
-API Reference
-=============
-
-.. autoclass:: mako.runtime.Namespace
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.runtime.TemplateNamespace
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.runtime.ModuleNamespace
-    :show-inheritance:
-    :members:
- 
-.. autofunction:: mako.runtime.supports_caller
-
-.. autofunction:: mako.runtime.capture
-
diff --git a/lib/mako-0.7.2/doc/_sources/runtime.txt b/lib/mako-0.7.2/doc/_sources/runtime.txt
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_sources/runtime.txt
+++ /dev/null
@@ -1,448 +0,0 @@
-.. _runtime_toplevel:
-
-============================
-The Mako Runtime Environment
-============================
-
-This section describes a little bit about the objects and
-built-in functions that are available in templates.
-
-.. _context:
-
-Context
-=======
-
-The :class:`.Context` is the central object that is created when
-a template is first executed, and is responsible for handling
-all communication with the outside world.  Within the template
-environment, it is available via the :ref:`reserved name <reserved_names>`
-``context``.  The :class:`.Context` includes two
-major components, one of which is the output buffer, which is a
-file-like object such as Python's ``StringIO`` or similar, and
-the other a dictionary of variables that can be freely
-referenced within a template; this dictionary is a combination
-of the arguments sent to the :meth:`~.Template.render` function and
-some built-in variables provided by Mako's runtime environment.
-
-The Buffer
-----------
-
-The buffer is stored within the :class:`.Context`, and writing
-to it is achieved by calling the :meth:`~.Context.write` method
--- in a template this looks like ``context.write('some string')``.
-You usually don't need to care about this, as all text within a template, as
-well as all expressions provided by ``${}``, automatically send
-everything to this method. The cases you might want to be aware
-of its existence are if you are dealing with various
-filtering/buffering scenarios, which are described in
-:ref:`filtering_toplevel`, or if you want to programmatically
-send content to the output stream, such as within a ``<% %>``
-block.
-
-.. sourcecode:: mako
-
-    <%
-        context.write("some programmatic text")
-    %>
-
-The actual buffer may or may not be the original buffer sent to
-the :class:`.Context` object, as various filtering/caching
-scenarios may "push" a new buffer onto the context's underlying
-buffer stack. For this reason, just stick with
-``context.write()`` and content will always go to the topmost
-buffer.
-
-.. _context_vars:
-
-Context Variables
------------------
-
-When your template is compiled into a Python module, the body
-content is enclosed within a Python function called
-``render_body``. Other top-level defs defined in the template are
-defined within their own function bodies which are named after
-the def's name with the prefix ``render_`` (i.e. ``render_mydef``).
-One of the first things that happens within these functions is
-that all variable names that are referenced within the function
-which are not defined in some other way (i.e. such as via
-assignment, module level imports, etc.) are pulled from the
-:class:`.Context` object's dictionary of variables. This is how you're
-able to freely reference variable names in a template which
-automatically correspond to what was passed into the current
-:class:`.Context`.
-
-* **What happens if I reference a variable name that is not in
-  the current context?** - The value you get back is a special
-  value called ``UNDEFINED``, or if the ``strict_undefined=True`` flag
-  is used a ``NameError`` is raised. ``UNDEFINED`` is just a simple global
-  variable with the class :class:`mako.runtime.Undefined`. The
-  ``UNDEFINED`` object throws an error when you call ``str()`` on
-  it, which is what happens if you try to use it in an
-  expression.
-* **UNDEFINED makes it hard for me to find what name is missing** - An alternative
-  is to specify the option ``strict_undefined=True``
-  to the :class:`.Template` or :class:`.TemplateLookup`.  This will cause
-  any non-present variables to raise an immediate ``NameError``
-  which includes the name of the variable in its message
-  when :meth:`~.Template.render` is called -- ``UNDEFINED`` is not used.
-
-  .. versionadded:: 0.3.6
-
-* **Why not just return None?** Using ``UNDEFINED``, or
-  raising a ``NameError`` is more
-  explicit and allows differentiation between a value of ``None``
-  that was explicitly passed to the :class:`.Context` and a value that
-  wasn't present at all.
-* **Why raise an exception when you call str() on it ? Why not
-  just return a blank string?** - Mako tries to stick to the
-  Python philosophy of "explicit is better than implicit". In
-  this case, it's decided that the template author should be made
-  to specifically handle a missing value rather than
-  experiencing what may be a silent failure. Since ``UNDEFINED``
-  is a singleton object just like Python's ``True`` or ``False``,
-  you can use the ``is`` operator to check for it:
-
-  .. sourcecode:: mako
-
-        % if someval is UNDEFINED:
-            someval is: no value
-        % else:
-            someval is: ${someval}
-        % endif
-
-Another facet of the :class:`.Context` is that its dictionary of
-variables is **immutable**. Whatever is set when
-:meth:`~.Template.render` is called is what stays. Of course, since
-its Python, you can hack around this and change values in the
-context's internal dictionary, but this will probably will not
-work as well as you'd think. The reason for this is that Mako in
-many cases creates copies of the :class:`.Context` object, which
-get sent to various elements of the template and inheriting
-templates used in an execution. So changing the value in your
-local :class:`.Context` will not necessarily make that value
-available in other parts of the template's execution. Examples
-of where Mako creates copies of the :class:`.Context` include
-within top-level def calls from the main body of the template
-(the context is used to propagate locally assigned variables
-into the scope of defs; since in the template's body they appear
-as inlined functions, Mako tries to make them act that way), and
-within an inheritance chain (each template in an inheritance
-chain has a different notion of ``parent`` and ``next``, which
-are all stored in unique :class:`.Context` instances).
-
-* **So what if I want to set values that are global to everyone
-  within a template request?** - All you have to do is provide a
-  dictionary to your :class:`.Context` when the template first
-  runs, and everyone can just get/set variables from that. Lets
-  say its called ``attributes``.
-
-  Running the template looks like:
-
-  .. sourcecode:: python
-
-      output = template.render(attributes={})
-
-  Within a template, just reference the dictionary:
-
-  .. sourcecode:: mako
-
-      <%
-          attributes['foo'] = 'bar'
-      %>
-      'foo' attribute is: ${attributes['foo']}
-
-* **Why can't "attributes" be a built-in feature of the
-  Context?** - This is an area where Mako is trying to make as
-  few decisions about your application as it possibly can.
-  Perhaps you don't want your templates to use this technique of
-  assigning and sharing data, or perhaps you have a different
-  notion of the names and kinds of data structures that should
-  be passed around. Once again Mako would rather ask the user to
-  be explicit.
-
-Context Methods and Accessors
------------------------------
-
-Significant members of :class:`.Context` include:
-
-* ``context[key]`` / ``context.get(key, default=None)`` -
-  dictionary-like accessors for the context. Normally, any
-  variable you use in your template is automatically pulled from
-  the context if it isn't defined somewhere already. Use the
-  dictionary accessor and/or ``get`` method when you want a
-  variable that *is* already defined somewhere else, such as in
-  the local arguments sent to a ``%def`` call. If a key is not
-  present, like a dictionary it raises ``KeyError``.
-* ``keys()`` - all the names defined within this context.
-* ``kwargs`` - this returns a **copy** of the context's
-  dictionary of variables. This is useful when you want to
-  propagate the variables in the current context to a function
-  as keyword arguments, i.e.:
-
-  .. sourcecode:: mako
-
-        ${next.body(**context.kwargs)}
-
-* ``write(text)`` - write some text to the current output
-  stream.
-* ``lookup`` - returns the :class:`.TemplateLookup` instance that is
-  used for all file-lookups within the current execution (even
-  though individual :class:`.Template` instances can conceivably have
-  different instances of a :class:`.TemplateLookup`, only the
-  :class:`.TemplateLookup` of the originally-called :class:`.Template` gets
-  used in a particular execution).
-
-.. _loop_context:
-
-The Loop Context
-================
-
-Within ``% for`` blocks, the :ref:`reserved name<reserved_names>` ``loop``
-is available.  ``loop`` tracks the progress of
-the ``for`` loop and makes it easy to use the iteration state to control
-template behavior:
-
-.. sourcecode:: mako
-
-    <ul>
-    % for a in ("one", "two", "three"):
-        <li>Item ${loop.index}: ${a}</li>
-    % endfor
-    </ul>
-
-.. versionadded:: 0.7
-
-Iterations
-----------
-
-Regardless of the type of iterable you're looping over, ``loop`` always tracks
-the 0-indexed iteration count (available at ``loop.index``), its parity
-(through the ``loop.even`` and ``loop.odd`` bools), and ``loop.first``, a bool
-indicating whether the loop is on its first iteration.  If your iterable
-provides a ``__len__`` method, ``loop`` also provides access to
-a count of iterations remaining at ``loop.reverse_index`` and ``loop.last``,
-a bool indicating whether the loop is on its last iteration; accessing these
-without ``__len__`` will raise a ``TypeError``.
-
-Cycling
--------
-
-Cycling is available regardless of whether the iterable you're using provides
-a ``__len__`` method.  Prior to Mako 0.7, you might have generated a simple
-zebra striped list using ``enumerate``:
-
-.. sourcecode:: mako
-
-    <ul>
-    % for i, item in enumerate(('spam', 'ham', 'eggs')):
-      <li class="${'odd' if i % 2 else 'even'}">${item}</li>
-    % endfor
-    </ul>
-
-With ``loop.cycle``, you get the same results with cleaner code and less prep work:
-
-.. sourcecode:: mako
-
-    <ul>
-    % for item in ('spam', 'ham', 'eggs'):
-      <li class="${loop.cycle('even', 'odd')}">${item}</li>
-    % endfor
-    </ul>
-
-Both approaches produce output like the following:
-
-.. sourcecode:: html
-
-    <ul>
-      <li class="even">spam</li>
-      <li class="odd">ham</li>
-      <li class="even">eggs</li>
-    </ul>
-
-Parent Loops
-------------
-
-Loop contexts can also be transparently nested, and the Mako runtime will do
-the right thing and manage the scope for you.  You can access the parent loop
-context through ``loop.parent``.
-
-This allows you to reach all the way back up through the loop stack by
-chaining ``parent`` attribute accesses, i.e. ``loop.parent.parent....`` as
-long as the stack depth isn't exceeded.  For example, you can use the parent
-loop to make a checkered table:
-
-.. sourcecode:: mako
-
-    <table>
-    % for consonant in 'pbj':
-      <tr>
-      % for vowel in 'iou':
-        <td class="${'black' if (loop.parent.even == loop.even) else 'red'}">
-          ${consonant + vowel}t
-        </td>
-      % endfor
-      </tr>
-    % endfor
-    </table>
-
-.. sourcecode:: html
-
-    <table>
-      <tr>
-        <td class="black">
-          pit
-        </td>
-        <td class="red">
-          pot
-        </td>
-        <td class="black">
-          put
-        </td>
-      </tr>
-      <tr>
-        <td class="red">
-          bit
-        </td>
-        <td class="black">
-          bot
-        </td>
-        <td class="red">
-          but
-        </td>
-      </tr>
-      <tr>
-        <td class="black">
-          jit
-        </td>
-        <td class="red">
-          jot
-        </td>
-        <td class="black">
-          jut
-        </td>
-      </tr>
-    </table>
-
-.. _migrating_loop:
-
-Migrating Legacy Templates that Use the Word "loop"
----------------------------------------------------
-
-.. versionchanged:: 0.7
-   The ``loop`` name is now :ref:`reserved <reserved_names>` in Mako,
-   which means a template that refers to a variable named ``loop``
-   won't function correctly when used in Mako 0.7.
-
-To ease the transition for such systems, the feature can be disabled across the board for
-all templates, then re-enabled on a per-template basis for those templates which wish
-to make use of the new system.
-
-First, the ``enable_loop=False`` flag is passed to either the :class:`.TemplateLookup`
-or :class:`.Template` object in use:
-
-.. sourcecode:: python
-
-    lookup = TemplateLookup(directories=['/docs'], enable_loop=False)
-
-or:
-
-.. sourcecode:: python
-
-    template = Template("some template", enable_loop=False)
-
-An individual template can make usage of the feature when ``enable_loop`` is set to
-``False`` by switching it back on within the ``<%page>`` tag:
-
-.. sourcecode:: mako
-
-    <%page enable_loop="True"/>
-
-    % for i in collection:
-        ${i} ${loop.index}
-    % endfor
-
-Using the above scheme, it's safe to pass the name ``loop`` to the :meth:`.Template.render`
-method as well as to freely make usage of a variable named ``loop`` within a template, provided
-the ``<%page>`` tag doesn't override it.  New templates that want to use the ``loop`` context
-can then set up ``<%page enable_loop="True"/>`` to use the new feature without affecting
-old templates.
-
-All the Built-in Names
-======================
-
-A one-stop shop for all the names Mako defines. Most of these
-names are instances of :class:`.Namespace`, which are described
-in the next section, :ref:`namespaces_toplevel`. Also, most of
-these names other than ``context``, ``UNDEFINED``, and ``loop`` are
-also present *within* the :class:`.Context` itself.   The names
-``context``, ``loop`` and ``UNDEFINED`` themselves can't be passed
-to the context and can't be substituted -- see the section :ref:`reserved_names`.
-
-* ``context`` - this is the :class:`.Context` object, introduced
-  at :ref:`context`.
-* ``local`` - the namespace of the current template, described
-  in :ref:`namespaces_builtin`.
-* ``self`` - the namespace of the topmost template in an
-  inheritance chain (if any, otherwise the same as ``local``),
-  mostly described in :ref:`inheritance_toplevel`.
-* ``parent`` - the namespace of the parent template in an
-  inheritance chain (otherwise undefined); see
-  :ref:`inheritance_toplevel`.
-* ``next`` - the namespace of the next template in an
-  inheritance chain (otherwise undefined); see
-  :ref:`inheritance_toplevel`.
-* ``caller`` - a "mini" namespace created when using the
-  ``<%call>`` tag to define a "def call with content"; described
-  in :ref:`defs_with_content`.
-* ``loop`` - this provides access to :class:`.LoopContext` objects when
-  they are requested within ``% for`` loops, introduced at :ref:`loop_context`.
-* ``capture`` - a function that calls a given def and captures
-  its resulting content into a string, which is returned. Usage
-  is described in :ref:`filtering_toplevel`.
-* ``UNDEFINED`` - a global singleton that is applied to all
-  otherwise uninitialized template variables that were not
-  located within the :class:`.Context` when rendering began,
-  unless the :class:`.Template` flag ``strict_undefined``
-  is set to ``True``. ``UNDEFINED`` is
-  an instance of :class:`.Undefined`, and raises an
-  exception when its ``__str__()`` method is called.
-* ``pageargs`` - this is a dictionary which is present in a
-  template which does not define any ``**kwargs`` section in its
-  ``<%page>`` tag. All keyword arguments sent to the ``body()``
-  function of a template (when used via namespaces) go here by
-  default unless otherwise defined as a page argument. If this
-  makes no sense, it shouldn't; read the section
-  :ref:`namespaces_body`.
-
-.. _reserved_names:
-
-Reserved Names
---------------
-
-Mako has a few names that are considered to be "reserved" and can't be used
-as variable names.
-
-.. versionchanged:: 0.7
-   Mako raises an error if these words are found passed to the template
-   as context arguments, whereas in previous versions they'd be silently
-   ignored or lead to other error messages.
-
-* ``context`` - see :ref:`context`.
-* ``UNDEFINED`` - see :ref:`context_vars`.
-* ``loop`` - see :ref:`loop_context`.  Note this can be disabled for legacy templates
-  via the ``enable_loop=False`` argument; see :ref:`migrating_loop`.
-
-API Reference
-=============
-
-.. autoclass:: mako.runtime.Context
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.runtime.LoopContext
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.runtime.Undefined
-    :show-inheritance:
-
diff --git a/lib/mako-0.7.2/doc/_sources/syntax.txt b/lib/mako-0.7.2/doc/_sources/syntax.txt
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_sources/syntax.txt
+++ /dev/null
@@ -1,469 +0,0 @@
-.. _syntax_toplevel:
-
-======
-Syntax
-======
-
-A Mako template is parsed from a text stream containing any kind
-of content, XML, HTML, email text, etc. The template can further
-contain Mako-specific directives which represent variable and/or
-expression substitutions, control structures (i.e. conditionals
-and loops), server-side comments, full blocks of Python code, as
-well as various tags that offer additional functionality. All of
-these constructs compile into real Python code. This means that
-you can leverage the full power of Python in almost every aspect
-of a Mako template.
-
-Expression Substitution
-=======================
-
-The simplest expression is just a variable substitution. The
-syntax for this is the ``${}`` construct, which is inspired by
-Perl, Genshi, JSP EL, and others:
-
-.. sourcecode:: mako
-
-    this is x: ${x}
-
-Above, the string representation of ``x`` is applied to the
-template's output stream. If you're wondering where ``x`` comes
-from, it's usually from the :class:`.Context` supplied to the
-template's rendering function. If ``x`` was not supplied to the
-template and was not otherwise assigned locally, it evaluates to
-a special value ``UNDEFINED``. More on that later.
-
-The contents within the ``${}`` tag are evaluated by Python
-directly, so full expressions are OK:
-
-.. sourcecode:: mako
-
-    pythagorean theorem:  ${pow(x,2) + pow(y,2)}
-
-The results of the expression are evaluated into a string result
-in all cases before being rendered to the output stream, such as
-the above example where the expression produces a numeric
-result.
-
-Expression Escaping
-===================
-
-Mako includes a number of built-in escaping mechanisms,
-including HTML, URI and XML escaping, as well as a "trim"
-function. These escapes can be added to an expression
-substitution using the ``|`` operator:
-
-.. sourcecode:: mako
-
-    ${"this is some text" | u}
-
-The above expression applies URL escaping to the expression, and
-produces ``this+is+some+text``. The ``u`` name indicates URL
-escaping, whereas ``h`` represents HTML escaping, ``x``
-represents XML escaping, and ``trim`` applies a trim function.
-
-Read more about built-in filtering functions, including how to
-make your own filter functions, in :ref:`filtering_toplevel`.
-
-Control Structures
-==================
-
-A control structure refers to all those things that control the
-flow of a program -- conditionals (i.e. ``if``/``else``), loops (like
-``while`` and ``for``), as well as things like ``try``/``except``. In Mako,
-control structures are written using the ``%`` marker followed
-by a regular Python control expression, and are "closed" by
-using another ``%`` marker with the tag "``end<name>``", where
-"``<name>``" is the keyword of the expression:
-
-.. sourcecode:: mako
-
-    % if x==5:
-        this is some output
-    % endif
-
-The ``%`` can appear anywhere on the line as long as no text
-precedes it; indentation is not significant. The full range of
-Python "colon" expressions are allowed here, including
-``if``/``elif``/``else``, ``while``, ``for``, and even ``def``, although
-Mako has a built-in tag for defs which is more full-featured.
-
-.. sourcecode:: mako
-
-    % for a in ['one', 'two', 'three', 'four', 'five']:
-        % if a[0] == 't':
-        its two or three
-        % elif a[0] == 'f':
-        four/five
-        % else:
-        one
-        % endif
-    % endfor
-
-The ``%`` sign can also be "escaped", if you actually want to
-emit a percent sign as the first non whitespace character on a
-line, by escaping it as in ``%%``:
-
-.. sourcecode:: mako
-
-    %% some text
-
-        %% some more text
-
-The Loop Context
-----------------
-
-The **loop context** provides additional information about a loop
-while inside of a ``% for`` structure:
-
-.. sourcecode:: mako
-
-    <ul>
-    % for a in ("one", "two", "three"):
-        <li>Item ${loop.index}: ${a}</li>
-    % endfor
-    </ul>
-
-See :ref:`loop_context` for more information on this feature.
-
-.. versionadded:: 0.7
-
-Comments
-========
-
-Comments come in two varieties. The single line comment uses
-``##`` as the first non-space characters on a line:
-
-.. sourcecode:: mako
-
-    ## this is a comment.
-    ...text ...
-
-A multiline version exists using ``<%doc> ...text... </%doc>``:
-
-.. sourcecode:: mako
-
-    <%doc>
-        these are comments
-        more comments
-    </%doc>
-
-Newline Filters
-===============
-
-The backslash ("``\``") character, placed at the end of any
-line, will consume the newline character before continuing to
-the next line:
-
-.. sourcecode:: mako
-
-    here is a line that goes onto \
-    another line.
-
-The above text evaluates to:
-
-.. sourcecode:: text
-
-    here is a line that goes onto another line.
-
-Python Blocks
-=============
-
-Any arbitrary block of python can be dropped in using the ``<%
-%>`` tags:
-
-.. sourcecode:: mako
-
-    this is a template
-    <%
-        x = db.get_resource('foo')
-        y = [z.element for z in x if x.frobnizzle==5]
-    %>
-    % for elem in y:
-        element: ${elem}
-    % endfor
-
-Within ``<% %>``, you're writing a regular block of Python code.
-While the code can appear with an arbitrary level of preceding
-whitespace, it has to be consistently formatted with itself.
-Mako's compiler will adjust the block of Python to be consistent
-with the surrounding generated Python code.
-
-Module-level Blocks
-===================
-
-A variant on ``<% %>`` is the module-level code block, denoted
-by ``<%! %>``. Code within these tags is executed at the module
-level of the template, and not within the rendering function of
-the template. Therefore, this code does not have access to the
-template's context and is only executed when the template is
-loaded into memory (which can be only once per application, or
-more, depending on the runtime environment). Use the ``<%! %>``
-tags to declare your template's imports, as well as any
-pure-Python functions you might want to declare:
-
-.. sourcecode:: mako
-
-    <%!
-        import mylib
-        import re
-
-        def filter(text):
-            return re.sub(r'^@', '', text)
-    %>
-
-Any number of ``<%! %>`` blocks can be declared anywhere in a
-template; they will be rendered in the resulting module 
-in a single contiguous block above all render callables,
-in the order in which they appear in the source template.
-
-Tags
-====
-
-The rest of what Mako offers takes place in the form of tags.
-All tags use the same syntax, which is similar to an XML tag
-except that the first character of the tag name is a ``%``
-character. The tag is closed either by a contained slash
-character, or an explicit closing tag:
-
-.. sourcecode:: mako
-
-    <%include file="foo.txt"/>
-
-    <%def name="foo" buffered="True">
-        this is a def
-    </%def>
-
-All tags have a set of attributes which are defined for each
-tag. Some of these attributes are required. Also, many
-attributes support **evaluation**, meaning you can embed an
-expression (using ``${}``) inside the attribute text:
-
-.. sourcecode:: mako
-
-    <%include file="/foo/bar/${myfile}.txt"/>
-
-Whether or not an attribute accepts runtime evaluation depends
-on the type of tag and how that tag is compiled into the
-template. The best way to find out if you can stick an
-expression in is to try it! The lexer will tell you if it's not
-valid.
-
-Heres a quick summary of all the tags:
-
-``<%page>``
------------
-
-This tag defines general characteristics of the template,
-including caching arguments, and optional lists of arguments
-which the template expects when invoked.
-
-.. sourcecode:: mako
-
-    <%page args="x, y, z='default'"/>
-
-Or a page tag that defines caching characteristics:
-
-.. sourcecode:: mako
-
-    <%page cached="True" cache_type="memory"/>
-
-Currently, only one ``<%page>`` tag gets used per template, the
-rest get ignored. While this will be improved in a future
-release, for now make sure you have only one ``<%page>`` tag
-defined in your template, else you may not get the results you
-want. The details of what ``<%page>`` is used for are described
-further in :ref:`namespaces_body` as well as :ref:`caching_toplevel`.
-
-``<%include>``
---------------
-
-A tag that is familiar from other template languages, ``%include``
-is a regular joe that just accepts a file argument and calls in
-the rendered result of that file:
-
-.. sourcecode:: mako
-
-    <%include file="header.html"/>
-
-        hello world
-
-    <%include file="footer.html"/>
-
-Include also accepts arguments which are available as ``<%page>`` arguments in the receiving template:
-
-.. sourcecode:: mako
-
-    <%include file="toolbar.html" args="current_section='members', username='ed'"/>
-
-``<%def>``
-----------
-
-The ``%def`` tag defines a Python function which contains a set
-of content, that can be called at some other point in the
-template. The basic idea is simple:
-
-.. sourcecode:: mako
-
-    <%def name="myfunc(x)">
-        this is myfunc, x is ${x}
-    </%def>
-
-    ${myfunc(7)}
-
-The ``%def`` tag is a lot more powerful than a plain Python ``def``, as
-the Mako compiler provides many extra services with ``%def`` that
-you wouldn't normally have, such as the ability to export defs
-as template "methods", automatic propagation of the current
-:class:`.Context`, buffering/filtering/caching flags, and def calls
-with content, which enable packages of defs to be sent as
-arguments to other def calls (not as hard as it sounds). Get the
-full deal on what ``%def`` can do in :ref:`defs_toplevel`.
-
-``<%block>``
-------------
-
-``%block`` is a tag that is close to a ``%def``,
-except executes itself immediately in its base-most scope,
-and can also be anonymous (i.e. with no name):
-
-.. sourcecode:: mako
-
-    <%block filter="h">
-        some <html> stuff.
-    </%block>
-
-Inspired by Jinja2 blocks, named blocks offer a syntactically pleasing way
-to do inheritance:
-
-.. sourcecode:: mako
-
-    <html>
-        <body>
-        <%block name="header">
-            <h2><%block name="title"/></h2>
-        </%block>
-        ${self.body()}
-        </body>
-    </html>
-
-Blocks are introduced in :ref:`blocks` and further described in :ref:`inheritance_toplevel`.
-
-.. versionadded:: 0.4.1
-
-``<%namespace>``
-----------------
-
-``%namespace`` is Mako's equivalent of Python's ``import``
-statement. It allows access to all the rendering functions and
-metadata of other template files, plain Python modules, as well
-as locally defined "packages" of functions.
-
-.. sourcecode:: mako
-
-    <%namespace file="functions.html" import="*"/>
-
-The underlying object generated by ``%namespace``, an instance of
-:class:`.mako.runtime.Namespace`, is a central construct used in
-templates to reference template-specific information such as the
-current URI, inheritance structures, and other things that are
-not as hard as they sound right here. Namespaces are described
-in :ref:`namespaces_toplevel`.
-
-``<%inherit>``
---------------
-
-Inherit allows templates to arrange themselves in **inheritance
-chains**. This is a concept familiar in many other template
-languages.
-
-.. sourcecode:: mako
-
-    <%inherit file="base.html"/>
-
-When using the ``%inherit`` tag, control is passed to the topmost
-inherited template first, which then decides how to handle
-calling areas of content from its inheriting templates. Mako
-offers a lot of flexibility in this area, including dynamic
-inheritance, content wrapping, and polymorphic method calls.
-Check it out in :ref:`inheritance_toplevel`.
-
-``<%``\ nsname\ ``:``\ defname\ ``>``
--------------------------------------
-
-Any user-defined "tag" can be created against
-a namespace by using a tag with a name of the form
-``<%<namespacename>:<defname>>``. The closed and open formats of such a
-tag are equivalent to an inline expression and the ``<%call>``
-tag, respectively.
-
-.. sourcecode:: mako
-
-    <%mynamespace:somedef param="some value">
-        this is the body
-    </%mynamespace:somedef>
-
-To create custom tags which accept a body, see
-:ref:`defs_with_content`.
-
-.. versionadded:: 0.2.3
-
-``<%call>``
------------
-
-The call tag is the "classic" form of a user-defined tag, and is
-roughly equivalent to the ``<%namespacename:defname>`` syntax
-described above. This tag is also described in :ref:`defs_with_content`.
-
-``<%doc>``
-----------
-
-The ``%doc`` tag handles multiline comments:
-
-.. sourcecode:: mako
-
-    <%doc>
-        these are comments
-        more comments
-    </%doc>
-
-Also the ``##`` symbol as the first non-space characters on a line can be used for single line comments.
-
-``<%text>``
------------
-
-This tag suspends the Mako lexer's normal parsing of Mako
-template directives, and returns its entire body contents as
-plain text. It is used pretty much to write documentation about
-Mako:
-
-.. sourcecode:: mako
-
-    <%text filter="h">
-        heres some fake mako ${syntax}
-        <%def name="x()">${x}</%def>
-    </%text>
-
-Returning Early from a Template
-===============================
-
-Sometimes you want to stop processing a template or ``<%def>``
-method in the middle and just use the text you've accumulated so
-far. You can use a ``return`` statement inside a Python
-block to do that.
-
-.. sourcecode:: mako
-
-    % if not len(records):
-        No records found.
-        <% return %>
-    % endif
-
-Or perhaps:
-
-.. sourcecode:: mako
-
-    <%
-        if not len(records):
-            return
-    %>
-
diff --git a/lib/mako-0.7.2/doc/_sources/unicode.txt b/lib/mako-0.7.2/doc/_sources/unicode.txt
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_sources/unicode.txt
+++ /dev/null
@@ -1,345 +0,0 @@
-.. _unicode_toplevel:
-
-===================
-The Unicode Chapter
-===================
-
-The Python language supports two ways of representing what we
-know as "strings", i.e. series of characters. In Python 2, the
-two types are ``string`` and ``unicode``, and in Python 3 they are
-``bytes`` and ``string``. A key aspect of the Python 2 ``string`` and
-Python 3 ``bytes`` types are that they contain no information
-regarding what **encoding** the data is stored in. For this
-reason they were commonly referred to as **byte strings** on
-Python 2, and Python 3 makes this name more explicit. The
-origins of this come from Python's background of being developed
-before the Unicode standard was even available, back when
-strings were C-style strings and were just that, a series of
-bytes. Strings that had only values below 128 just happened to
-be **ASCII** strings and were printable on the console, whereas
-strings with values above 128 would produce all kinds of
-graphical characters and bells.
-
-Contrast the "byte-string" type with the "unicode/string" type.
-Objects of this latter type are created whenever you say something like
-``u"hello world"`` (or in Python 3, just ``"hello world"``). In this
-case, Python represents each character in the string internally
-using multiple bytes per character (something similar to
-UTF-16). What's important is that when using the
-``unicode``/``string`` type to store strings, Python knows the
-data's encoding; it's in its own internal format. Whereas when
-using the ``string``/``bytes`` type, it does not.
-
-When Python 2 attempts to treat a byte-string as a string, which
-means it's attempting to compare/parse its characters, to coerce
-it into another encoding, or to decode it to a unicode object,
-it has to guess what the encoding is. In this case, it will
-pretty much always guess the encoding as ``ascii``... and if the
-byte-string contains bytes above value 128, you'll get an error.
-Python 3 eliminates much of this confusion by just raising an
-error unconditionally if a byte-string is used in a
-character-aware context.
-
-There is one operation that Python *can* do with a non-ASCII
-byte-string, and it's a great source of confusion: it can dump the
-byte-string straight out to a stream or a file, with nary a care
-what the encoding is. To Python, this is pretty much like
-dumping any other kind of binary data (like an image) to a
-stream somewhere. In Python 2, it is common to see programs that
-embed all kinds of international characters and encodings into
-plain byte-strings (i.e. using ``"hello world"`` style literals)
-can fly right through their run, sending reams of strings out to
-wherever they are going, and the programmer, seeing the same
-output as was expressed in the input, is now under the illusion
-that his or her program is Unicode-compliant. In fact, their
-program has no unicode awareness whatsoever, and similarly has
-no ability to interact with libraries that *are* unicode aware.
-Python 3 makes this much less likely by defaulting to unicode as
-the storage format for strings.
-
-The "pass through encoded data" scheme is what template
-languages like Cheetah and earlier versions of Myghty do by
-default. Mako as of version 0.2 also supports this mode of
-operation when using Python 2, using the ``disable_unicode=True``
-flag. However, when using Mako in its default mode of
-unicode-aware, it requires explicitness when dealing with
-non-ASCII encodings. Additionally, if you ever need to handle
-unicode strings and other kinds of encoding conversions more
-intelligently, the usage of raw byte-strings quickly becomes a
-nightmare, since you are sending the Python interpreter
-collections of bytes for which it can make no intelligent
-decisions with regards to encoding. In Python 3 Mako only allows
-usage of native, unicode strings.
-
-In normal Mako operation, all parsed template constructs and
-output streams are handled internally as Python ``unicode``
-objects. It's only at the point of :meth:`~.Template.render` that this unicode
-stream may be rendered into whatever the desired output encoding
-is. The implication here is that the template developer must
-:ensure that :ref:`the encoding of all non-ASCII templates is explicit
-<set_template_file_encoding>` (still required in Python 3),
-that :ref:`all non-ASCII-encoded expressions are in one way or another
-converted to unicode <handling_non_ascii_expressions>`
-(not much of a burden in Python 3), and that :ref:`the output stream of the
-template is handled as a unicode stream being encoded to some
-encoding <defining_output_encoding>` (still required in Python 3).
-
-.. _set_template_file_encoding:
-
-Specifying the Encoding of a Template File
-==========================================
-
-This is the most basic encoding-related setting, and it is
-equivalent to Python's "magic encoding comment", as described in
-`pep-0263 <http://www.python.org/dev/peps/pep-0263/>`_. Any
-template that contains non-ASCII characters requires that this
-comment be present so that Mako can decode to unicode (and also
-make usage of Python's AST parsing services). Mako's lexer will
-use this encoding in order to convert the template source into a
-``unicode`` object before continuing its parsing:
-
-.. sourcecode:: mako
-
-    ## -*- coding: utf-8 -*-
-
-    Alors vous imaginez ma surprise, au lever du jour, quand 
-    une drôle de petite voix m’a réveillé. Elle disait:
-     « S’il vous plaît… dessine-moi un mouton! »
-
-For the picky, the regular expression used is derived from that
-of the above mentioned pep:
-
-.. sourcecode:: python
-
-    #.*coding[:=]\s*([-\w.]+).*\n
-
-The lexer will convert to unicode in all cases, so that if any
-characters exist in the template that are outside of the
-specified encoding (or the default of ``ascii``), the error will
-be immediate.
-
-As an alternative, the template encoding can be specified
-programmatically to either :class:`.Template` or :class:`.TemplateLookup` via
-the ``input_encoding`` parameter:
-
-.. sourcecode:: python
-
-    t = TemplateLookup(directories=['./'], input_encoding='utf-8')
-
-The above will assume all located templates specify ``utf-8``
-encoding, unless the template itself contains its own magic
-encoding comment, which takes precedence.
-
-.. _handling_non_ascii_expressions:
-
-Handling Expressions
-====================
-
-The next area that encoding comes into play is in expression
-constructs. By default, Mako's treatment of an expression like
-this:
-
-.. sourcecode:: mako
-
-    ${"hello world"}
-
-looks something like this:
-
-.. sourcecode:: python
-
-    context.write(unicode("hello world"))
-
-In Python 3, it's just:
-
-.. sourcecode:: python
-
-    context.write(str("hello world"))
-
-That is, **the output of all expressions is run through the
-``unicode`` built-in**. This is the default setting, and can be
-modified to expect various encodings. The ``unicode`` step serves
-both the purpose of rendering non-string expressions into
-strings (such as integers or objects which contain ``__str()__``
-methods), and to ensure that the final output stream is
-constructed as a unicode object. The main implication of this is
-that **any raw byte-strings that contain an encoding other than
-ASCII must first be decoded to a Python unicode object**. It
-means you can't say this in Python 2:
-
-.. sourcecode:: mako
-
-    ${"voix m’a réveillé."}  ## error in Python 2!
-
-You must instead say this:
-
-.. sourcecode:: mako
-
-    ${u"voix m’a réveillé."}  ## OK !
-
-Similarly, if you are reading data from a file that is streaming
-bytes, or returning data from some object that is returning a
-Python byte-string containing a non-ASCII encoding, you have to
-explicitly decode to unicode first, such as:
-
-.. sourcecode:: mako
-
-    ${call_my_object().decode('utf-8')}
-
-Note that filehandles acquired by ``open()`` in Python 3 default
-to returning "text", that is the decoding is done for you. See
-Python 3's documentation for the ``open()`` built-in for details on
-this.
-
-If you want a certain encoding applied to *all* expressions,
-override the ``unicode`` builtin with the ``decode`` built-in at the
-:class:`.Template` or :class:`.TemplateLookup` level:
-
-.. sourcecode:: python
-
-    t = Template(templatetext, default_filters=['decode.utf8'])
-
-Note that the built-in ``decode`` object is slower than the
-``unicode`` function, since unlike ``unicode`` it's not a Python
-built-in, and it also checks the type of the incoming data to
-determine if string conversion is needed first.
-
-The ``default_filters`` argument can be used to entirely customize
-the filtering process of expressions. This argument is described
-in :ref:`filtering_default_filters`.
-
-.. _defining_output_encoding:
-
-Defining Output Encoding
-========================
-
-Now that we have a template which produces a pure unicode output
-stream, all the hard work is done. We can take the output and do
-anything with it.
-
-As stated in the :doc:`"Usage" chapter <usage>`, both :class:`.Template` and
-:class:`.TemplateLookup` accept ``output_encoding`` and ``encoding_errors``
-parameters which can be used to encode the output in any Python
-supported codec:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-    from mako.lookup import TemplateLookup
-
-    mylookup = TemplateLookup(directories=['/docs'], output_encoding='utf-8', encoding_errors='replace')
-
-    mytemplate = mylookup.get_template("foo.txt")
-    print mytemplate.render()
-
-:meth:`~.Template.render` will return a ``bytes`` object in Python 3 if an output
-encoding is specified. By default it performs no encoding and
-returns a native string.
-
-:meth:`~.Template.render_unicode` will return the template output as a Python
-``unicode`` object (or ``string`` in Python 3):
-
-.. sourcecode:: python
-
-    print mytemplate.render_unicode()
-
-The above method disgards the output encoding keyword argument;
-you can encode yourself by saying:
-
-.. sourcecode:: python
-
-    print mytemplate.render_unicode().encode('utf-8', 'replace')
-
-Buffer Selection
-----------------
-
-Mako does play some games with the style of buffering used
-internally, to maximize performance. Since the buffer is by far
-the most heavily used object in a render operation, it's
-important!
-
-When calling :meth:`~.Template.render` on a template that does not specify any
-output encoding (i.e. it's ``ascii``), Python's ``cStringIO`` module,
-which cannot handle encoding of non-ASCII ``unicode`` objects
-(even though it can send raw byte-strings through), is used for
-buffering. Otherwise, a custom Mako class called
-``FastEncodingBuffer`` is used, which essentially is a super
-dumbed-down version of ``StringIO`` that gathers all strings into
-a list and uses ``u''.join(elements)`` to produce the final output
--- it's markedly faster than ``StringIO``.
-
-.. _unicode_disabled:
-
-Saying to Heck with It: Disabling the Usage of Unicode Entirely
-===============================================================
-
-Some segments of Mako's userbase choose to make no usage of
-Unicode whatsoever, and instead would prefer the "pass through"
-approach; all string expressions in their templates return
-encoded byte-strings, and they would like these strings to pass
-right through. The only advantage to this approach is that
-templates need not use ``u""`` for literal strings; there's an
-arguable speed improvement as well since raw byte-strings
-generally perform slightly faster than unicode objects in
-Python. For these users, assuming they're sticking with Python
-2, they can hit the ``disable_unicode=True`` flag as so:
-
-.. sourcecode:: python
-
-    # -*- encoding:utf-8 -*-
-    from mako.template import Template
-
-    t = Template("drôle de petite voix m’a réveillé.", disable_unicode=True, input_encoding='utf-8')
-    print t.code
-
-The ``disable_unicode`` mode is strictly a Python 2 thing. It is
-not supported at all in Python 3.
-
-The generated module source code will contain elements like
-these:
-
-.. sourcecode:: python
-
-    # -*- encoding:utf-8 -*-
-    #  ...more generated code ...
-
-    def render_body(context,**pageargs):
-        context.caller_stack.push_frame()
-        try:
-            __M_locals = dict(pageargs=pageargs)
-            # SOURCE LINE 1
-            context.write('dr\xc3\xb4le de petite voix m\xe2\x80\x99a r\xc3\xa9veill\xc3\xa9.')
-            return ''
-        finally:
-            context.caller_stack.pop_frame()
-
-Where above that the string literal used within :meth:`.Context.write`
-is a regular byte-string.
-
-When ``disable_unicode=True`` is turned on, the ``default_filters``
-argument which normally defaults to ``["unicode"]`` now defaults
-to ``["str"]`` instead. Setting ``default_filters`` to the empty list
-``[]`` can remove the overhead of the ``str`` call. Also, in this
-mode you **cannot** safely call :meth:`~.Template.render_unicode` -- you'll get
-unicode/decode errors.
-
-The ``h`` filter (HTML escape) uses a less performant pure Python
-escape function in non-unicode mode. This because
-MarkupSafe only supports Python unicode objects for non-ASCII
-strings.
-
-.. versionchanged:: 0.3.4
-   In prior versions, it used ``cgi.escape()``, which has been replaced
-   with a function that also escapes single quotes.
-
-Rules for using ``disable_unicode=True``
-----------------------------------------
-
-* Don't use this mode unless you really, really want to and you
-  absolutely understand what you're doing.
-* Don't use this option just because you don't want to learn to
-  use Unicode properly; we aren't supporting user issues in this
-  mode of operation. We will however offer generous help for the
-  vast majority of users who stick to the Unicode program.
-* Python 3 is unicode by default, and the flag is not available
-  when running on Python 3.
-
diff --git a/lib/mako-0.7.2/doc/_sources/usage.txt b/lib/mako-0.7.2/doc/_sources/usage.txt
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_sources/usage.txt
+++ /dev/null
@@ -1,520 +0,0 @@
-.. _usage_toplevel:
-
-=====
-Usage
-=====
-
-Basic Usage
-===========
-
-This section describes the Python API for Mako templates. If you
-are using Mako within a web framework such as Pylons, the work
-of integrating Mako's API is already done for you, in which case
-you can skip to the next section, :ref:`syntax_toplevel`.
-
-The most basic way to create a template and render it is through
-the :class:`.Template` class:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-
-    mytemplate = Template("hello world!")
-    print mytemplate.render()
-
-Above, the text argument to :class:`.Template` is **compiled** into a
-Python module representation. This module contains a function
-called ``render_body()``, which produces the output of the
-template. When ``mytemplate.render()`` is called, Mako sets up a
-runtime environment for the template and calls the
-``render_body()`` function, capturing the output into a buffer and
-returning its string contents.
-
-
-The code inside the ``render_body()`` function has access to a
-namespace of variables. You can specify these variables by
-sending them as additional keyword arguments to the :meth:`~.Template.render`
-method:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-
-    mytemplate = Template("hello, ${name}!")
-    print mytemplate.render(name="jack")
-
-The :meth:`~.Template.render` method calls upon Mako to create a
-:class:`.Context` object, which stores all the variable names accessible
-to the template and also stores a buffer used to capture output.
-You can create this :class:`.Context` yourself and have the template
-render with it, using the :meth:`~.Template.render_context` method:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-    from mako.runtime import Context
-    from StringIO import StringIO
-
-    mytemplate = Template("hello, ${name}!")
-    buf = StringIO()
-    ctx = Context(buf, name="jack")
-    mytemplate.render_context(ctx)
-    print buf.getvalue()
-
-Using File-Based Templates
-==========================
-
-A :class:`.Template` can also load its template source code from a file,
-using the ``filename`` keyword argument:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-
-    mytemplate = Template(filename='/docs/mytmpl.txt')
-    print mytemplate.render()
-
-For improved performance, a :class:`.Template` which is loaded from a
-file can also cache the source code to its generated module on
-the filesystem as a regular Python module file (i.e. a ``.py``
-file). To do this, just add the ``module_directory`` argument to
-the template:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-
-    mytemplate = Template(filename='/docs/mytmpl.txt', module_directory='/tmp/mako_modules')
-    print mytemplate.render()
-
-When the above code is rendered, a file
-``/tmp/mako_modules/docs/mytmpl.txt.py`` is created containing the
-source code for the module. The next time a :class:`.Template` with the
-same arguments is created, this module file will be
-automatically re-used.
-
-.. _usage_templatelookup:
-
-Using ``TemplateLookup``
-========================
-
-All of the examples thus far have dealt with the usage of a
-single :class:`.Template` object. If the code within those templates
-tries to locate another template resource, it will need some way
-to find them, using simple URI strings. For this need, the
-resolution of other templates from within a template is
-accomplished by the :class:`.TemplateLookup` class. This class is
-constructed given a list of directories in which to search for
-templates, as well as keyword arguments that will be passed to
-the :class:`.Template` objects it creates:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-    from mako.lookup import TemplateLookup
-
-    mylookup = TemplateLookup(directories=['/docs'])
-    mytemplate = Template("""<%include file="header.txt"/> hello world!""", lookup=mylookup)
-
-Above, we created a textual template which includes the file
-``"header.txt"``. In order for it to have somewhere to look for
-``"header.txt"``, we passed a :class:`.TemplateLookup` object to it, which
-will search in the directory ``/docs`` for the file ``"header.txt"``.
-
-Usually, an application will store most or all of its templates
-as text files on the filesystem. So far, all of our examples
-have been a little bit contrived in order to illustrate the
-basic concepts. But a real application would get most or all of
-its templates directly from the :class:`.TemplateLookup`, using the
-aptly named :meth:`~.TemplateLookup.get_template` method, which accepts the URI of the
-desired template:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-    from mako.lookup import TemplateLookup
-
-    mylookup = TemplateLookup(directories=['/docs'], module_directory='/tmp/mako_modules')
-
-    def serve_template(templatename, **kwargs):
-        mytemplate = mylookup.get_template(templatename)
-        print mytemplate.render(**kwargs)
-
-In the example above, we create a :class:`.TemplateLookup` which will
-look for templates in the ``/docs`` directory, and will store
-generated module files in the ``/tmp/mako_modules`` directory. The
-lookup locates templates by appending the given URI to each of
-its search directories; so if you gave it a URI of
-``/etc/beans/info.txt``, it would search for the file
-``/docs/etc/beans/info.txt``, else raise a :class:`.TopLevelNotFound`
-exception, which is a custom Mako exception.
-
-When the lookup locates templates, it will also assign a ``uri``
-property to the :class:`.Template` which is the URI passed to the
-:meth:`~.TemplateLookup.get_template()` call. :class:`.Template` uses this URI to calculate the
-name of its module file. So in the above example, a
-``templatename`` argument of ``/etc/beans/info.txt`` will create a
-module file ``/tmp/mako_modules/etc/beans/info.txt.py``.
-
-Setting the Collection Size
----------------------------
-
-The :class:`.TemplateLookup` also serves the important need of caching a
-fixed set of templates in memory at a given time, so that
-successive URI lookups do not result in full template
-compilations and/or module reloads on each request. By default,
-the :class:`.TemplateLookup` size is unbounded. You can specify a fixed
-size using the ``collection_size`` argument:
-
-.. sourcecode:: python
-
-    mylookup = TemplateLookup(directories=['/docs'],
-                    module_directory='/tmp/mako_modules', collection_size=500)
-
-The above lookup will continue to load templates into memory
-until it reaches a count of around 500. At that point, it will
-clean out a certain percentage of templates using a least
-recently used scheme.
-
-Setting Filesystem Checks
--------------------------
-
-Another important flag on :class:`.TemplateLookup` is
-``filesystem_checks``. This defaults to ``True``, and says that each
-time a template is returned by the :meth:`~.TemplateLookup.get_template()` method, the
-revision time of the original template file is checked against
-the last time the template was loaded, and if the file is newer
-will reload its contents and recompile the template. On a
-production system, setting ``filesystem_checks`` to ``False`` can
-afford a small to moderate performance increase (depending on
-the type of filesystem used).
-
-.. _usage_unicode:
-
-Using Unicode and Encoding
-==========================
-
-Both :class:`.Template` and :class:`.TemplateLookup` accept ``output_encoding``
-and ``encoding_errors`` parameters which can be used to encode the
-output in any Python supported codec:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-    from mako.lookup import TemplateLookup
-
-    mylookup = TemplateLookup(directories=['/docs'], output_encoding='utf-8', encoding_errors='replace')
-
-    mytemplate = mylookup.get_template("foo.txt")
-    print mytemplate.render()
-
-When using Python 3, the :meth:`~.Template.render` method will return a ``bytes``
-object, **if** ``output_encoding`` is set. Otherwise it returns a
-``string``.
-
-Additionally, the :meth:`~.Template.render_unicode()` method exists which will
-return the template output as a Python ``unicode`` object, or in
-Python 3 a ``string``:
-
-.. sourcecode:: python
-
-    print mytemplate.render_unicode()
-
-The above method disregards the output encoding keyword
-argument; you can encode yourself by saying:
-
-.. sourcecode:: python
-
-    print mytemplate.render_unicode().encode('utf-8', 'replace')
-
-Note that Mako's ability to return data in any encoding and/or
-``unicode`` implies that the underlying output stream of the
-template is a Python unicode object. This behavior is described
-fully in :ref:`unicode_toplevel`.
-
-.. _handling_exceptions:
-
-Handling Exceptions
-===================
-
-Template exceptions can occur in two distinct places. One is
-when you **lookup, parse and compile** the template, the other
-is when you **run** the template. Within the running of a
-template, exceptions are thrown normally from whatever Python
-code originated the issue. Mako has its own set of exception
-classes which mostly apply to the lookup and lexer/compiler
-stages of template construction. Mako provides some library
-routines that can be used to help provide Mako-specific
-information about any exception's stack trace, as well as
-formatting the exception within textual or HTML format. In all
-cases, the main value of these handlers is that of converting
-Python filenames, line numbers, and code samples into Mako
-template filenames, line numbers, and code samples. All lines
-within a stack trace which correspond to a Mako template module
-will be converted to be against the originating template file.
-
-To format exception traces, the :func:`.text_error_template` and
-:func:`.html_error_template` functions are provided. They make usage of
-``sys.exc_info()`` to get at the most recently thrown exception.
-Usage of these handlers usually looks like:
-
-.. sourcecode:: python
-
-    from mako import exceptions
-
-    try:
-        template = lookup.get_template(uri)
-        print template.render()
-    except:
-        print exceptions.text_error_template().render()
-
-Or for the HTML render function:
-
-.. sourcecode:: python
-
-    from mako import exceptions
-
-    try:
-        template = lookup.get_template(uri)
-        print template.render()
-    except:
-        print exceptions.html_error_template().render()
-
-The :func:`.html_error_template` template accepts two options:
-specifying ``full=False`` causes only a section of an HTML
-document to be rendered. Specifying ``css=False`` will disable the
-default stylesheet from being rendered.
-
-E.g.:
-
-.. sourcecode:: python
-
-    print exceptions.html_error_template().render(full=False)
-
-The HTML render function is also available built-in to
-:class:`.Template` using the ``format_exceptions`` flag. In this case, any
-exceptions raised within the **render** stage of the template
-will result in the output being substituted with the output of
-:func:`.html_error_template`:
-
-.. sourcecode:: python
-
-    template = Template(filename="/foo/bar", format_exceptions=True)
-    print template.render()
-
-Note that the compile stage of the above template occurs when
-you construct the :class:`.Template` itself, and no output stream is
-defined. Therefore exceptions which occur within the
-lookup/parse/compile stage will not be handled and will
-propagate normally. While the pre-render traceback usually will
-not include any Mako-specific lines anyway, it will mean that
-exceptions which occur previous to rendering and those which
-occur within rendering will be handled differently... so the
-``try``/``except`` patterns described previously are probably of more
-general use.
-
-The underlying object used by the error template functions is
-the :class:`.RichTraceback` object. This object can also be used
-directly to provide custom error views. Here's an example usage
-which describes its general API:
-
-.. sourcecode:: python
-
-    from mako.exceptions import RichTraceback
-
-    try:
-        template = lookup.get_template(uri)
-        print template.render()
-    except:
-        traceback = RichTraceback()
-        for (filename, lineno, function, line) in traceback.traceback:
-            print "File %s, line %s, in %s" % (filename, lineno, function)
-            print line, "\n"
-        print "%s: %s" % (str(traceback.error.__class__.__name__), traceback.error)
-
-Common Framework Integrations
-=============================
-
-The Mako distribution includes a little bit of helper code for
-the purpose of using Mako in some popular web framework
-scenarios. This is a brief description of what's included.
-
-WSGI
-----
-
-A sample WSGI application is included in the distribution in the
-file ``examples/wsgi/run_wsgi.py``. This runner is set up to pull
-files from a `templates` as well as an `htdocs` directory and
-includes a rudimental two-file layout. The WSGI runner acts as a
-fully functional standalone web server, using ``wsgiutils`` to run
-itself, and propagates GET and POST arguments from the request
-into the :class:`.Context`, can serve images, CSS files and other kinds
-of files, and also displays errors using Mako's included
-exception-handling utilities.
-
-Pygments
---------
-
-A `Pygments <http://pygments.pocoo.org>`_-compatible syntax
-highlighting module is included under :mod:`mako.ext.pygmentplugin`.
-This module is used in the generation of Mako documentation and
-also contains various `setuptools` entry points under the heading
-``pygments.lexers``, including ``mako``, ``html+mako``, ``xml+mako``
-(see the ``setup.py`` file for all the entry points).
-
-Babel
------
-
-Mako provides support for extracting `gettext` messages from
-templates via a `Babel`_ extractor
-entry point under ``mako.ext.babelplugin``.
-
-`Gettext` messages are extracted from all Python code sections,
-including those of control lines and expressions embedded
-in tags.
-
-`Translator
-comments <http://babel.edgewall.org/wiki/Documentation/messages.html#comments-tags-and-translator-comments-explanation>`_
-may also be extracted from Mako templates when a comment tag is
-specified to `Babel`_ (such as with
-the ``-c`` option).
-
-For example, a project ``"myproj"`` contains the following Mako
-template at ``myproj/myproj/templates/name.html``:
-
-.. sourcecode:: mako
-
-    <div id="name">
-      Name:
-      ## TRANSLATORS: This is a proper name. See the gettext
-      ## manual, section Names.
-      ${_('Francois Pinard')}
-    </div>
-
-To extract gettext messages from this template the project needs
-a Mako section in its `Babel Extraction Method Mapping
-file <http://babel.edgewall.org/wiki/Documentation/messages.html#extraction-method-mapping-and-configuration>`_
-(typically located at ``myproj/babel.cfg``):
-
-.. sourcecode:: cfg
-
-    # Extraction from Python source files
-
-    [python: myproj/**.py]
-
-    # Extraction from Mako templates
-
-    [mako: myproj/templates/**.html]
-    input_encoding = utf-8
-
-The Mako extractor supports an optional ``input_encoding``
-parameter specifying the encoding of the templates (identical to
-:class:`.Template`/:class:`.TemplateLookup`'s ``input_encoding`` parameter).
-
-Invoking `Babel`_'s extractor at the
-command line in the project's root directory:
-
-.. sourcecode:: sh
-
-    myproj$ pybabel extract -F babel.cfg -c "TRANSLATORS:" .
-
-will output a `gettext` catalog to `stdout` including the following:
-
-.. sourcecode:: pot
-
-    #. TRANSLATORS: This is a proper name. See the gettext
-    #. manual, section Names.
-    #: myproj/templates/name.html:5
-    msgid "Francois Pinard"
-    msgstr ""
-
-This is only a basic example:
-`Babel`_ can be invoked from ``setup.py``
-and its command line options specified in the accompanying
-``setup.cfg`` via `Babel Distutils/Setuptools
-Integration <http://babel.edgewall.org/wiki/Documentation/setup.html>`_.
-
-Comments must immediately precede a `gettext` message to be
-extracted. In the following case the ``TRANSLATORS:`` comment would
-not have been extracted:
-
-.. sourcecode:: mako
-
-    <div id="name">
-      ## TRANSLATORS: This is a proper name. See the gettext
-      ## manual, section Names.
-      Name: ${_('Francois Pinard')}
-    </div>
-
-See the `Babel User
-Guide <http://babel.edgewall.org/wiki/Documentation/index.html>`_
-for more information.
-
-.. _babel: http://babel.edgewall.org/
-
-
-API Reference
-=============
-
-.. autoclass:: mako.template.Template
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.template.DefTemplate
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.lookup.TemplateCollection
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.lookup.TemplateLookup
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.exceptions.RichTraceback
-    :show-inheritance:
-
-    .. py:attribute:: error
-
-       the exception instance.
-
-    .. py:attribute:: message
-
-       the exception error message as unicode.
-
-    .. py:attribute:: source
-
-       source code of the file where the error occurred.
-       If the error occurred within a compiled template,
-       this is the template source.
-
-    .. py:attribute:: lineno
-
-       line number where the error occurred.  If the error
-       occurred within a compiled template, the line number
-       is adjusted to that of the template source.
-
-    .. py:attribute:: records
-
-       a list of 8-tuples containing the original
-       python traceback elements, plus the
-       filename, line number, source line, and full template source
-       for the traceline mapped back to its originating source
-       template, if any for that traceline (else the fields are ``None``).
-
-    .. py:attribute:: reverse_records
-
-       the list of records in reverse
-       traceback -- a list of 4-tuples, in the same format as a regular
-       python traceback, with template-corresponding
-       traceback records replacing the originals.
-
-    .. py:attribute:: reverse_traceback
-
-       the traceback list in reverse.
-
-.. autofunction:: mako.exceptions.html_error_template
-
-.. autofunction:: mako.exceptions.text_error_template
-
diff --git a/lib/mako-0.7.2/doc/_static/basic.css b/lib/mako-0.7.2/doc/_static/basic.css
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_static/basic.css
+++ /dev/null
@@ -1,540 +0,0 @@
-/*
- * basic.css
- * ~~~~~~~~~
- *
- * Sphinx stylesheet -- basic theme.
- *
- * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-/* -- main layout ----------------------------------------------------------- */
-
-div.clearer {
-    clear: both;
-}
-
-/* -- relbar ---------------------------------------------------------------- */
-
-div.related {
-    width: 100%;
-    font-size: 90%;
-}
-
-div.related h3 {
-    display: none;
-}
-
-div.related ul {
-    margin: 0;
-    padding: 0 0 0 10px;
-    list-style: none;
-}
-
-div.related li {
-    display: inline;
-}
-
-div.related li.right {
-    float: right;
-    margin-right: 5px;
-}
-
-/* -- sidebar --------------------------------------------------------------- */
-
-div.sphinxsidebarwrapper {
-    padding: 10px 5px 0 10px;
-}
-
-div.sphinxsidebar {
-    float: left;
-    width: 230px;
-    margin-left: -100%;
-    font-size: 90%;
-}
-
-div.sphinxsidebar ul {
-    list-style: none;
-}
-
-div.sphinxsidebar ul ul,
-div.sphinxsidebar ul.want-points {
-    margin-left: 20px;
-    list-style: square;
-}
-
-div.sphinxsidebar ul ul {
-    margin-top: 0;
-    margin-bottom: 0;
-}
-
-div.sphinxsidebar form {
-    margin-top: 10px;
-}
-
-div.sphinxsidebar input {
-    border: 1px solid #98dbcc;
-    font-family: sans-serif;
-    font-size: 1em;
-}
-
-div.sphinxsidebar #searchbox input[type="text"] {
-    width: 170px;
-}
-
-div.sphinxsidebar #searchbox input[type="submit"] {
-    width: 30px;
-}
-
-img {
-    border: 0;
-}
-
-/* -- search page ----------------------------------------------------------- */
-
-ul.search {
-    margin: 10px 0 0 20px;
-    padding: 0;
-}
-
-ul.search li {
-    padding: 5px 0 5px 20px;
-    background-image: url(file.png);
-    background-repeat: no-repeat;
-    background-position: 0 7px;
-}
-
-ul.search li a {
-    font-weight: bold;
-}
-
-ul.search li div.context {
-    color: #888;
-    margin: 2px 0 0 30px;
-    text-align: left;
-}
-
-ul.keywordmatches li.goodmatch a {
-    font-weight: bold;
-}
-
-/* -- index page ------------------------------------------------------------ */
-
-table.contentstable {
-    width: 90%;
-}
-
-table.contentstable p.biglink {
-    line-height: 150%;
-}
-
-a.biglink {
-    font-size: 1.3em;
-}
-
-span.linkdescr {
-    font-style: italic;
-    padding-top: 5px;
-    font-size: 90%;
-}
-
-/* -- general index --------------------------------------------------------- */
-
-table.indextable {
-    width: 100%;
-}
-
-table.indextable td {
-    text-align: left;
-    vertical-align: top;
-}
-
-table.indextable dl, table.indextable dd {
-    margin-top: 0;
-    margin-bottom: 0;
-}
-
-table.indextable tr.pcap {
-    height: 10px;
-}
-
-table.indextable tr.cap {
-    margin-top: 10px;
-    background-color: #f2f2f2;
-}
-
-img.toggler {
-    margin-right: 3px;
-    margin-top: 3px;
-    cursor: pointer;
-}
-
-div.modindex-jumpbox {
-    border-top: 1px solid #ddd;
-    border-bottom: 1px solid #ddd;
-    margin: 1em 0 1em 0;
-    padding: 0.4em;
-}
-
-div.genindex-jumpbox {
-    border-top: 1px solid #ddd;
-    border-bottom: 1px solid #ddd;
-    margin: 1em 0 1em 0;
-    padding: 0.4em;
-}
-
-/* -- general body styles --------------------------------------------------- */
-
-a.headerlink {
-    visibility: hidden;
-}
-
-h1:hover > a.headerlink,
-h2:hover > a.headerlink,
-h3:hover > a.headerlink,
-h4:hover > a.headerlink,
-h5:hover > a.headerlink,
-h6:hover > a.headerlink,
-dt:hover > a.headerlink {
-    visibility: visible;
-}
-
-div.body p.caption {
-    text-align: inherit;
-}
-
-div.body td {
-    text-align: left;
-}
-
-.field-list ul {
-    padding-left: 1em;
-}
-
-.first {
-    margin-top: 0 !important;
-}
-
-p.rubric {
-    margin-top: 30px;
-    font-weight: bold;
-}
-
-img.align-left, .figure.align-left, object.align-left {
-    clear: left;
-    float: left;
-    margin-right: 1em;
-}
-
-img.align-right, .figure.align-right, object.align-right {
-    clear: right;
-    float: right;
-    margin-left: 1em;
-}
-
-img.align-center, .figure.align-center, object.align-center {
-  display: block;
-  margin-left: auto;
-  margin-right: auto;
-}
-
-.align-left {
-    text-align: left;
-}
-
-.align-center {
-    text-align: center;
-}
-
-.align-right {
-    text-align: right;
-}
-
-/* -- sidebars -------------------------------------------------------------- */
-
-div.sidebar {
-    margin: 0 0 0.5em 1em;
-    border: 1px solid #ddb;
-    padding: 7px 7px 0 7px;
-    background-color: #ffe;
-    width: 40%;
-    float: right;
-}
-
-p.sidebar-title {
-    font-weight: bold;
-}
-
-/* -- topics ---------------------------------------------------------------- */
-
-div.topic {
-    border: 1px solid #ccc;
-    padding: 7px 7px 0 7px;
-    margin: 10px 0 10px 0;
-}
-
-p.topic-title {
-    font-size: 1.1em;
-    font-weight: bold;
-    margin-top: 10px;
-}
-
-/* -- admonitions ----------------------------------------------------------- */
-
-div.admonition {
-    margin-top: 10px;
-    margin-bottom: 10px;
-    padding: 7px;
-}
-
-div.admonition dt {
-    font-weight: bold;
-}
-
-div.admonition dl {
-    margin-bottom: 0;
-}
-
-p.admonition-title {
-    margin: 0px 10px 5px 0px;
-    font-weight: bold;
-}
-
-div.body p.centered {
-    text-align: center;
-    margin-top: 25px;
-}
-
-/* -- tables ---------------------------------------------------------------- */
-
-table.docutils {
-    border: 0;
-    border-collapse: collapse;
-}
-
-table.docutils td, table.docutils th {
-    padding: 1px 8px 1px 5px;
-    border-top: 0;
-    border-left: 0;
-    border-right: 0;
-    border-bottom: 1px solid #aaa;
-}
-
-table.field-list td, table.field-list th {
-    border: 0 !important;
-}
-
-table.footnote td, table.footnote th {
-    border: 0 !important;
-}
-
-th {
-    text-align: left;
-    padding-right: 5px;
-}
-
-table.citation {
-    border-left: solid 1px gray;
-    margin-left: 1px;
-}
-
-table.citation td {
-    border-bottom: none;
-}
-
-/* -- other body styles ----------------------------------------------------- */
-
-ol.arabic {
-    list-style: decimal;
-}
-
-ol.loweralpha {
-    list-style: lower-alpha;
-}
-
-ol.upperalpha {
-    list-style: upper-alpha;
-}
-
-ol.lowerroman {
-    list-style: lower-roman;
-}
-
-ol.upperroman {
-    list-style: upper-roman;
-}
-
-dl {
-    margin-bottom: 15px;
-}
-
-dd p {
-    margin-top: 0px;
-}
-
-dd ul, dd table {
-    margin-bottom: 10px;
-}
-
-dd {
-    margin-top: 3px;
-    margin-bottom: 10px;
-    margin-left: 30px;
-}
-
-dt:target, .highlighted {
-    background-color: #fbe54e;
-}
-
-dl.glossary dt {
-    font-weight: bold;
-    font-size: 1.1em;
-}
-
-.field-list ul {
-    margin: 0;
-    padding-left: 1em;
-}
-
-.field-list p {
-    margin: 0;
-}
-
-.refcount {
-    color: #060;
-}
-
-.optional {
-    font-size: 1.3em;
-}
-
-.versionmodified {
-    font-style: italic;
-}
-
-.system-message {
-    background-color: #fda;
-    padding: 5px;
-    border: 3px solid red;
-}
-
-.footnote:target  {
-    background-color: #ffa;
-}
-
-.line-block {
-    display: block;
-    margin-top: 1em;
-    margin-bottom: 1em;
-}
-
-.line-block .line-block {
-    margin-top: 0;
-    margin-bottom: 0;
-    margin-left: 1.5em;
-}
-
-.guilabel, .menuselection {
-    font-family: sans-serif;
-}
-
-.accelerator {
-    text-decoration: underline;
-}
-
-.classifier {
-    font-style: oblique;
-}
-
-abbr, acronym {
-    border-bottom: dotted 1px;
-    cursor: help;
-}
-
-/* -- code displays --------------------------------------------------------- */
-
-pre {
-    overflow: auto;
-    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
-}
-
-td.linenos pre {
-    padding: 5px 0px;
-    border: 0;
-    background-color: transparent;
-    color: #aaa;
-}
-
-table.highlighttable {
-    margin-left: 0.5em;
-}
-
-table.highlighttable td {
-    padding: 0 0.5em 0 0.5em;
-}
-
-tt.descname {
-    background-color: transparent;
-    font-weight: bold;
-    font-size: 1.2em;
-}
-
-tt.descclassname {
-    background-color: transparent;
-}
-
-tt.xref, a tt {
-    background-color: transparent;
-    font-weight: bold;
-}
-
-h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
-    background-color: transparent;
-}
-
-.viewcode-link {
-    float: right;
-}
-
-.viewcode-back {
-    float: right;
-    font-family: sans-serif;
-}
-
-div.viewcode-block:target {
-    margin: -1px -10px;
-    padding: 0 10px;
-}
-
-/* -- math display ---------------------------------------------------------- */
-
-img.math {
-    vertical-align: middle;
-}
-
-div.body div.math p {
-    text-align: center;
-}
-
-span.eqno {
-    float: right;
-}
-
-/* -- printout stylesheet --------------------------------------------------- */
-
- at media print {
-    div.document,
-    div.documentwrapper,
-    div.bodywrapper {
-        margin: 0 !important;
-        width: 100%;
-    }
-
-    div.sphinxsidebar,
-    div.related,
-    div.footer,
-    #top-link {
-        display: none;
-    }
-}
\ No newline at end of file
diff --git a/lib/mako-0.7.2/doc/_static/comment-bright.png b/lib/mako-0.7.2/doc/_static/comment-bright.png
deleted file mode 100644
Binary file lib/mako-0.7.2/doc/_static/comment-bright.png has changed
diff --git a/lib/mako-0.7.2/doc/_static/comment-close.png b/lib/mako-0.7.2/doc/_static/comment-close.png
deleted file mode 100644
Binary file lib/mako-0.7.2/doc/_static/comment-close.png has changed
diff --git a/lib/mako-0.7.2/doc/_static/comment.png b/lib/mako-0.7.2/doc/_static/comment.png
deleted file mode 100644
Binary file lib/mako-0.7.2/doc/_static/comment.png has changed
diff --git a/lib/mako-0.7.2/doc/_static/default.css b/lib/mako-0.7.2/doc/_static/default.css
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_static/default.css
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * default.css_t
- * ~~~~~~~~~~~~~
- *
- * Sphinx stylesheet -- default theme.
- *
- * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
- at import url("basic.css");
-
-/* -- page layout ----------------------------------------------------------- */
-
-body {
-    font-family: sans-serif;
-    font-size: 100%;
-    background-color: #11303d;
-    color: #000;
-    margin: 0;
-    padding: 0;
-}
-
-div.document {
-    background-color: #1c4e63;
-}
-
-div.documentwrapper {
-    float: left;
-    width: 100%;
-}
-
-div.bodywrapper {
-    margin: 0 0 0 230px;
-}
-
-div.body {
-    background-color: #ffffff;
-    color: #000000;
-    padding: 0 20px 30px 20px;
-}
-
-div.footer {
-    color: #ffffff;
-    width: 100%;
-    padding: 9px 0 9px 0;
-    text-align: center;
-    font-size: 75%;
-}
-
-div.footer a {
-    color: #ffffff;
-    text-decoration: underline;
-}
-
-div.related {
-    background-color: #133f52;
-    line-height: 30px;
-    color: #ffffff;
-}
-
-div.related a {
-    color: #ffffff;
-}
-
-div.sphinxsidebar {
-}
-
-div.sphinxsidebar h3 {
-    font-family: 'Trebuchet MS', sans-serif;
-    color: #ffffff;
-    font-size: 1.4em;
-    font-weight: normal;
-    margin: 0;
-    padding: 0;
-}
-
-div.sphinxsidebar h3 a {
-    color: #ffffff;
-}
-
-div.sphinxsidebar h4 {
-    font-family: 'Trebuchet MS', sans-serif;
-    color: #ffffff;
-    font-size: 1.3em;
-    font-weight: normal;
-    margin: 5px 0 0 0;
-    padding: 0;
-}
-
-div.sphinxsidebar p {
-    color: #ffffff;
-}
-
-div.sphinxsidebar p.topless {
-    margin: 5px 10px 10px 10px;
-}
-
-div.sphinxsidebar ul {
-    margin: 10px;
-    padding: 0;
-    color: #ffffff;
-}
-
-div.sphinxsidebar a {
-    color: #98dbcc;
-}
-
-div.sphinxsidebar input {
-    border: 1px solid #98dbcc;
-    font-family: sans-serif;
-    font-size: 1em;
-}
-
-
-
-/* -- hyperlink styles ------------------------------------------------------ */
-
-a {
-    color: #355f7c;
-    text-decoration: none;
-}
-
-a:visited {
-    color: #355f7c;
-    text-decoration: none;
-}
-
-a:hover {
-    text-decoration: underline;
-}
-
-
-
-/* -- body styles ----------------------------------------------------------- */
-
-div.body h1,
-div.body h2,
-div.body h3,
-div.body h4,
-div.body h5,
-div.body h6 {
-    font-family: 'Trebuchet MS', sans-serif;
-    background-color: #f2f2f2;
-    font-weight: normal;
-    color: #20435c;
-    border-bottom: 1px solid #ccc;
-    margin: 20px -20px 10px -20px;
-    padding: 3px 0 3px 10px;
-}
-
-div.body h1 { margin-top: 0; font-size: 200%; }
-div.body h2 { font-size: 160%; }
-div.body h3 { font-size: 140%; }
-div.body h4 { font-size: 120%; }
-div.body h5 { font-size: 110%; }
-div.body h6 { font-size: 100%; }
-
-a.headerlink {
-    color: #c60f0f;
-    font-size: 0.8em;
-    padding: 0 4px 0 4px;
-    text-decoration: none;
-}
-
-a.headerlink:hover {
-    background-color: #c60f0f;
-    color: white;
-}
-
-div.body p, div.body dd, div.body li {
-    text-align: justify;
-    line-height: 130%;
-}
-
-div.admonition p.admonition-title + p {
-    display: inline;
-}
-
-div.admonition p {
-    margin-bottom: 5px;
-}
-
-div.admonition pre {
-    margin-bottom: 5px;
-}
-
-div.admonition ul, div.admonition ol {
-    margin-bottom: 5px;
-}
-
-div.note {
-    background-color: #eee;
-    border: 1px solid #ccc;
-}
-
-div.seealso {
-    background-color: #ffc;
-    border: 1px solid #ff6;
-}
-
-div.topic {
-    background-color: #eee;
-}
-
-div.warning {
-    background-color: #ffe4e4;
-    border: 1px solid #f66;
-}
-
-p.admonition-title {
-    display: inline;
-}
-
-p.admonition-title:after {
-    content: ":";
-}
-
-pre {
-    padding: 5px;
-    background-color: #eeffcc;
-    color: #333333;
-    line-height: 120%;
-    border: 1px solid #ac9;
-    border-left: none;
-    border-right: none;
-}
-
-tt {
-    background-color: #ecf0f3;
-    padding: 0 1px 0 1px;
-    font-size: 0.95em;
-}
-
-th {
-    background-color: #ede;
-}
-
-.warning tt {
-    background: #efc2c2;
-}
-
-.note tt {
-    background: #d6d6d6;
-}
-
-.viewcode-back {
-    font-family: sans-serif;
-}
-
-div.viewcode-block:target {
-    background-color: #f4debf;
-    border-top: 1px solid #ac9;
-    border-bottom: 1px solid #ac9;
-}
\ No newline at end of file
diff --git a/lib/mako-0.7.2/doc/_static/docs.css b/lib/mako-0.7.2/doc/_static/docs.css
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_static/docs.css
+++ /dev/null
@@ -1,438 +0,0 @@
-/* global */
-
-body {
-  background-color: #FDFBFC;
-  margin:38px;
-  color:#333333;
-}
-
-a {
-    font-weight:normal; 
-    text-decoration:none;
-}
-
-form {
-    display:inline;
-}
-
-/* hyperlinks */
-
-a:link, a:visited, a:active {
-    color:#0000FF;
-}
-a:hover {
-    color:#700000;
-    text-decoration:underline;
-}
-
-/* paragraph links after sections.
-   These aren't visible until hovering
-   over the <h> tag, then have a 
-   "reverse video" effect over the actual
-   link
- */
-
-a.headerlink {
-    font-size: 0.8em;
-    padding: 0 4px 0 4px;
-    text-decoration: none;
-    visibility: hidden;
-}
-
-h1:hover > a.headerlink,
-h2:hover > a.headerlink,
-h3:hover > a.headerlink,
-h4:hover > a.headerlink,
-h5:hover > a.headerlink,
-h6:hover > a.headerlink,
-dt:hover > a.headerlink {
-    visibility: visible;
-}
-
-a.headerlink:hover {
-    background-color: #990000;
-    color: white;
-}
-
-
-/* Container setup */
-
-#docs-container {
-  max-width:1000px;
-}
-
-
-/* header/footer elements */
-
-#docs-header h1 {
-    font-size:20px;
-    color: #222222;
-    margin: 0;
-    padding: 0;
-}
-
-#docs-header {
-  font-family:Tahoma, Geneva,sans-serif;
-
-  font-size:.9em;
-
-}
-
-#docs-top-navigation,
-#docs-bottom-navigation {
-  font-family: Tahoma, Geneva, sans-serif;
-  background-color: #EEE;
-  border: solid 1px #CCC;
-  padding:10px;
-  font-size:.9em;
-}
-
-#docs-top-navigation {
-  margin:10px 0px 10px 0px;
-  line-height:1.2em;
-}
-
-.docs-navigation-links {
-  font-family:Tahoma, Geneva,sans-serif;
-}
-
-#docs-bottom-navigation {
-    float:right;
-    margin: 1em 0 1em 5px;
-}
-
-#docs-copyright {
-    font-size:.85em;
-    padding:5px 0px;
-}
-
-#docs-header h1,
-#docs-top-navigation h1,
-#docs-top-navigation h2 {
-  font-family:Tahoma,Geneva,sans-serif;
-  font-weight:normal;
-}
-
-#docs-top-navigation h2 {
-    margin:16px 4px 7px 5px;
-    font-size:2em;
-}
-
-#docs-search {
-    float:right;
-}
-
-#docs-top-page-control {
-  float:right;
-  width:350px;
-}
-
-#docs-top-page-control ul {
-  padding:0;
-  margin:0;
-}
-
-#docs-top-page-control li {
-    list-style-type:none;
-    padding:1px 8px;
-}
-
-
-#docs-container .version-num {
-    font-weight: bold;
-}
-
-
-/* content container, sidebar */
-
-#docs-body-container {
-  background-color:#EFEFEF;
-  border: solid 1px #CCC;
-
-}
-
-#docs-body,
-#docs-sidebar
- {
-  /*font-family: helvetica, arial, sans-serif;
-  font-size:.9em;*/
-
-  font-family: Tahoma, Geneva, sans-serif;
-  /*font-size:.85em;*/
-  line-height:1.5em;
-
-}
-
-#docs-sidebar > ul {
-  font-size:.9em;
-}
-
-#docs-sidebar {
-  float:left;
-  width:212px;
-  padding: 10px 0 0 15px;
-  /*font-size:.85em;*/
-}
-
-#docs-sidebar h3, #docs-sidebar h4 {
-    background-color: #DDDDDD;
-    color: #222222;
-    font-family: Tahoma, Geneva,sans-serif;
-    font-size: 1.1em;
-    font-weight: normal;
-    margin: 10px 0 0 -15px;
-    padding: 5px 10px 5px 10px;
-    text-shadow: 1px 1px 0 white;
-    width:210px;
-}
-
-#docs-sidebar h3 a, #docs-sidebar h4 a {
-  color: #222222;
-}
-#docs-sidebar ul {
-  margin: 10px 10px 10px 0px;
-  padding: 0;
-  list-style: none outside none;
-}
-
-
-#docs-sidebar ul ul {
-    margin-bottom: 0;
-    margin-top: 0;
-    list-style: square outside none;
-    margin-left: 20px;
-}
-
-#docs-body {
-  background-color:#FFFFFF;
-  padding:1px 10px 10px 10px;
-}
-
-#docs-body.withsidebar {
-  margin: 0 0 0 230px;
-  border-left:3px solid #DFDFDF;
-}
-
-#docs-body h1,
-#docs-body h2,
-#docs-body h3,
-#docs-body h4 {
-  font-family:Tahoma, Geneva, sans-serif;
-}
-
-#docs-body h1 {
-  /* hide the <h1> for each content section. */
-  display:none;
-  font-size:1.8em;
-}
-
-#docs-body h2 {
-  font-size:1.6em;
-}
-
-#docs-body h3 {
-  font-size:1.4em;
-}
-
-/* SQL popup, code styles */
-
-.highlight {
-  background:none;
-}
-
-#docs-container pre {
-  font-size:1.2em;
-}
-
-#docs-container .pre {
-  font-size:1.1em;
-}
-
-#docs-container pre {
-  background-color: #f0f0f0;  
-  border: solid 1px #ccc;
-  box-shadow: 2px 2px 3px #DFDFDF;
-  padding:10px;
-  margin: 5px 0px 5px 0px;
-  overflow:auto;
-  line-height:1.3em;
-}
-
-.popup_sql, .show_sql
-{
-    background-color: #FBFBEE;
-    padding:5px 10px;
-    margin:10px -5px;
-    border:1px dashed;
-}
-
-/* the [SQL] links used to display SQL */
-#docs-container .sql_link
-{
-  font-weight:normal;
-  font-family: arial, sans-serif;
-  font-size:.9em;
-  text-transform: uppercase;
-  color:#990000;
-  border:1px solid;
-  padding:1px 2px 1px 2px;
-  margin:0px 10px 0px 15px;
-  float:right;
-  line-height:1.2em;
-}
-
-#docs-container a.sql_link, 
-#docs-container .sql_link
-{
-    text-decoration: none;
-    padding:1px 2px;
-}
-
-#docs-container a.sql_link:hover {
-    text-decoration: none;
-    color:#fff;
-    border:1px solid #900;
-    background-color: #900;
-}
-
-/* docutils-specific elements */
-
-th.field-name {
-    text-align:right;
-}
-
-div.note, div.warning, p.deprecated, div.topic  {
-    background-color:#EEFFEF;
-}
-
-
-div.admonition, div.topic, p.deprecated, p.versionadded, p.versionchanged {
-    border:1px solid #CCCCCC;
-    padding:5px 10px;
-    font-size:.9em;
-    box-shadow: 2px 2px 3px #DFDFDF;
-}
-
-div.warning .admonition-title {
-    color:#FF0000;
-}
-
-div.admonition .admonition-title, div.topic .topic-title {
-    font-weight:bold;
-}
-
-.viewcode-back, .viewcode-link {
-    float:right;
-}
-
-dl.function > dt,
-dl.attribute > dt,
-dl.classmethod > dt,
-dl.method > dt,
-dl.class > dt,
-dl.exception > dt
-{
-    background-color:#F0F0F0;
-    margin:25px -10px 10px 10px;
-    padding: 0px 10px;
-}
-
-p.versionadded span.versionmodified,
-p.versionchanged span.versionmodified,
-p.deprecated span.versionmodified {
-    background-color: #F0F0F0;
-    font-style: italic;
-}
-
-dt:target, span.highlight {
-    background-color:#FBE54E;
-}
-
-a.headerlink {
-    font-size: 0.8em;
-    padding: 0 4px 0 4px;
-    text-decoration: none;
-    visibility: hidden;
-}
-
-h1:hover > a.headerlink,
-h2:hover > a.headerlink,
-h3:hover > a.headerlink,
-h4:hover > a.headerlink,
-h5:hover > a.headerlink,
-h6:hover > a.headerlink,
-dt:hover > a.headerlink {
-    visibility: visible;
-}
-
-a.headerlink:hover {
-    background-color: #00f;
-    color: white;
-}
-
-.clearboth {
-    clear:both;
-}
-
-tt.descname {
-    background-color:transparent;
-    font-size:1.2em;
-    font-weight:bold;
-}
-
-tt.descclassname {
-    background-color:transparent;
-}
-
-tt {
-    background-color:#ECF0F3;
-    padding:0 1px;
-}
-
-/* syntax highlighting overrides */
-.k, .kn {color:#0908CE;}
-.o {color:#BF0005;}
-.go {color:#804049;}
-
-
-/* special "index page" sections 
-   with specific formatting
-*/
-
-div#sqlalchemy-documentation {
-  font-size:.95em;
-}
-div#sqlalchemy-documentation em {
-  font-style:normal;
-}
-div#sqlalchemy-documentation .rubric{
-  font-size:14px;
-  background-color:#EEFFEF;
-  padding:5px;
-  border:1px solid #BFBFBF;
-}
-div#sqlalchemy-documentation a, div#sqlalchemy-documentation li {
-  padding:5px 0px;
-}
-
-div#getting-started {
-  border-bottom:1px solid;
-}
-
-div#sqlalchemy-documentation div#sqlalchemy-orm {
-  float:left;
-  width:48%;
-}
-
-div#sqlalchemy-documentation div#sqlalchemy-core {
-  float:left;
-  width:48%;
-  margin:0;
-  padding-left:10px;
-  border-left:1px solid;
-}
-
-div#dialect-documentation {
-  border-top:1px solid;
-  /*clear:left;*/
-}
diff --git a/lib/mako-0.7.2/doc/_static/doctools.js b/lib/mako-0.7.2/doc/_static/doctools.js
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_static/doctools.js
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * doctools.js
- * ~~~~~~~~~~~
- *
- * Sphinx JavaScript utilities for all documentation.
- *
- * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-/**
- * select a different prefix for underscore
- */
-$u = _.noConflict();
-
-/**
- * make the code below compatible with browsers without
- * an installed firebug like debugger
-if (!window.console || !console.firebug) {
-  var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
-    "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
-    "profile", "profileEnd"];
-  window.console = {};
-  for (var i = 0; i < names.length; ++i)
-    window.console[names[i]] = function() {};
-}
- */
-
-/**
- * small helper function to urldecode strings
- */
-jQuery.urldecode = function(x) {
-  return decodeURIComponent(x).replace(/\+/g, ' ');
-}
-
-/**
- * small helper function to urlencode strings
- */
-jQuery.urlencode = encodeURIComponent;
-
-/**
- * This function returns the parsed url parameters of the
- * current request. Multiple values per key are supported,
- * it will always return arrays of strings for the value parts.
- */
-jQuery.getQueryParameters = function(s) {
-  if (typeof s == 'undefined')
-    s = document.location.search;
-  var parts = s.substr(s.indexOf('?') + 1).split('&');
-  var result = {};
-  for (var i = 0; i < parts.length; i++) {
-    var tmp = parts[i].split('=', 2);
-    var key = jQuery.urldecode(tmp[0]);
-    var value = jQuery.urldecode(tmp[1]);
-    if (key in result)
-      result[key].push(value);
-    else
-      result[key] = [value];
-  }
-  return result;
-};
-
-/**
- * small function to check if an array contains
- * a given item.
- */
-jQuery.contains = function(arr, item) {
-  for (var i = 0; i < arr.length; i++) {
-    if (arr[i] == item)
-      return true;
-  }
-  return false;
-};
-
-/**
- * highlight a given string on a jquery object by wrapping it in
- * span elements with the given class name.
- */
-jQuery.fn.highlightText = function(text, className) {
-  function highlight(node) {
-    if (node.nodeType == 3) {
-      var val = node.nodeValue;
-      var pos = val.toLowerCase().indexOf(text);
-      if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
-        var span = document.createElement("span");
-        span.className = className;
-        span.appendChild(document.createTextNode(val.substr(pos, text.length)));
-        node.parentNode.insertBefore(span, node.parentNode.insertBefore(
-          document.createTextNode(val.substr(pos + text.length)),
-          node.nextSibling));
-        node.nodeValue = val.substr(0, pos);
-      }
-    }
-    else if (!jQuery(node).is("button, select, textarea")) {
-      jQuery.each(node.childNodes, function() {
-        highlight(this);
-      });
-    }
-  }
-  return this.each(function() {
-    highlight(this);
-  });
-};
-
-/**
- * Small JavaScript module for the documentation.
- */
-var Documentation = {
-
-  init : function() {
-    this.fixFirefoxAnchorBug();
-    this.highlightSearchWords();
-    this.initIndexTable();
-  },
-
-  /**
-   * i18n support
-   */
-  TRANSLATIONS : {},
-  PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
-  LOCALE : 'unknown',
-
-  // gettext and ngettext don't access this so that the functions
-  // can safely bound to a different name (_ = Documentation.gettext)
-  gettext : function(string) {
-    var translated = Documentation.TRANSLATIONS[string];
-    if (typeof translated == 'undefined')
-      return string;
-    return (typeof translated == 'string') ? translated : translated[0];
-  },
-
-  ngettext : function(singular, plural, n) {
-    var translated = Documentation.TRANSLATIONS[singular];
-    if (typeof translated == 'undefined')
-      return (n == 1) ? singular : plural;
-    return translated[Documentation.PLURALEXPR(n)];
-  },
-
-  addTranslations : function(catalog) {
-    for (var key in catalog.messages)
-      this.TRANSLATIONS[key] = catalog.messages[key];
-    this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
-    this.LOCALE = catalog.locale;
-  },
-
-  /**
-   * add context elements like header anchor links
-   */
-  addContextElements : function() {
-    $('div[id] > :header:first').each(function() {
-      $('<a class="headerlink">\u00B6</a>').
-      attr('href', '#' + this.id).
-      attr('title', _('Permalink to this headline')).
-      appendTo(this);
-    });
-    $('dt[id]').each(function() {
-      $('<a class="headerlink">\u00B6</a>').
-      attr('href', '#' + this.id).
-      attr('title', _('Permalink to this definition')).
-      appendTo(this);
-    });
-  },
-
-  /**
-   * workaround a firefox stupidity
-   */
-  fixFirefoxAnchorBug : function() {
-    if (document.location.hash && $.browser.mozilla)
-      window.setTimeout(function() {
-        document.location.href += '';
-      }, 10);
-  },
-
-  /**
-   * highlight the search words provided in the url in the text
-   */
-  highlightSearchWords : function() {
-    var params = $.getQueryParameters();
-    var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
-    if (terms.length) {
-      var body = $('div.body');
-      window.setTimeout(function() {
-        $.each(terms, function() {
-          body.highlightText(this.toLowerCase(), 'highlighted');
-        });
-      }, 10);
-      $('<p class="highlight-link"><a href="javascript:Documentation.' +
-        'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
-          .appendTo($('#searchbox'));
-    }
-  },
-
-  /**
-   * init the domain index toggle buttons
-   */
-  initIndexTable : function() {
-    var togglers = $('img.toggler').click(function() {
-      var src = $(this).attr('src');
-      var idnum = $(this).attr('id').substr(7);
-      $('tr.cg-' + idnum).toggle();
-      if (src.substr(-9) == 'minus.png')
-        $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
-      else
-        $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
-    }).css('display', '');
-    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
-        togglers.click();
-    }
-  },
-
-  /**
-   * helper function to hide the search marks again
-   */
-  hideSearchWords : function() {
-    $('#searchbox .highlight-link').fadeOut(300);
-    $('span.highlighted').removeClass('highlighted');
-  },
-
-  /**
-   * make the url absolute
-   */
-  makeURL : function(relativeURL) {
-    return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
-  },
-
-  /**
-   * get the current relative url
-   */
-  getCurrentURL : function() {
-    var path = document.location.pathname;
-    var parts = path.split(/\//);
-    $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
-      if (this == '..')
-        parts.pop();
-    });
-    var url = parts.join('/');
-    return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
-  }
-};
-
-// quick alias for translations
-_ = Documentation.gettext;
-
-$(document).ready(function() {
-  Documentation.init();
-});
diff --git a/lib/mako-0.7.2/doc/_static/down-pressed.png b/lib/mako-0.7.2/doc/_static/down-pressed.png
deleted file mode 100644
Binary file lib/mako-0.7.2/doc/_static/down-pressed.png has changed
diff --git a/lib/mako-0.7.2/doc/_static/down.png b/lib/mako-0.7.2/doc/_static/down.png
deleted file mode 100644
Binary file lib/mako-0.7.2/doc/_static/down.png has changed
diff --git a/lib/mako-0.7.2/doc/_static/file.png b/lib/mako-0.7.2/doc/_static/file.png
deleted file mode 100644
Binary file lib/mako-0.7.2/doc/_static/file.png has changed
diff --git a/lib/mako-0.7.2/doc/_static/jquery.js b/lib/mako-0.7.2/doc/_static/jquery.js
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_static/jquery.js
+++ /dev/null
@@ -1,154 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.4.2
- * http://jquery.com/
- *
- * Copyright 2010, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2010, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Sat Feb 13 22:33:48 2010 -0500
- */
-(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
-e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
-j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
-"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
-true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
-Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
-(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
-a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
-"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
-function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
-c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
-L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
-"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
-a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
-d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
-a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
-!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
-true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
-var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
-parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
-false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
-s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
-applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
-else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
-a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
-w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
-cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
-i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
-" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
-this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
-e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
-c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
-a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
-function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
-k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
-C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
-null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
-e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
-f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
-if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
-fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
-d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
-"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
-a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
-isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
-{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
-if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
-e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
-"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
-d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
-!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
-toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
-u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
-function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
-if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
-e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
-t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
-g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
-for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
-1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
-CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
-relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
-l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
-h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
-CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
-g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
-text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
-setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
-h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
-m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
-"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
-h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
-!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
-h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
-q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
-if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
-(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
-function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
-gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
-c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
-{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
-"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
-d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
-a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
-1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
-a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
-c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
-wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
-prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
-this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
-return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
-""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
-this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
-u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
-1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
-return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
-""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
-c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
-c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
-function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
-Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
-"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
-a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
-a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
-"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
-serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
-function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
-global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
-e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
-"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
-false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
-false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
-c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
-d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
-g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
-1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
-"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
-if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
-this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
-"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
-animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
-j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
-this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
-"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
-c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
-this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
-this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
-e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
-c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
-function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
-this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
-k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
-f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
-a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
-c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
-d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
-"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
-e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
diff --git a/lib/mako-0.7.2/doc/_static/makoLogo.png b/lib/mako-0.7.2/doc/_static/makoLogo.png
deleted file mode 100644
Binary file lib/mako-0.7.2/doc/_static/makoLogo.png has changed
diff --git a/lib/mako-0.7.2/doc/_static/minus.png b/lib/mako-0.7.2/doc/_static/minus.png
deleted file mode 100644
Binary file lib/mako-0.7.2/doc/_static/minus.png has changed
diff --git a/lib/mako-0.7.2/doc/_static/plus.png b/lib/mako-0.7.2/doc/_static/plus.png
deleted file mode 100644
Binary file lib/mako-0.7.2/doc/_static/plus.png has changed
diff --git a/lib/mako-0.7.2/doc/_static/pygments.css b/lib/mako-0.7.2/doc/_static/pygments.css
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_static/pygments.css
+++ /dev/null
@@ -1,62 +0,0 @@
-.highlight .hll { background-color: #ffffcc }
-.highlight  { background: #eeffcc; }
-.highlight .c { color: #408090; font-style: italic } /* Comment */
-.highlight .err { border: 1px solid #FF0000 } /* Error */
-.highlight .k { color: #007020; font-weight: bold } /* Keyword */
-.highlight .o { color: #666666 } /* Operator */
-.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
-.highlight .cp { color: #007020 } /* Comment.Preproc */
-.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
-.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
-.highlight .gd { color: #A00000 } /* Generic.Deleted */
-.highlight .ge { font-style: italic } /* Generic.Emph */
-.highlight .gr { color: #FF0000 } /* Generic.Error */
-.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
-.highlight .gi { color: #00A000 } /* Generic.Inserted */
-.highlight .go { color: #303030 } /* Generic.Output */
-.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
-.highlight .gs { font-weight: bold } /* Generic.Strong */
-.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.highlight .gt { color: #0040D0 } /* Generic.Traceback */
-.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
-.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
-.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
-.highlight .kp { color: #007020 } /* Keyword.Pseudo */
-.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
-.highlight .kt { color: #902000 } /* Keyword.Type */
-.highlight .m { color: #208050 } /* Literal.Number */
-.highlight .s { color: #4070a0 } /* Literal.String */
-.highlight .na { color: #4070a0 } /* Name.Attribute */
-.highlight .nb { color: #007020 } /* Name.Builtin */
-.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
-.highlight .no { color: #60add5 } /* Name.Constant */
-.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
-.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
-.highlight .ne { color: #007020 } /* Name.Exception */
-.highlight .nf { color: #06287e } /* Name.Function */
-.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
-.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
-.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
-.highlight .nv { color: #bb60d5 } /* Name.Variable */
-.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
-.highlight .w { color: #bbbbbb } /* Text.Whitespace */
-.highlight .mf { color: #208050 } /* Literal.Number.Float */
-.highlight .mh { color: #208050 } /* Literal.Number.Hex */
-.highlight .mi { color: #208050 } /* Literal.Number.Integer */
-.highlight .mo { color: #208050 } /* Literal.Number.Oct */
-.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
-.highlight .sc { color: #4070a0 } /* Literal.String.Char */
-.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
-.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
-.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
-.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
-.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
-.highlight .sx { color: #c65d09 } /* Literal.String.Other */
-.highlight .sr { color: #235388 } /* Literal.String.Regex */
-.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
-.highlight .ss { color: #517918 } /* Literal.String.Symbol */
-.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
-.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
-.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
-.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
-.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/lib/mako-0.7.2/doc/_static/searchtools.js b/lib/mako-0.7.2/doc/_static/searchtools.js
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_static/searchtools.js
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
- * searchtools.js_t
- * ~~~~~~~~~~~~~~~~
- *
- * Sphinx JavaScript utilties for the full-text search.
- *
- * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-/**
- * helper function to return a node containing the
- * search summary for a given text. keywords is a list
- * of stemmed words, hlwords is the list of normal, unstemmed
- * words. the first one is used to find the occurance, the
- * latter for highlighting it.
- */
-
-jQuery.makeSearchSummary = function(text, keywords, hlwords) {
-  var textLower = text.toLowerCase();
-  var start = 0;
-  $.each(keywords, function() {
-    var i = textLower.indexOf(this.toLowerCase());
-    if (i > -1)
-      start = i;
-  });
-  start = Math.max(start - 120, 0);
-  var excerpt = ((start > 0) ? '...' : '') +
-  $.trim(text.substr(start, 240)) +
-  ((start + 240 - text.length) ? '...' : '');
-  var rv = $('<div class="context"></div>').text(excerpt);
-  $.each(hlwords, function() {
-    rv = rv.highlightText(this, 'highlighted');
-  });
-  return rv;
-}
-
-
-/**
- * Porter Stemmer
- */
-var Stemmer = function() {
-
-  var step2list = {
-    ational: 'ate',
-    tional: 'tion',
-    enci: 'ence',
-    anci: 'ance',
-    izer: 'ize',
-    bli: 'ble',
-    alli: 'al',
-    entli: 'ent',
-    eli: 'e',
-    ousli: 'ous',
-    ization: 'ize',
-    ation: 'ate',
-    ator: 'ate',
-    alism: 'al',
-    iveness: 'ive',
-    fulness: 'ful',
-    ousness: 'ous',
-    aliti: 'al',
-    iviti: 'ive',
-    biliti: 'ble',
-    logi: 'log'
-  };
-
-  var step3list = {
-    icate: 'ic',
-    ative: '',
-    alize: 'al',
-    iciti: 'ic',
-    ical: 'ic',
-    ful: '',
-    ness: ''
-  };
-
-  var c = "[^aeiou]";          // consonant
-  var v = "[aeiouy]";          // vowel
-  var C = c + "[^aeiouy]*";    // consonant sequence
-  var V = v + "[aeiou]*";      // vowel sequence
-
-  var mgr0 = "^(" + C + ")?" + V + C;                      // [C]VC... is m>0
-  var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$";    // [C]VC[V] is m=1
-  var mgr1 = "^(" + C + ")?" + V + C + V + C;              // [C]VCVC... is m>1
-  var s_v   = "^(" + C + ")?" + v;                         // vowel in stem
-
-  this.stemWord = function (w) {
-    var stem;
-    var suffix;
-    var firstch;
-    var origword = w;
-
-    if (w.length < 3)
-      return w;
-
-    var re;
-    var re2;
-    var re3;
-    var re4;
-
-    firstch = w.substr(0,1);
-    if (firstch == "y")
-      w = firstch.toUpperCase() + w.substr(1);
-
-    // Step 1a
-    re = /^(.+?)(ss|i)es$/;
-    re2 = /^(.+?)([^s])s$/;
-
-    if (re.test(w))
-      w = w.replace(re,"$1$2");
-    else if (re2.test(w))
-      w = w.replace(re2,"$1$2");
-
-    // Step 1b
-    re = /^(.+?)eed$/;
-    re2 = /^(.+?)(ed|ing)$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      re = new RegExp(mgr0);
-      if (re.test(fp[1])) {
-        re = /.$/;
-        w = w.replace(re,"");
-      }
-    }
-    else if (re2.test(w)) {
-      var fp = re2.exec(w);
-      stem = fp[1];
-      re2 = new RegExp(s_v);
-      if (re2.test(stem)) {
-        w = stem;
-        re2 = /(at|bl|iz)$/;
-        re3 = new RegExp("([^aeiouylsz])\\1$");
-        re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
-        if (re2.test(w))
-          w = w + "e";
-        else if (re3.test(w)) {
-          re = /.$/;
-          w = w.replace(re,"");
-        }
-        else if (re4.test(w))
-          w = w + "e";
-      }
-    }
-
-    // Step 1c
-    re = /^(.+?)y$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      stem = fp[1];
-      re = new RegExp(s_v);
-      if (re.test(stem))
-        w = stem + "i";
-    }
-
-    // Step 2
-    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      stem = fp[1];
-      suffix = fp[2];
-      re = new RegExp(mgr0);
-      if (re.test(stem))
-        w = stem + step2list[suffix];
-    }
-
-    // Step 3
-    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      stem = fp[1];
-      suffix = fp[2];
-      re = new RegExp(mgr0);
-      if (re.test(stem))
-        w = stem + step3list[suffix];
-    }
-
-    // Step 4
-    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
-    re2 = /^(.+?)(s|t)(ion)$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      stem = fp[1];
-      re = new RegExp(mgr1);
-      if (re.test(stem))
-        w = stem;
-    }
-    else if (re2.test(w)) {
-      var fp = re2.exec(w);
-      stem = fp[1] + fp[2];
-      re2 = new RegExp(mgr1);
-      if (re2.test(stem))
-        w = stem;
-    }
-
-    // Step 5
-    re = /^(.+?)e$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      stem = fp[1];
-      re = new RegExp(mgr1);
-      re2 = new RegExp(meq1);
-      re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
-      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
-        w = stem;
-    }
-    re = /ll$/;
-    re2 = new RegExp(mgr1);
-    if (re.test(w) && re2.test(w)) {
-      re = /.$/;
-      w = w.replace(re,"");
-    }
-
-    // and turn initial Y back to y
-    if (firstch == "y")
-      w = firstch.toLowerCase() + w.substr(1);
-    return w;
-  }
-}
-
-
-/**
- * Search Module
- */
-var Search = {
-
-  _index : null,
-  _queued_query : null,
-  _pulse_status : -1,
-
-  init : function() {
-      var params = $.getQueryParameters();
-      if (params.q) {
-          var query = params.q[0];
-          $('input[name="q"]')[0].value = query;
-          this.performSearch(query);
-      }
-  },
-
-  loadIndex : function(url) {
-    $.ajax({type: "GET", url: url, data: null, success: null,
-            dataType: "script", cache: true});
-  },
-
-  setIndex : function(index) {
-    var q;
-    this._index = index;
-    if ((q = this._queued_query) !== null) {
-      this._queued_query = null;
-      Search.query(q);
-    }
-  },
-
-  hasIndex : function() {
-      return this._index !== null;
-  },
-
-  deferQuery : function(query) {
-      this._queued_query = query;
-  },
-
-  stopPulse : function() {
-      this._pulse_status = 0;
-  },
-
-  startPulse : function() {
-    if (this._pulse_status >= 0)
-        return;
-    function pulse() {
-      Search._pulse_status = (Search._pulse_status + 1) % 4;
-      var dotString = '';
-      for (var i = 0; i < Search._pulse_status; i++)
-        dotString += '.';
-      Search.dots.text(dotString);
-      if (Search._pulse_status > -1)
-        window.setTimeout(pulse, 500);
-    };
-    pulse();
-  },
-
-  /**
-   * perform a search for something
-   */
-  performSearch : function(query) {
-    // create the required interface elements
-    this.out = $('#search-results');
-    this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
-    this.dots = $('<span></span>').appendTo(this.title);
-    this.status = $('<p style="display: none"></p>').appendTo(this.out);
-    this.output = $('<ul class="search"/>').appendTo(this.out);
-
-    $('#search-progress').text(_('Preparing search...'));
-    this.startPulse();
-
-    // index already loaded, the browser was quick!
-    if (this.hasIndex())
-      this.query(query);
-    else
-      this.deferQuery(query);
-  },
-
-  query : function(query) {
-    var stopwords = ["and","then","into","it","as","are","in","if","for","no","there","their","was","is","be","to","that","but","they","not","such","with","by","a","on","these","of","will","this","near","the","or","at"];
-
-    // Stem the searchterms and add them to the correct list
-    var stemmer = new Stemmer();
-    var searchterms = [];
-    var excluded = [];
-    var hlterms = [];
-    var tmp = query.split(/\s+/);
-    var objectterms = [];
-    for (var i = 0; i < tmp.length; i++) {
-      if (tmp[i] != "") {
-          objectterms.push(tmp[i].toLowerCase());
-      }
-
-      if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) ||
-          tmp[i] == "") {
-        // skip this "word"
-        continue;
-      }
-      // stem the word
-      var word = stemmer.stemWord(tmp[i]).toLowerCase();
-      // select the correct list
-      if (word[0] == '-') {
-        var toAppend = excluded;
-        word = word.substr(1);
-      }
-      else {
-        var toAppend = searchterms;
-        hlterms.push(tmp[i].toLowerCase());
-      }
-      // only add if not already in the list
-      if (!$.contains(toAppend, word))
-        toAppend.push(word);
-    };
-    var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
-
-    // console.debug('SEARCH: searching for:');
-    // console.info('required: ', searchterms);
-    // console.info('excluded: ', excluded);
-
-    // prepare search
-    var filenames = this._index.filenames;
-    var titles = this._index.titles;
-    var terms = this._index.terms;
-    var fileMap = {};
-    var files = null;
-    // different result priorities
-    var importantResults = [];
-    var objectResults = [];
-    var regularResults = [];
-    var unimportantResults = [];
-    $('#search-progress').empty();
-
-    // lookup as object
-    for (var i = 0; i < objectterms.length; i++) {
-      var others = [].concat(objectterms.slice(0,i),
-                             objectterms.slice(i+1, objectterms.length))
-      var results = this.performObjectSearch(objectterms[i], others);
-      // Assume first word is most likely to be the object,
-      // other words more likely to be in description.
-      // Therefore put matches for earlier words first.
-      // (Results are eventually used in reverse order).
-      objectResults = results[0].concat(objectResults);
-      importantResults = results[1].concat(importantResults);
-      unimportantResults = results[2].concat(unimportantResults);
-    }
-
-    // perform the search on the required terms
-    for (var i = 0; i < searchterms.length; i++) {
-      var word = searchterms[i];
-      // no match but word was a required one
-      if ((files = terms[word]) == null)
-        break;
-      if (files.length == undefined) {
-        files = [files];
-      }
-      // create the mapping
-      for (var j = 0; j < files.length; j++) {
-        var file = files[j];
-        if (file in fileMap)
-          fileMap[file].push(word);
-        else
-          fileMap[file] = [word];
-      }
-    }
-
-    // now check if the files don't contain excluded terms
-    for (var file in fileMap) {
-      var valid = true;
-
-      // check if all requirements are matched
-      if (fileMap[file].length != searchterms.length)
-        continue;
-
-      // ensure that none of the excluded terms is in the
-      // search result.
-      for (var i = 0; i < excluded.length; i++) {
-        if (terms[excluded[i]] == file ||
-            $.contains(terms[excluded[i]] || [], file)) {
-          valid = false;
-          break;
-        }
-      }
-
-      // if we have still a valid result we can add it
-      // to the result list
-      if (valid)
-        regularResults.push([filenames[file], titles[file], '', null]);
-    }
-
-    // delete unused variables in order to not waste
-    // memory until list is retrieved completely
-    delete filenames, titles, terms;
-
-    // now sort the regular results descending by title
-    regularResults.sort(function(a, b) {
-      var left = a[1].toLowerCase();
-      var right = b[1].toLowerCase();
-      return (left > right) ? -1 : ((left < right) ? 1 : 0);
-    });
-
-    // combine all results
-    var results = unimportantResults.concat(regularResults)
-      .concat(objectResults).concat(importantResults);
-
-    // print the results
-    var resultCount = results.length;
-    function displayNextItem() {
-      // results left, load the summary and display it
-      if (results.length) {
-        var item = results.pop();
-        var listItem = $('<li style="display:none"></li>');
-        if (DOCUMENTATION_OPTIONS.FILE_SUFFIX == '') {
-          // dirhtml builder
-          var dirname = item[0] + '/';
-          if (dirname.match(/\/index\/$/)) {
-            dirname = dirname.substring(0, dirname.length-6);
-          } else if (dirname == 'index/') {
-            dirname = '';
-          }
-          listItem.append($('<a/>').attr('href',
-            DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
-            highlightstring + item[2]).html(item[1]));
-        } else {
-          // normal html builders
-          listItem.append($('<a/>').attr('href',
-            item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
-            highlightstring + item[2]).html(item[1]));
-        }
-        if (item[3]) {
-          listItem.append($('<span> (' + item[3] + ')</span>'));
-          Search.output.append(listItem);
-          listItem.slideDown(5, function() {
-            displayNextItem();
-          });
-        } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
-          $.get(DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' +
-                item[0] + '.txt', function(data) {
-            if (data != '') {
-              listItem.append($.makeSearchSummary(data, searchterms, hlterms));
-              Search.output.append(listItem);
-            }
-            listItem.slideDown(5, function() {
-              displayNextItem();
-            });
-          }, "text");
-        } else {
-          // no source available, just display title
-          Search.output.append(listItem);
-          listItem.slideDown(5, function() {
-            displayNextItem();
-          });
-        }
-      }
-      // search finished, update title and status message
-      else {
-        Search.stopPulse();
-        Search.title.text(_('Search Results'));
-        if (!resultCount)
-          Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
-        else
-            Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
-        Search.status.fadeIn(500);
-      }
-    }
-    displayNextItem();
-  },
-
-  performObjectSearch : function(object, otherterms) {
-    var filenames = this._index.filenames;
-    var objects = this._index.objects;
-    var objnames = this._index.objnames;
-    var titles = this._index.titles;
-
-    var importantResults = [];
-    var objectResults = [];
-    var unimportantResults = [];
-
-    for (var prefix in objects) {
-      for (var name in objects[prefix]) {
-        var fullname = (prefix ? prefix + '.' : '') + name;
-        if (fullname.toLowerCase().indexOf(object) > -1) {
-          var match = objects[prefix][name];
-          var objname = objnames[match[1]][2];
-          var title = titles[match[0]];
-          // If more than one term searched for, we require other words to be
-          // found in the name/title/description
-          if (otherterms.length > 0) {
-            var haystack = (prefix + ' ' + name + ' ' +
-                            objname + ' ' + title).toLowerCase();
-            var allfound = true;
-            for (var i = 0; i < otherterms.length; i++) {
-              if (haystack.indexOf(otherterms[i]) == -1) {
-                allfound = false;
-                break;
-              }
-            }
-            if (!allfound) {
-              continue;
-            }
-          }
-          var descr = objname + _(', in ') + title;
-          anchor = match[3];
-          if (anchor == '')
-            anchor = fullname;
-          else if (anchor == '-')
-            anchor = objnames[match[1]][1] + '-' + fullname;
-          result = [filenames[match[0]], fullname, '#'+anchor, descr];
-          switch (match[2]) {
-          case 1: objectResults.push(result); break;
-          case 0: importantResults.push(result); break;
-          case 2: unimportantResults.push(result); break;
-          }
-        }
-      }
-    }
-
-    // sort results descending
-    objectResults.sort(function(a, b) {
-      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
-    });
-
-    importantResults.sort(function(a, b) {
-      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
-    });
-
-    unimportantResults.sort(function(a, b) {
-      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
-    });
-
-    return [importantResults, objectResults, unimportantResults]
-  }
-}
-
-$(document).ready(function() {
-  Search.init();
-});
\ No newline at end of file
diff --git a/lib/mako-0.7.2/doc/_static/sidebar.js b/lib/mako-0.7.2/doc/_static/sidebar.js
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_static/sidebar.js
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * sidebar.js
- * ~~~~~~~~~~
- *
- * This script makes the Sphinx sidebar collapsible.
- *
- * .sphinxsidebar contains .sphinxsidebarwrapper.  This script adds
- * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
- * used to collapse and expand the sidebar.
- *
- * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
- * and the width of the sidebar and the margin-left of the document
- * are decreased. When the sidebar is expanded the opposite happens.
- * This script saves a per-browser/per-session cookie used to
- * remember the position of the sidebar among the pages.
- * Once the browser is closed the cookie is deleted and the position
- * reset to the default (expanded).
- *
- * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-$(function() {
-  // global elements used by the functions.
-  // the 'sidebarbutton' element is defined as global after its
-  // creation, in the add_sidebar_button function
-  var bodywrapper = $('.bodywrapper');
-  var sidebar = $('.sphinxsidebar');
-  var sidebarwrapper = $('.sphinxsidebarwrapper');
-
-  // for some reason, the document has no sidebar; do not run into errors
-  if (!sidebar.length) return;
-
-  // original margin-left of the bodywrapper and width of the sidebar
-  // with the sidebar expanded
-  var bw_margin_expanded = bodywrapper.css('margin-left');
-  var ssb_width_expanded = sidebar.width();
-
-  // margin-left of the bodywrapper and width of the sidebar
-  // with the sidebar collapsed
-  var bw_margin_collapsed = '.8em';
-  var ssb_width_collapsed = '.8em';
-
-  // colors used by the current theme
-  var dark_color = $('.related').css('background-color');
-  var light_color = $('.document').css('background-color');
-
-  function sidebar_is_collapsed() {
-    return sidebarwrapper.is(':not(:visible)');
-  }
-
-  function toggle_sidebar() {
-    if (sidebar_is_collapsed())
-      expand_sidebar();
-    else
-      collapse_sidebar();
-  }
-
-  function collapse_sidebar() {
-    sidebarwrapper.hide();
-    sidebar.css('width', ssb_width_collapsed);
-    bodywrapper.css('margin-left', bw_margin_collapsed);
-    sidebarbutton.css({
-        'margin-left': '0',
-        'height': bodywrapper.height()
-    });
-    sidebarbutton.find('span').text('»');
-    sidebarbutton.attr('title', _('Expand sidebar'));
-    document.cookie = 'sidebar=collapsed';
-  }
-
-  function expand_sidebar() {
-    bodywrapper.css('margin-left', bw_margin_expanded);
-    sidebar.css('width', ssb_width_expanded);
-    sidebarwrapper.show();
-    sidebarbutton.css({
-        'margin-left': ssb_width_expanded-12,
-        'height': bodywrapper.height()
-    });
-    sidebarbutton.find('span').text('«');
-    sidebarbutton.attr('title', _('Collapse sidebar'));
-    document.cookie = 'sidebar=expanded';
-  }
-
-  function add_sidebar_button() {
-    sidebarwrapper.css({
-        'float': 'left',
-        'margin-right': '0',
-        'width': ssb_width_expanded - 28
-    });
-    // create the button
-    sidebar.append(
-        '<div id="sidebarbutton"><span>«</span></div>'
-    );
-    var sidebarbutton = $('#sidebarbutton');
-    light_color = sidebarbutton.css('background-color');
-    // find the height of the viewport to center the '<<' in the page
-    var viewport_height;
-    if (window.innerHeight)
- 	  viewport_height = window.innerHeight;
-    else
-	  viewport_height = $(window).height();
-    sidebarbutton.find('span').css({
-        'display': 'block',
-        'margin-top': (viewport_height - sidebar.position().top - 20) / 2
-    });
-
-    sidebarbutton.click(toggle_sidebar);
-    sidebarbutton.attr('title', _('Collapse sidebar'));
-    sidebarbutton.css({
-        'color': '#FFFFFF',
-        'border-left': '1px solid ' + dark_color,
-        'font-size': '1.2em',
-        'cursor': 'pointer',
-        'height': bodywrapper.height(),
-        'padding-top': '1px',
-        'margin-left': ssb_width_expanded - 12
-    });
-
-    sidebarbutton.hover(
-      function () {
-          $(this).css('background-color', dark_color);
-      },
-      function () {
-          $(this).css('background-color', light_color);
-      }
-    );
-  }
-
-  function set_position_from_cookie() {
-    if (!document.cookie)
-      return;
-    var items = document.cookie.split(';');
-    for(var k=0; k<items.length; k++) {
-      var key_val = items[k].split('=');
-      var key = key_val[0];
-      if (key == 'sidebar') {
-        var value = key_val[1];
-        if ((value == 'collapsed') && (!sidebar_is_collapsed()))
-          collapse_sidebar();
-        else if ((value == 'expanded') && (sidebar_is_collapsed()))
-          expand_sidebar();
-      }
-    }
-  }
-
-  add_sidebar_button();
-  var sidebarbutton = $('#sidebarbutton');
-  set_position_from_cookie();
-});
diff --git a/lib/mako-0.7.2/doc/_static/site.css b/lib/mako-0.7.2/doc/_static/site.css
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_static/site.css
+++ /dev/null
@@ -1,82 +0,0 @@
-body { 
-    font-family: Tahoma, Geneva, sans-serif;
-    line-height:1.4em;
-    margin:15px;
-    background-color:#FFFFFF;
-}
-img {border:none;}
-a { text-decoration: none;}
-a:visited  { color: #2929ff;}
-a:hover { color: #0000ff;}
-
-#wrap {
-    margin:0 auto;
-    max-width:1024px;
-    min-width:480px;
-    position:relative;
-    
-}
-h1 {
-    font-size:1.6em;
-    font-weight:bold;
-}
-
-h2 {
-    font-size:1.1em;
-    font-weight:bold;
-    margin:10px 0px 10px 0px;
-}
-
-.clearfix{
-    clear:both;
-}
-
-.red {
-	font-weight:bold;
-	color:#FF0000;
-}
-.rightbar {
-    float:right;
-    margin:10px 30px 10px 30px;
-}
-.slogan {
-    margin-top:10px;
-}
-.toolbar {
-    margin-top:20px;
-}
-.copyright {
-    font-size:.8em;
-    text-align:center;
-    color:909090;
-}
-.pylogo {
-	text-align:right;
-	float:right;
-}
-.code {
-    font-family:monospace;
-}
-
-li {
-    margin:1px 0px 1px 0px;
-}
-
-.speedchart td {
-    font-size:small;
-}
-
-pre.codesample { 
-    margin: 1.5em; 
-    padding: .5em; 
-    font-size: .95em; 
-    line-height:1em;
-    background-color: #eee;
-    border: 1px solid #ccc;
-    width:450px;
-    overflow:auto;
-}
-
-#speedchart {
-    margin:5px 10px 5px 10px;
-}
diff --git a/lib/mako-0.7.2/doc/_static/underscore.js b/lib/mako-0.7.2/doc/_static/underscore.js
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_static/underscore.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// Underscore.js 0.5.5
-// (c) 2009 Jeremy Ashkenas, DocumentCloud Inc.
-// Underscore is freely distributable under the terms of the MIT license.
-// Portions of Underscore are inspired by or borrowed from Prototype.js,
-// Oliver Steele's Functional, and John Resig's Micro-Templating.
-// For all details and documentation:
-// http://documentcloud.github.com/underscore/
-(function(){var j=this,n=j._,i=function(a){this._wrapped=a},m=typeof StopIteration!=="undefined"?StopIteration:"__break__",b=j._=function(a){return new i(a)};if(typeof exports!=="undefined")exports._=b;var k=Array.prototype.slice,o=Array.prototype.unshift,p=Object.prototype.toString,q=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;b.VERSION="0.5.5";b.each=function(a,c,d){try{if(a.forEach)a.forEach(c,d);else if(b.isArray(a)||b.isArguments(a))for(var e=0,f=a.length;e<f;e++)c.call(d,
-a[e],e,a);else{var g=b.keys(a);f=g.length;for(e=0;e<f;e++)c.call(d,a[g[e]],g[e],a)}}catch(h){if(h!=m)throw h;}return a};b.map=function(a,c,d){if(a&&b.isFunction(a.map))return a.map(c,d);var e=[];b.each(a,function(f,g,h){e.push(c.call(d,f,g,h))});return e};b.reduce=function(a,c,d,e){if(a&&b.isFunction(a.reduce))return a.reduce(b.bind(d,e),c);b.each(a,function(f,g,h){c=d.call(e,c,f,g,h)});return c};b.reduceRight=function(a,c,d,e){if(a&&b.isFunction(a.reduceRight))return a.reduceRight(b.bind(d,e),c);
-var f=b.clone(b.toArray(a)).reverse();b.each(f,function(g,h){c=d.call(e,c,g,h,a)});return c};b.detect=function(a,c,d){var e;b.each(a,function(f,g,h){if(c.call(d,f,g,h)){e=f;b.breakLoop()}});return e};b.select=function(a,c,d){if(a&&b.isFunction(a.filter))return a.filter(c,d);var e=[];b.each(a,function(f,g,h){c.call(d,f,g,h)&&e.push(f)});return e};b.reject=function(a,c,d){var e=[];b.each(a,function(f,g,h){!c.call(d,f,g,h)&&e.push(f)});return e};b.all=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.every))return a.every(c,
-d);var e=true;b.each(a,function(f,g,h){(e=e&&c.call(d,f,g,h))||b.breakLoop()});return e};b.any=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.some))return a.some(c,d);var e=false;b.each(a,function(f,g,h){if(e=c.call(d,f,g,h))b.breakLoop()});return e};b.include=function(a,c){if(b.isArray(a))return b.indexOf(a,c)!=-1;var d=false;b.each(a,function(e){if(d=e===c)b.breakLoop()});return d};b.invoke=function(a,c){var d=b.rest(arguments,2);return b.map(a,function(e){return(c?e[c]:e).apply(e,d)})};b.pluck=
-function(a,c){return b.map(a,function(d){return d[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);var e={computed:-Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g>=e.computed&&(e={value:f,computed:g})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);var e={computed:Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g<e.computed&&(e={value:f,computed:g})});return e.value};b.sortBy=function(a,c,d){return b.pluck(b.map(a,
-function(e,f,g){return{value:e,criteria:c.call(d,e,f,g)}}).sort(function(e,f){e=e.criteria;f=f.criteria;return e<f?-1:e>f?1:0}),"value")};b.sortedIndex=function(a,c,d){d=d||b.identity;for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?(e=g+1):(f=g)}return e};b.toArray=function(a){if(!a)return[];if(a.toArray)return a.toArray();if(b.isArray(a))return a;if(b.isArguments(a))return k.call(a);return b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=function(a,c,d){return c&&!d?k.call(a,
-0,c):a[0]};b.rest=function(a,c,d){return k.call(a,b.isUndefined(c)||d?1:c)};b.last=function(a){return a[a.length-1]};b.compact=function(a){return b.select(a,function(c){return!!c})};b.flatten=function(a){return b.reduce(a,[],function(c,d){if(b.isArray(d))return c.concat(b.flatten(d));c.push(d);return c})};b.without=function(a){var c=b.rest(arguments);return b.select(a,function(d){return!b.include(c,d)})};b.uniq=function(a,c){return b.reduce(a,[],function(d,e,f){if(0==f||(c===true?b.last(d)!=e:!b.include(d,
-e)))d.push(e);return d})};b.intersect=function(a){var c=b.rest(arguments);return b.select(b.uniq(a),function(d){return b.all(c,function(e){return b.indexOf(e,d)>=0})})};b.zip=function(){for(var a=b.toArray(arguments),c=b.max(b.pluck(a,"length")),d=new Array(c),e=0;e<c;e++)d[e]=b.pluck(a,String(e));return d};b.indexOf=function(a,c){if(a.indexOf)return a.indexOf(c);for(var d=0,e=a.length;d<e;d++)if(a[d]===c)return d;return-1};b.lastIndexOf=function(a,c){if(a.lastIndexOf)return a.lastIndexOf(c);for(var d=
-a.length;d--;)if(a[d]===c)return d;return-1};b.range=function(a,c,d){var e=b.toArray(arguments),f=e.length<=1;a=f?0:e[0];c=f?e[0]:e[1];d=e[2]||1;e=Math.ceil((c-a)/d);if(e<=0)return[];e=new Array(e);f=a;for(var g=0;1;f+=d){if((d>0?f-c:c-f)>=0)return e;e[g++]=f}};b.bind=function(a,c){var d=b.rest(arguments,2);return function(){return a.apply(c||j,d.concat(b.toArray(arguments)))}};b.bindAll=function(a){var c=b.rest(arguments);if(c.length==0)c=b.functions(a);b.each(c,function(d){a[d]=b.bind(a[d],a)});
-return a};b.delay=function(a,c){var d=b.rest(arguments,2);return setTimeout(function(){return a.apply(a,d)},c)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(b.rest(arguments)))};b.wrap=function(a,c){return function(){var d=[a].concat(b.toArray(arguments));return c.apply(c,d)}};b.compose=function(){var a=b.toArray(arguments);return function(){for(var c=b.toArray(arguments),d=a.length-1;d>=0;d--)c=[a[d].apply(this,c)];return c[0]}};b.keys=function(a){if(b.isArray(a))return b.range(0,a.length);
-var c=[];for(var d in a)q.call(a,d)&&c.push(d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=function(a){return b.select(b.keys(a),function(c){return b.isFunction(a[c])}).sort()};b.extend=function(a,c){for(var d in c)a[d]=c[d];return a};b.clone=function(a){if(b.isArray(a))return a.slice(0);return b.extend({},a)};b.tap=function(a,c){c(a);return a};b.isEqual=function(a,c){if(a===c)return true;var d=typeof a;if(d!=typeof c)return false;if(a==c)return true;if(!a&&c||a&&!c)return false;
-if(a.isEqual)return a.isEqual(c);if(b.isDate(a)&&b.isDate(c))return a.getTime()===c.getTime();if(b.isNaN(a)&&b.isNaN(c))return true;if(b.isRegExp(a)&&b.isRegExp(c))return a.source===c.source&&a.global===c.global&&a.ignoreCase===c.ignoreCase&&a.multiline===c.multiline;if(d!=="object")return false;if(a.length&&a.length!==c.length)return false;d=b.keys(a);var e=b.keys(c);if(d.length!=e.length)return false;for(var f in a)if(!b.isEqual(a[f],c[f]))return false;return true};b.isEmpty=function(a){return b.keys(a).length==
-0};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=function(a){return!!(a&&a.concat&&a.unshift)};b.isArguments=function(a){return a&&b.isNumber(a.length)&&!b.isArray(a)&&!r.call(a,"length")};b.isFunction=function(a){return!!(a&&a.constructor&&a.call&&a.apply)};b.isString=function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)};b.isNumber=function(a){return p.call(a)==="[object Number]"};b.isDate=function(a){return!!(a&&a.getTimezoneOffset&&a.setUTCFullYear)};b.isRegExp=function(a){return!!(a&&
-a.test&&a.exec&&(a.ignoreCase||a.ignoreCase===false))};b.isNaN=function(a){return b.isNumber(a)&&isNaN(a)};b.isNull=function(a){return a===null};b.isUndefined=function(a){return typeof a=="undefined"};b.noConflict=function(){j._=n;return this};b.identity=function(a){return a};b.breakLoop=function(){throw m;};var s=0;b.uniqueId=function(a){var c=s++;return a?a+c:c};b.template=function(a,c){a=new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+a.replace(/[\r\t\n]/g,
-" ").replace(/'(?=[^%]*%>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<%=(.+?)%>/g,"',$1,'").split("<%").join("');").split("%>").join("p.push('")+"');}return p.join('');");return c?a(c):a};b.forEach=b.each;b.foldl=b.inject=b.reduce;b.foldr=b.reduceRight;b.filter=b.select;b.every=b.all;b.some=b.any;b.head=b.first;b.tail=b.rest;b.methods=b.functions;var l=function(a,c){return c?b(a).chain():a};b.each(b.functions(b),function(a){var c=b[a];i.prototype[a]=function(){var d=b.toArray(arguments);
-o.call(d,this._wrapped);return l(c.apply(b,d),this._chain)}});b.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){c.apply(this._wrapped,arguments);return l(this._wrapped,this._chain)}});b.each(["concat","join","slice"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){return l(c.apply(this._wrapped,arguments),this._chain)}});i.prototype.chain=function(){this._chain=true;return this};i.prototype.value=function(){return this._wrapped}})();
diff --git a/lib/mako-0.7.2/doc/_static/up-pressed.png b/lib/mako-0.7.2/doc/_static/up-pressed.png
deleted file mode 100644
Binary file lib/mako-0.7.2/doc/_static/up-pressed.png has changed
diff --git a/lib/mako-0.7.2/doc/_static/up.png b/lib/mako-0.7.2/doc/_static/up.png
deleted file mode 100644
Binary file lib/mako-0.7.2/doc/_static/up.png has changed
diff --git a/lib/mako-0.7.2/doc/_static/websupport.js b/lib/mako-0.7.2/doc/_static/websupport.js
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/_static/websupport.js
+++ /dev/null
@@ -1,808 +0,0 @@
-/*
- * websupport.js
- * ~~~~~~~~~~~~~
- *
- * sphinx.websupport utilties for all documentation.
- *
- * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-(function($) {
-  $.fn.autogrow = function() {
-    return this.each(function() {
-    var textarea = this;
-
-    $.fn.autogrow.resize(textarea);
-
-    $(textarea)
-      .focus(function() {
-        textarea.interval = setInterval(function() {
-          $.fn.autogrow.resize(textarea);
-        }, 500);
-      })
-      .blur(function() {
-        clearInterval(textarea.interval);
-      });
-    });
-  };
-
-  $.fn.autogrow.resize = function(textarea) {
-    var lineHeight = parseInt($(textarea).css('line-height'), 10);
-    var lines = textarea.value.split('\n');
-    var columns = textarea.cols;
-    var lineCount = 0;
-    $.each(lines, function() {
-      lineCount += Math.ceil(this.length / columns) || 1;
-    });
-    var height = lineHeight * (lineCount + 1);
-    $(textarea).css('height', height);
-  };
-})(jQuery);
-
-(function($) {
-  var comp, by;
-
-  function init() {
-    initEvents();
-    initComparator();
-  }
-
-  function initEvents() {
-    $('a.comment-close').live("click", function(event) {
-      event.preventDefault();
-      hide($(this).attr('id').substring(2));
-    });
-    $('a.vote').live("click", function(event) {
-      event.preventDefault();
-      handleVote($(this));
-    });
-    $('a.reply').live("click", function(event) {
-      event.preventDefault();
-      openReply($(this).attr('id').substring(2));
-    });
-    $('a.close-reply').live("click", function(event) {
-      event.preventDefault();
-      closeReply($(this).attr('id').substring(2));
-    });
-    $('a.sort-option').live("click", function(event) {
-      event.preventDefault();
-      handleReSort($(this));
-    });
-    $('a.show-proposal').live("click", function(event) {
-      event.preventDefault();
-      showProposal($(this).attr('id').substring(2));
-    });
-    $('a.hide-proposal').live("click", function(event) {
-      event.preventDefault();
-      hideProposal($(this).attr('id').substring(2));
-    });
-    $('a.show-propose-change').live("click", function(event) {
-      event.preventDefault();
-      showProposeChange($(this).attr('id').substring(2));
-    });
-    $('a.hide-propose-change').live("click", function(event) {
-      event.preventDefault();
-      hideProposeChange($(this).attr('id').substring(2));
-    });
-    $('a.accept-comment').live("click", function(event) {
-      event.preventDefault();
-      acceptComment($(this).attr('id').substring(2));
-    });
-    $('a.delete-comment').live("click", function(event) {
-      event.preventDefault();
-      deleteComment($(this).attr('id').substring(2));
-    });
-    $('a.comment-markup').live("click", function(event) {
-      event.preventDefault();
-      toggleCommentMarkupBox($(this).attr('id').substring(2));
-    });
-  }
-
-  /**
-   * Set comp, which is a comparator function used for sorting and
-   * inserting comments into the list.
-   */
-  function setComparator() {
-    // If the first three letters are "asc", sort in ascending order
-    // and remove the prefix.
-    if (by.substring(0,3) == 'asc') {
-      var i = by.substring(3);
-      comp = function(a, b) { return a[i] - b[i]; };
-    } else {
-      // Otherwise sort in descending order.
-      comp = function(a, b) { return b[by] - a[by]; };
-    }
-
-    // Reset link styles and format the selected sort option.
-    $('a.sel').attr('href', '#').removeClass('sel');
-    $('a.by' + by).removeAttr('href').addClass('sel');
-  }
-
-  /**
-   * Create a comp function. If the user has preferences stored in
-   * the sortBy cookie, use those, otherwise use the default.
-   */
-  function initComparator() {
-    by = 'rating'; // Default to sort by rating.
-    // If the sortBy cookie is set, use that instead.
-    if (document.cookie.length > 0) {
-      var start = document.cookie.indexOf('sortBy=');
-      if (start != -1) {
-        start = start + 7;
-        var end = document.cookie.indexOf(";", start);
-        if (end == -1) {
-          end = document.cookie.length;
-          by = unescape(document.cookie.substring(start, end));
-        }
-      }
-    }
-    setComparator();
-  }
-
-  /**
-   * Show a comment div.
-   */
-  function show(id) {
-    $('#ao' + id).hide();
-    $('#ah' + id).show();
-    var context = $.extend({id: id}, opts);
-    var popup = $(renderTemplate(popupTemplate, context)).hide();
-    popup.find('textarea[name="proposal"]').hide();
-    popup.find('a.by' + by).addClass('sel');
-    var form = popup.find('#cf' + id);
-    form.submit(function(event) {
-      event.preventDefault();
-      addComment(form);
-    });
-    $('#s' + id).after(popup);
-    popup.slideDown('fast', function() {
-      getComments(id);
-    });
-  }
-
-  /**
-   * Hide a comment div.
-   */
-  function hide(id) {
-    $('#ah' + id).hide();
-    $('#ao' + id).show();
-    var div = $('#sc' + id);
-    div.slideUp('fast', function() {
-      div.remove();
-    });
-  }
-
-  /**
-   * Perform an ajax request to get comments for a node
-   * and insert the comments into the comments tree.
-   */
-  function getComments(id) {
-    $.ajax({
-     type: 'GET',
-     url: opts.getCommentsURL,
-     data: {node: id},
-     success: function(data, textStatus, request) {
-       var ul = $('#cl' + id);
-       var speed = 100;
-       $('#cf' + id)
-         .find('textarea[name="proposal"]')
-         .data('source', data.source);
-
-       if (data.comments.length === 0) {
-         ul.html('<li>No comments yet.</li>');
-         ul.data('empty', true);
-       } else {
-         // If there are comments, sort them and put them in the list.
-         var comments = sortComments(data.comments);
-         speed = data.comments.length * 100;
-         appendComments(comments, ul);
-         ul.data('empty', false);
-       }
-       $('#cn' + id).slideUp(speed + 200);
-       ul.slideDown(speed);
-     },
-     error: function(request, textStatus, error) {
-       showError('Oops, there was a problem retrieving the comments.');
-     },
-     dataType: 'json'
-    });
-  }
-
-  /**
-   * Add a comment via ajax and insert the comment into the comment tree.
-   */
-  function addComment(form) {
-    var node_id = form.find('input[name="node"]').val();
-    var parent_id = form.find('input[name="parent"]').val();
-    var text = form.find('textarea[name="comment"]').val();
-    var proposal = form.find('textarea[name="proposal"]').val();
-
-    if (text == '') {
-      showError('Please enter a comment.');
-      return;
-    }
-
-    // Disable the form that is being submitted.
-    form.find('textarea,input').attr('disabled', 'disabled');
-
-    // Send the comment to the server.
-    $.ajax({
-      type: "POST",
-      url: opts.addCommentURL,
-      dataType: 'json',
-      data: {
-        node: node_id,
-        parent: parent_id,
-        text: text,
-        proposal: proposal
-      },
-      success: function(data, textStatus, error) {
-        // Reset the form.
-        if (node_id) {
-          hideProposeChange(node_id);
-        }
-        form.find('textarea')
-          .val('')
-          .add(form.find('input'))
-          .removeAttr('disabled');
-	var ul = $('#cl' + (node_id || parent_id));
-        if (ul.data('empty')) {
-          $(ul).empty();
-          ul.data('empty', false);
-        }
-        insertComment(data.comment);
-        var ao = $('#ao' + node_id);
-        ao.find('img').attr({'src': opts.commentBrightImage});
-        if (node_id) {
-          // if this was a "root" comment, remove the commenting box
-          // (the user can get it back by reopening the comment popup)
-          $('#ca' + node_id).slideUp();
-        }
-      },
-      error: function(request, textStatus, error) {
-        form.find('textarea,input').removeAttr('disabled');
-        showError('Oops, there was a problem adding the comment.');
-      }
-    });
-  }
-
-  /**
-   * Recursively append comments to the main comment list and children
-   * lists, creating the comment tree.
-   */
-  function appendComments(comments, ul) {
-    $.each(comments, function() {
-      var div = createCommentDiv(this);
-      ul.append($(document.createElement('li')).html(div));
-      appendComments(this.children, div.find('ul.comment-children'));
-      // To avoid stagnating data, don't store the comments children in data.
-      this.children = null;
-      div.data('comment', this);
-    });
-  }
-
-  /**
-   * After adding a new comment, it must be inserted in the correct
-   * location in the comment tree.
-   */
-  function insertComment(comment) {
-    var div = createCommentDiv(comment);
-
-    // To avoid stagnating data, don't store the comments children in data.
-    comment.children = null;
-    div.data('comment', comment);
-
-    var ul = $('#cl' + (comment.node || comment.parent));
-    var siblings = getChildren(ul);
-
-    var li = $(document.createElement('li'));
-    li.hide();
-
-    // Determine where in the parents children list to insert this comment.
-    for(i=0; i < siblings.length; i++) {
-      if (comp(comment, siblings[i]) <= 0) {
-        $('#cd' + siblings[i].id)
-          .parent()
-          .before(li.html(div));
-        li.slideDown('fast');
-        return;
-      }
-    }
-
-    // If we get here, this comment rates lower than all the others,
-    // or it is the only comment in the list.
-    ul.append(li.html(div));
-    li.slideDown('fast');
-  }
-
-  function acceptComment(id) {
-    $.ajax({
-      type: 'POST',
-      url: opts.acceptCommentURL,
-      data: {id: id},
-      success: function(data, textStatus, request) {
-        $('#cm' + id).fadeOut('fast');
-        $('#cd' + id).removeClass('moderate');
-      },
-      error: function(request, textStatus, error) {
-        showError('Oops, there was a problem accepting the comment.');
-      }
-    });
-  }
-
-  function deleteComment(id) {
-    $.ajax({
-      type: 'POST',
-      url: opts.deleteCommentURL,
-      data: {id: id},
-      success: function(data, textStatus, request) {
-        var div = $('#cd' + id);
-        if (data == 'delete') {
-          // Moderator mode: remove the comment and all children immediately
-          div.slideUp('fast', function() {
-            div.remove();
-          });
-          return;
-        }
-        // User mode: only mark the comment as deleted
-        div
-          .find('span.user-id:first')
-          .text('[deleted]').end()
-          .find('div.comment-text:first')
-          .text('[deleted]').end()
-          .find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
-                ', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
-          .remove();
-        var comment = div.data('comment');
-        comment.username = '[deleted]';
-        comment.text = '[deleted]';
-        div.data('comment', comment);
-      },
-      error: function(request, textStatus, error) {
-        showError('Oops, there was a problem deleting the comment.');
-      }
-    });
-  }
-
-  function showProposal(id) {
-    $('#sp' + id).hide();
-    $('#hp' + id).show();
-    $('#pr' + id).slideDown('fast');
-  }
-
-  function hideProposal(id) {
-    $('#hp' + id).hide();
-    $('#sp' + id).show();
-    $('#pr' + id).slideUp('fast');
-  }
-
-  function showProposeChange(id) {
-    $('#pc' + id).hide();
-    $('#hc' + id).show();
-    var textarea = $('#pt' + id);
-    textarea.val(textarea.data('source'));
-    $.fn.autogrow.resize(textarea[0]);
-    textarea.slideDown('fast');
-  }
-
-  function hideProposeChange(id) {
-    $('#hc' + id).hide();
-    $('#pc' + id).show();
-    var textarea = $('#pt' + id);
-    textarea.val('').removeAttr('disabled');
-    textarea.slideUp('fast');
-  }
-
-  function toggleCommentMarkupBox(id) {
-    $('#mb' + id).toggle();
-  }
-
-  /** Handle when the user clicks on a sort by link. */
-  function handleReSort(link) {
-    var classes = link.attr('class').split(/\s+/);
-    for (var i=0; i<classes.length; i++) {
-      if (classes[i] != 'sort-option') {
-	by = classes[i].substring(2);
-      }
-    }
-    setComparator();
-    // Save/update the sortBy cookie.
-    var expiration = new Date();
-    expiration.setDate(expiration.getDate() + 365);
-    document.cookie= 'sortBy=' + escape(by) +
-                     ';expires=' + expiration.toUTCString();
-    $('ul.comment-ul').each(function(index, ul) {
-      var comments = getChildren($(ul), true);
-      comments = sortComments(comments);
-      appendComments(comments, $(ul).empty());
-    });
-  }
-
-  /**
-   * Function to process a vote when a user clicks an arrow.
-   */
-  function handleVote(link) {
-    if (!opts.voting) {
-      showError("You'll need to login to vote.");
-      return;
-    }
-
-    var id = link.attr('id');
-    if (!id) {
-      // Didn't click on one of the voting arrows.
-      return;
-    }
-    // If it is an unvote, the new vote value is 0,
-    // Otherwise it's 1 for an upvote, or -1 for a downvote.
-    var value = 0;
-    if (id.charAt(1) != 'u') {
-      value = id.charAt(0) == 'u' ? 1 : -1;
-    }
-    // The data to be sent to the server.
-    var d = {
-      comment_id: id.substring(2),
-      value: value
-    };
-
-    // Swap the vote and unvote links.
-    link.hide();
-    $('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
-      .show();
-
-    // The div the comment is displayed in.
-    var div = $('div#cd' + d.comment_id);
-    var data = div.data('comment');
-
-    // If this is not an unvote, and the other vote arrow has
-    // already been pressed, unpress it.
-    if ((d.value !== 0) && (data.vote === d.value * -1)) {
-      $('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
-      $('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
-    }
-
-    // Update the comments rating in the local data.
-    data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
-    data.vote = d.value;
-    div.data('comment', data);
-
-    // Change the rating text.
-    div.find('.rating:first')
-      .text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
-
-    // Send the vote information to the server.
-    $.ajax({
-      type: "POST",
-      url: opts.processVoteURL,
-      data: d,
-      error: function(request, textStatus, error) {
-        showError('Oops, there was a problem casting that vote.');
-      }
-    });
-  }
-
-  /**
-   * Open a reply form used to reply to an existing comment.
-   */
-  function openReply(id) {
-    // Swap out the reply link for the hide link
-    $('#rl' + id).hide();
-    $('#cr' + id).show();
-
-    // Add the reply li to the children ul.
-    var div = $(renderTemplate(replyTemplate, {id: id})).hide();
-    $('#cl' + id)
-      .prepend(div)
-      // Setup the submit handler for the reply form.
-      .find('#rf' + id)
-      .submit(function(event) {
-        event.preventDefault();
-        addComment($('#rf' + id));
-        closeReply(id);
-      })
-      .find('input[type=button]')
-      .click(function() {
-        closeReply(id);
-      });
-    div.slideDown('fast', function() {
-      $('#rf' + id).find('textarea').focus();
-    });
-  }
-
-  /**
-   * Close the reply form opened with openReply.
-   */
-  function closeReply(id) {
-    // Remove the reply div from the DOM.
-    $('#rd' + id).slideUp('fast', function() {
-      $(this).remove();
-    });
-
-    // Swap out the hide link for the reply link
-    $('#cr' + id).hide();
-    $('#rl' + id).show();
-  }
-
-  /**
-   * Recursively sort a tree of comments using the comp comparator.
-   */
-  function sortComments(comments) {
-    comments.sort(comp);
-    $.each(comments, function() {
-      this.children = sortComments(this.children);
-    });
-    return comments;
-  }
-
-  /**
-   * Get the children comments from a ul. If recursive is true,
-   * recursively include childrens' children.
-   */
-  function getChildren(ul, recursive) {
-    var children = [];
-    ul.children().children("[id^='cd']")
-      .each(function() {
-        var comment = $(this).data('comment');
-        if (recursive)
-          comment.children = getChildren($(this).find('#cl' + comment.id), true);
-        children.push(comment);
-      });
-    return children;
-  }
-
-  /** Create a div to display a comment in. */
-  function createCommentDiv(comment) {
-    if (!comment.displayed && !opts.moderator) {
-      return $('<div class="moderate">Thank you!  Your comment will show up '
-               + 'once it is has been approved by a moderator.</div>');
-    }
-    // Prettify the comment rating.
-    comment.pretty_rating = comment.rating + ' point' +
-      (comment.rating == 1 ? '' : 's');
-    // Make a class (for displaying not yet moderated comments differently)
-    comment.css_class = comment.displayed ? '' : ' moderate';
-    // Create a div for this comment.
-    var context = $.extend({}, opts, comment);
-    var div = $(renderTemplate(commentTemplate, context));
-
-    // If the user has voted on this comment, highlight the correct arrow.
-    if (comment.vote) {
-      var direction = (comment.vote == 1) ? 'u' : 'd';
-      div.find('#' + direction + 'v' + comment.id).hide();
-      div.find('#' + direction + 'u' + comment.id).show();
-    }
-
-    if (opts.moderator || comment.text != '[deleted]') {
-      div.find('a.reply').show();
-      if (comment.proposal_diff)
-        div.find('#sp' + comment.id).show();
-      if (opts.moderator && !comment.displayed)
-        div.find('#cm' + comment.id).show();
-      if (opts.moderator || (opts.username == comment.username))
-        div.find('#dc' + comment.id).show();
-    }
-    return div;
-  }
-
-  /**
-   * A simple template renderer. Placeholders such as <%id%> are replaced
-   * by context['id'] with items being escaped. Placeholders such as <#id#>
-   * are not escaped.
-   */
-  function renderTemplate(template, context) {
-    var esc = $(document.createElement('div'));
-
-    function handle(ph, escape) {
-      var cur = context;
-      $.each(ph.split('.'), function() {
-        cur = cur[this];
-      });
-      return escape ? esc.text(cur || "").html() : cur;
-    }
-
-    return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
-      return handle(arguments[2], arguments[1] == '%' ? true : false);
-    });
-  }
-
-  /** Flash an error message briefly. */
-  function showError(message) {
-    $(document.createElement('div')).attr({'class': 'popup-error'})
-      .append($(document.createElement('div'))
-               .attr({'class': 'error-message'}).text(message))
-      .appendTo('body')
-      .fadeIn("slow")
-      .delay(2000)
-      .fadeOut("slow");
-  }
-
-  /** Add a link the user uses to open the comments popup. */
-  $.fn.comment = function() {
-    return this.each(function() {
-      var id = $(this).attr('id').substring(1);
-      var count = COMMENT_METADATA[id];
-      var title = count + ' comment' + (count == 1 ? '' : 's');
-      var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
-      var addcls = count == 0 ? ' nocomment' : '';
-      $(this)
-        .append(
-          $(document.createElement('a')).attr({
-            href: '#',
-            'class': 'sphinx-comment-open' + addcls,
-            id: 'ao' + id
-          })
-            .append($(document.createElement('img')).attr({
-              src: image,
-              alt: 'comment',
-              title: title
-            }))
-            .click(function(event) {
-              event.preventDefault();
-              show($(this).attr('id').substring(2));
-            })
-        )
-        .append(
-          $(document.createElement('a')).attr({
-            href: '#',
-            'class': 'sphinx-comment-close hidden',
-            id: 'ah' + id
-          })
-            .append($(document.createElement('img')).attr({
-              src: opts.closeCommentImage,
-              alt: 'close',
-              title: 'close'
-            }))
-            .click(function(event) {
-              event.preventDefault();
-              hide($(this).attr('id').substring(2));
-            })
-        );
-    });
-  };
-
-  var opts = {
-    processVoteURL: '/_process_vote',
-    addCommentURL: '/_add_comment',
-    getCommentsURL: '/_get_comments',
-    acceptCommentURL: '/_accept_comment',
-    deleteCommentURL: '/_delete_comment',
-    commentImage: '/static/_static/comment.png',
-    closeCommentImage: '/static/_static/comment-close.png',
-    loadingImage: '/static/_static/ajax-loader.gif',
-    commentBrightImage: '/static/_static/comment-bright.png',
-    upArrow: '/static/_static/up.png',
-    downArrow: '/static/_static/down.png',
-    upArrowPressed: '/static/_static/up-pressed.png',
-    downArrowPressed: '/static/_static/down-pressed.png',
-    voting: false,
-    moderator: false
-  };
-
-  if (typeof COMMENT_OPTIONS != "undefined") {
-    opts = jQuery.extend(opts, COMMENT_OPTIONS);
-  }
-
-  var popupTemplate = '\
-    <div class="sphinx-comments" id="sc<%id%>">\
-      <p class="sort-options">\
-        Sort by:\
-        <a href="#" class="sort-option byrating">best rated</a>\
-        <a href="#" class="sort-option byascage">newest</a>\
-        <a href="#" class="sort-option byage">oldest</a>\
-      </p>\
-      <div class="comment-header">Comments</div>\
-      <div class="comment-loading" id="cn<%id%>">\
-        loading comments... <img src="<%loadingImage%>" alt="" /></div>\
-      <ul id="cl<%id%>" class="comment-ul"></ul>\
-      <div id="ca<%id%>">\
-      <p class="add-a-comment">Add a comment\
-        (<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
-      <div class="comment-markup-box" id="mb<%id%>">\
-        reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
-        <tt>``code``</tt>, \
-        code blocks: <tt>::</tt> and an indented block after blank line</div>\
-      <form method="post" id="cf<%id%>" class="comment-form" action="">\
-        <textarea name="comment" cols="80"></textarea>\
-        <p class="propose-button">\
-          <a href="#" id="pc<%id%>" class="show-propose-change">\
-            Propose a change ▹\
-          </a>\
-          <a href="#" id="hc<%id%>" class="hide-propose-change">\
-            Propose a change ▿\
-          </a>\
-        </p>\
-        <textarea name="proposal" id="pt<%id%>" cols="80"\
-                  spellcheck="false"></textarea>\
-        <input type="submit" value="Add comment" />\
-        <input type="hidden" name="node" value="<%id%>" />\
-        <input type="hidden" name="parent" value="" />\
-      </form>\
-      </div>\
-    </div>';
-
-  var commentTemplate = '\
-    <div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
-      <div class="vote">\
-        <div class="arrow">\
-          <a href="#" id="uv<%id%>" class="vote" title="vote up">\
-            <img src="<%upArrow%>" />\
-          </a>\
-          <a href="#" id="uu<%id%>" class="un vote" title="vote up">\
-            <img src="<%upArrowPressed%>" />\
-          </a>\
-        </div>\
-        <div class="arrow">\
-          <a href="#" id="dv<%id%>" class="vote" title="vote down">\
-            <img src="<%downArrow%>" id="da<%id%>" />\
-          </a>\
-          <a href="#" id="du<%id%>" class="un vote" title="vote down">\
-            <img src="<%downArrowPressed%>" />\
-          </a>\
-        </div>\
-      </div>\
-      <div class="comment-content">\
-        <p class="tagline comment">\
-          <span class="user-id"><%username%></span>\
-          <span class="rating"><%pretty_rating%></span>\
-          <span class="delta"><%time.delta%></span>\
-        </p>\
-        <div class="comment-text comment"><#text#></div>\
-        <p class="comment-opts comment">\
-          <a href="#" class="reply hidden" id="rl<%id%>">reply ▹</a>\
-          <a href="#" class="close-reply" id="cr<%id%>">reply ▿</a>\
-          <a href="#" id="sp<%id%>" class="show-proposal">proposal ▹</a>\
-          <a href="#" id="hp<%id%>" class="hide-proposal">proposal ▿</a>\
-          <a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
-          <span id="cm<%id%>" class="moderation hidden">\
-            <a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
-          </span>\
-        </p>\
-        <pre class="proposal" id="pr<%id%>">\
-<#proposal_diff#>\
-        </pre>\
-          <ul class="comment-children" id="cl<%id%>"></ul>\
-        </div>\
-        <div class="clearleft"></div>\
-      </div>\
-    </div>';
-
-  var replyTemplate = '\
-    <li>\
-      <div class="reply-div" id="rd<%id%>">\
-        <form id="rf<%id%>">\
-          <textarea name="comment" cols="80"></textarea>\
-          <input type="submit" value="Add reply" />\
-          <input type="button" value="Cancel" />\
-          <input type="hidden" name="parent" value="<%id%>" />\
-          <input type="hidden" name="node" value="" />\
-        </form>\
-      </div>\
-    </li>';
-
-  $(document).ready(function() {
-    init();
-  });
-})(jQuery);
-
-$(document).ready(function() {
-  // add comment anchors for all paragraphs that are commentable
-  $('.sphinx-has-comment').comment();
-
-  // highlight search words in search results
-  $("div.context").each(function() {
-    var params = $.getQueryParameters();
-    var terms = (params.q) ? params.q[0].split(/\s+/) : [];
-    var result = $(this);
-    $.each(terms, function() {
-      result.highlightText(this.toLowerCase(), 'highlighted');
-    });
-  });
-
-  // directly open comment window if requested
-  var anchor = document.location.hash;
-  if (anchor.substring(0, 9) == '#comment-') {
-    $('#ao' + anchor.substring(9)).click();
-    document.location.hash = '#s' + anchor.substring(9);
-  }
-});
diff --git a/lib/mako-0.7.2/doc/build/Makefile b/lib/mako-0.7.2/doc/build/Makefile
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/Makefile
+++ /dev/null
@@ -1,137 +0,0 @@
-# Makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS    =
-SPHINXBUILD   = sphinx-build
-PAPER         =
-BUILDDIR      = output
-
-# Internal variables.
-PAPEROPT_a4     = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest dist-html site-mako
-
-help:
-	@echo "Please use \`make <target>' where <target> is one of"
-	@echo "  html       to make standalone HTML files"
-	@echo "  dist-html  same as html, but places files in /doc"
-	@echo "  dirhtml    to make HTML files named index.html in directories"
-	@echo "  singlehtml to make a single large HTML file"
-	@echo "  pickle     to make pickle files"
-	@echo "  json       to make JSON files"
-	@echo "  htmlhelp   to make HTML files and a HTML help project"
-	@echo "  qthelp     to make HTML files and a qthelp project"
-	@echo "  devhelp    to make HTML files and a Devhelp project"
-	@echo "  epub       to make an epub"
-	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
-	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
-	@echo "  text       to make text files"
-	@echo "  man        to make manual pages"
-	@echo "  changes    to make an overview of all changed/added/deprecated items"
-	@echo "  linkcheck  to check all external links for integrity"
-	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
-
-clean:
-	-rm -rf $(BUILDDIR)/*
-
-html:
-	$(SPHINXBUILD) -b html -A mako_layout=html $(ALLSPHINXOPTS) $(BUILDDIR)/html
-	@echo
-	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-
-dist-html:
-	$(SPHINXBUILD) -b html -A mako_layout=html $(ALLSPHINXOPTS) ..
-	@echo
-	@echo "Build finished.  The HTML pages are in ../."
-
-dirhtml:
-	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
-	@echo
-	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
-singlehtml:
-	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
-	@echo
-	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
-
-pickle:
-	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
-	@echo
-	@echo "Build finished; now you can process the pickle files."
-
-json:
-	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
-	@echo
-	@echo "Build finished; now you can process the JSON files."
-
-htmlhelp:
-	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
-	@echo
-	@echo "Build finished; now you can run HTML Help Workshop with the" \
-	      ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-qthelp:
-	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
-	@echo
-	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
-	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
-	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/SQLAlchemy.qhcp"
-	@echo "To view the help file:"
-	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/SQLAlchemy.qhc"
-
-devhelp:
-	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
-	@echo
-	@echo "Build finished."
-	@echo "To view the help file:"
-	@echo "# mkdir -p $$HOME/.local/share/devhelp/SQLAlchemy"
-	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/SQLAlchemy"
-	@echo "# devhelp"
-
-epub:
-	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
-	@echo
-	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-
-latex:
-	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
-	cp texinputs/* $(BUILDDIR)/latex/
-	@echo
-	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
-	@echo "Run \`make' in that directory to run these through (pdf)latex" \
-	      "(use \`make latexpdf' here to do that automatically)."
-
-latexpdf:
-	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
-	@echo "Running LaTeX files through pdflatex..."
-	make -C $(BUILDDIR)/latex all-pdf
-	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-text:
-	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
-	@echo
-	@echo "Build finished. The text files are in $(BUILDDIR)/text."
-
-man:
-	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
-	@echo
-	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
-
-changes:
-	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
-	@echo
-	@echo "The overview file is in $(BUILDDIR)/changes."
-
-linkcheck:
-	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
-	@echo
-	@echo "Link check complete; look for any errors in the above output " \
-	      "or in $(BUILDDIR)/linkcheck/output.txt."
-
-doctest:
-	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) .
-	@echo "Testing of doctests in the sources finished, look at the " \
-	      "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/lib/mako-0.7.2/doc/build/builder/__init__.py b/lib/mako-0.7.2/doc/build/builder/__init__.py
deleted file mode 100644
diff --git a/lib/mako-0.7.2/doc/build/builder/builders.py b/lib/mako-0.7.2/doc/build/builder/builders.py
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/builder/builders.py
+++ /dev/null
@@ -1,97 +0,0 @@
-from sphinx.application import TemplateBridge
-from sphinx.builders.html import StandaloneHTMLBuilder
-from sphinx.highlighting import PygmentsBridge
-from sphinx.jinja2glue import BuiltinTemplateLoader
-from pygments import highlight
-from pygments.lexer import RegexLexer, bygroups, using
-from pygments.token import *
-from pygments.filter import Filter, apply_filters
-from pygments.lexers import PythonLexer, PythonConsoleLexer
-from pygments.formatters import HtmlFormatter, LatexFormatter
-import re
-import os
-from mako.lookup import TemplateLookup
-from mako.template import Template
-from mako.ext.pygmentplugin import MakoLexer
-
-rtd = os.environ.get('READTHEDOCS', None) == 'True'
-
-class MakoBridge(TemplateBridge):
-    def init(self, builder, *args, **kw):
-        self.jinja2_fallback = BuiltinTemplateLoader()
-        self.jinja2_fallback.init(builder, *args, **kw)
-
-        builder.config.html_context['site_base'] = builder.config['site_base']
-
-        self.lookup = TemplateLookup(
-            directories=builder.config.templates_path,
-            imports=[
-                "from builder import util"
-            ]
-        )
-
-    def render(self, template, context):
-        template = template.replace(".html", ".mako")
-        context['prevtopic'] = context.pop('prev', None)
-        context['nexttopic'] = context.pop('next', None)
-
-        # RTD layout
-        if rtd:
-            # add variables if not present, such 
-            # as if local test of READTHEDOCS variable
-            if 'MEDIA_URL' not in context:
-                context['MEDIA_URL'] = "http://media.readthedocs.org/"
-            if 'slug' not in context:
-                context['slug'] = "mako-test-slug"
-            if 'url' not in context:
-                context['url'] = "/some/test/url"
-            if 'current_version' not in context:
-                context['current_version'] = "some_version"
-            if 'versions' not in context:
-                context['versions'] = [('default', '/default/')]
-
-            context['docs_base'] = "http://readthedocs.org"
-            context['toolbar'] = True
-            context['layout'] = "rtd_layout.mako"
-            context['pdf_url'] = "%spdf/%s/%s/%s.pdf" % (
-                    context['MEDIA_URL'],
-                    context['slug'],
-                    context['current_version'],
-                    context['slug']
-            )
-        # local docs layout
-        else:
-            context['toolbar'] = False
-            context['docs_base'] = "/"
-            context['layout'] = "layout.mako"
-
-        context.setdefault('_', lambda x:x)
-        return self.lookup.get_template(template).render_unicode(**context)
-
-    def render_string(self, template, context):
-        # this is used for  .js, .css etc. and we don't have
-        # local copies of that stuff here so use the jinja render.
-        return self.jinja2_fallback.render_string(template, context)
-
-class StripDocTestFilter(Filter):
-    def filter(self, lexer, stream):
-        for ttype, value in stream:
-            if ttype is Token.Comment and re.match(r'#\s*doctest:', value):
-                continue
-            yield ttype, value
-
-
-def autodoc_skip_member(app, what, name, obj, skip, options):
-    if what == 'class' and skip and name == '__init__':
-        return False
-    else:
-        return skip
-
-def setup(app):
-#    app.connect('autodoc-skip-member', autodoc_skip_member)
-    # Mako is already in Pygments, adding the local
-    # lexer here so that the latest syntax is available
-    app.add_lexer('mako', MakoLexer())
-    app.add_config_value('site_base', "", True)
- 
- 
\ No newline at end of file
diff --git a/lib/mako-0.7.2/doc/build/builder/util.py b/lib/mako-0.7.2/doc/build/builder/util.py
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/builder/util.py
+++ /dev/null
@@ -1,12 +0,0 @@
-import re
-
-def striptags(text):
-    return re.compile(r'<[^>]*>').sub('', text)
-
-def go(m):
-    # .html with no anchor if present, otherwise "#" for top of page
-    return m.group(1) or '#'
- 
-def strip_toplevel_anchors(text):
-    return re.compile(r'(\.html)?#[-\w]+-toplevel').sub(go, text)
- 
diff --git a/lib/mako-0.7.2/doc/build/caching.rst b/lib/mako-0.7.2/doc/build/caching.rst
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/caching.rst
+++ /dev/null
@@ -1,393 +0,0 @@
-.. _caching_toplevel:
-
-=======
-Caching
-=======
-
-Any template or component can be cached using the ``cache``
-argument to the ``<%page>``, ``<%def>`` or ``<%block>`` directives:
-
-.. sourcecode:: mako
-
-    <%page cached="True"/>
-
-    template text
-
-The above template, after being executed the first time, will
-store its content within a cache that by default is scoped
-within memory. Subsequent calls to the template's :meth:`~.Template.render`
-method will return content directly from the cache. When the
-:class:`.Template` object itself falls out of scope, its corresponding
-cache is garbage collected along with the template.
-
-By default, caching requires that the `Beaker <http://beaker.readthedocs.org/>`_ package be installed on the
-system, however the mechanism of caching can be customized to use
-any third party or user defined system -- see :ref:`cache_plugins`.
-
-In addition to being available on the ``<%page>`` tag, the caching flag and all
-its options can be used with the ``<%def>`` tag as well:
-
-.. sourcecode:: mako
-
-    <%def name="mycomp" cached="True" cache_timeout="60">
-        other text
-    </%def>
-
-... and equivalently with the ``<%block>`` tag, anonymous or named:
-
-.. sourcecode:: mako
-
-    <%block cached="True" cache_timeout="60">
-        other text
-    </%block>
-
-Cache Arguments
-===============
-
-Mako has two cache arguments available on tags that are
-available in all cases.   The rest of the arguments
-available are specific to a backend.
-
-The two generic tags arguments are:
-
-* ``cached="True"`` - enable caching for this ``<%page>``,
-  ``<%def>``, or ``<%block>``.
-* ``cache_key`` - the "key" used to uniquely identify this content
-  in the cache.   Usually, this key is chosen automatically
-  based on the name of the rendering callable (i.e. ``body``
-  when used in ``<%page>``, the name of the def when using ``<%def>``,
-  the explicit or internally-generated name when using ``<%block>``).
-  Using the ``cache_key`` parameter, the key can be overridden
-  using a fixed or programmatically generated value.
-
-  For example, here's a page
-  that caches any page which inherits from it, based on the
-  filename of the calling template:
-
-  .. sourcecode:: mako
-
-     <%page cached="True" cache_key="${self.filename}"/>
-
-     ${next.body()}
-
-     ## rest of template
-
-On a :class:`.Template` or :class:`.TemplateLookup`, the
-caching can be configured using these arguments:
-
-* ``cache_enabled`` - Setting this
-  to ``False`` will disable all caching functionality
-  when the template renders.  Defaults to ``True``.
-  e.g.:
-
-  .. sourcecode:: python
-
-      lookup = TemplateLookup(
-                      directories='/path/to/templates',
-                      cache_enabled = False
-                      )
-
-* ``cache_impl`` - The string name of the cache backend
-  to use.   This defaults to ``'beaker'``, which has historically
-  been the only cache backend supported by Mako.
-
-  .. versionadded:: 0.6.0
-
-  For example, here's how to use the upcoming
-  `dogpile.cache <http://dogpilecache.readthedocs.org>`_
-  backend:
-
-  .. sourcecode:: python
-
-      lookup = TemplateLookup(
-                      directories='/path/to/templates',
-                      cache_impl = 'dogpile.cache',
-                      cache_args = {'regions':my_dogpile_regions}
-                      )
-
-* ``cache_args`` - A dictionary of cache parameters that
-  will be consumed by the cache backend.   See
-  :ref:`beaker_backend` for examples.
-
-  .. versionadded:: 0.6.0
-
-Backend-Specific Cache Arguments
---------------------------------
-
-The ``<%page>``, ``<%def>``, and ``<%block>`` tags
-accept any named argument that starts with the prefix ``"cache_"``.
-Those arguments are then packaged up and passed along to the
-underlying caching implementation, minus the ``"cache_"`` prefix.
-
-The actual arguments understood are determined by the backend.
-
-* :ref:`beaker_backend` - Includes arguments understood by
-  Beaker.
-* :ref:`dogpile.cache_backend` - Includes arguments understood by
-  dogpile.cache.
-
-.. _beaker_backend:
-
-Using the Beaker Cache Backend
-------------------------------
-
-When using Beaker, new implementations will want to make usage
-of **cache regions** so that cache configurations can be maintained
-externally to templates.  These configurations live under
-named "regions" that can be referred to within templates themselves.
-
-.. versionadded:: 0.6.0
-   Support for Beaker cache regions.
-
-For example, suppose we would like two regions.  One is a "short term"
-region that will store content in a memory-based dictionary,
-expiring after 60 seconds.   The other is a Memcached region,
-where values should expire in five minutes.   To configure
-our :class:`.TemplateLookup`, first we get a handle to a
-:class:`beaker.cache.CacheManager`:
-
-.. sourcecode:: python
-
-    from beaker.cache import CacheManager
-
-    manager = CacheManager(cache_regions={
-        'short_term':{
-            'type': 'memory',
-            'expire': 60
-        },
-        'long_term':{
-            'type': 'ext:memcached',
-            'url': '127.0.0.1:11211',
-            'expire': 300
-        }
-    })
-
-    lookup = TemplateLookup(
-                    directories=['/path/to/templates'],
-                    module_directory='/path/to/modules',
-                    cache_impl='beaker',
-                    cache_args={
-                        'manager':manager
-                    }
-            )
-
-Our templates can then opt to cache data in one of either region,
-using the ``cache_region`` argument.   Such as using ``short_term``
-at the ``<%page>`` level:
-
-.. sourcecode:: mako
-
-    <%page cached="True" cache_region="short_term">
-
-    ## ...
-
-Or, ``long_term`` at the ``<%block>`` level:
-
-.. sourcecode:: mako
-
-    <%block name="header" cached="True" cache_region="long_term">
-        other text
-    </%block>
-
-The Beaker backend also works without regions.   There are a
-variety of arguments that can be passed to the ``cache_args``
-dictionary, which are also allowable in templates via the
-``<%page>``, ``<%block>``,
-and ``<%def>`` tags specific to those sections.   The values
-given override those specified at the  :class:`.TemplateLookup`
-or :class:`.Template` level.
-
-With the possible exception
-of ``cache_timeout``, these arguments are probably better off
-staying at the template configuration level.  Each argument
-specified as ``cache_XYZ`` in a template tag is specified
-without the ``cache_`` prefix in the ``cache_args`` dictionary:
-
-* ``cache_timeout`` - number of seconds in which to invalidate the
-  cached data.  After this timeout, the content is re-generated
-  on the next call.  Available as ``timeout`` in the ``cache_args``
-  dictionary.
-* ``cache_type`` - type of caching. ``'memory'``, ``'file'``, ``'dbm'``, or
-  ``'ext:memcached'`` (note that  the string ``memcached`` is
-  also accepted by the dogpile.cache Mako plugin, though not by Beaker itself).
-  Available as ``type`` in the ``cache_args`` dictionary.
-* ``cache_url`` - (only used for ``memcached`` but required) a single
-  IP address or a semi-colon separated list of IP address of
-  memcache servers to use.  Available as ``url`` in the ``cache_args``
-  dictionary.
-* ``cache_dir`` - in the case of the ``'file'`` and ``'dbm'`` cache types,
-  this is the filesystem directory with which to store data
-  files. If this option is not present, the value of
-  ``module_directory`` is used (i.e. the directory where compiled
-  template modules are stored). If neither option is available
-  an exception is thrown.  Available as ``dir`` in the
-  ``cache_args`` dictionary.
-
-.. _dogpile.cache_backend:
-
-Using the dogpile.cache Backend
--------------------------------
-
-`dogpile.cache`_ is a new replacement for Beaker.   It provides
-a modernized, slimmed down interface and is generally easier to use
-than Beaker.   As of this writing it has not yet been released.  dogpile.cache
-includes its own Mako cache plugin -- see :mod:`dogpile.cache.plugins.mako_cache` in the
-dogpile.cache documentation.
-
-Programmatic Cache Access
-=========================
-
-The :class:`.Template`, as well as any template-derived :class:`.Namespace`, has
-an accessor called ``cache`` which returns the :class:`.Cache` object
-for that template. This object is a facade on top of the underlying
-:class:`.CacheImpl` object, and provides some very rudimental
-capabilities, such as the ability to get and put arbitrary
-values:
-
-.. sourcecode:: mako
-
-    <%
-        local.cache.set("somekey", type="memory", "somevalue")
-    %>
-
-Above, the cache associated with the ``local`` namespace is
-accessed and a key is placed within a memory cache.
-
-More commonly, the ``cache`` object is used to invalidate cached
-sections programmatically:
-
-.. sourcecode:: python
-
-    template = lookup.get_template('/sometemplate.html')
-
-    # invalidate the "body" of the template
-    template.cache.invalidate_body()
-
-    # invalidate an individual def
-    template.cache.invalidate_def('somedef')
-
-    # invalidate an arbitrary key
-    template.cache.invalidate('somekey')
-
-You can access any special method or attribute of the :class:`.CacheImpl`
-itself using the :attr:`impl <.Cache.impl>` attribute:
-
-.. sourcecode:: python
-
-    template.cache.impl.do_something_special()
-
-Note that using implementation-specific methods will mean you can't
-swap in a different kind of :class:`.CacheImpl` implementation at a
-later time.
-
-.. _cache_plugins:
-
-Cache Plugins
-=============
-
-The mechanism used by caching can be plugged in
-using a :class:`.CacheImpl` subclass.    This class implements
-the rudimental methods Mako needs to implement the caching
-API.   Mako includes the :class:`.BeakerCacheImpl` class to
-provide the default implementation.  A :class:`.CacheImpl` class
-is acquired by Mako using a ``pkg_resources`` entrypoint, using
-the name given as the ``cache_impl`` argument to :class:`.Template`
-or :class:`.TemplateLookup`.    This entry point can be
-installed via the standard `setuptools`/``setup()`` procedure, underneath
-the `EntryPoint` group named ``"mako.cache"``.  It can also be
-installed at runtime via a convenience installer :func:`.register_plugin`
-which accomplishes essentially the same task.
-
-An example plugin that implements a local dictionary cache:
-
-.. sourcecode:: python
-
-    from mako.cache import Cacheimpl, register_plugin
-
-    class SimpleCacheImpl(CacheImpl):
-        def __init__(self, cache):
-            super(SimpleCacheImpl, self).__init__(cache)
-            self._cache = {}
-
-        def get_or_create(self, key, creation_function, **kw):
-            if key in self._cache:
-                return self._cache[key]
-            else:
-                self._cache[key] = value = creation_function()
-                return value
-
-        def set(self, key, value, **kwargs):
-            self._cache[key] = value
-
-        def get(self, key, **kwargs):
-            return self._cache.get(key)
-
-        def invalidate(self, key, **kwargs):
-            self._cache.pop(key, None)
-
-    # optional - register the class locally
-    register_plugin("simple", __name__, "SimpleCacheImpl")
-
-Enabling the above plugin in a template would look like:
-
-.. sourcecode:: python
-
-    t = Template("mytemplate",
-                 file="mytemplate.html",
-                 cache_impl='simple')
-
-Guidelines for Writing Cache Plugins
-------------------------------------
-
-* The :class:`.CacheImpl` is created on a per-:class:`.Template` basis.  The
-  class should ensure that only data for the parent :class:`.Template` is
-  persisted or returned by the cache methods.    The actual :class:`.Template`
-  is available via the ``self.cache.template`` attribute.   The ``self.cache.id``
-  attribute, which is essentially the unique modulename of the template, is
-  a good value to use in order to represent a unique namespace of keys specific
-  to the template.
-* Templates only use the :meth:`.CacheImpl.get_or_create()` method
-  in an implicit fashion.  The :meth:`.CacheImpl.set`,
-  :meth:`.CacheImpl.get`, and :meth:`.CacheImpl.invalidate` methods are
-  only used in response to direct programmatic access to the corresponding
-  methods on the :class:`.Cache` object.
-* :class:`.CacheImpl` will be accessed in a multithreaded fashion if the
-  :class:`.Template` itself is used multithreaded.  Care should be taken
-  to ensure caching implementations are threadsafe.
-* A library like `Dogpile <http://pypi.python.org/pypi/dogpile.core>`_, which
-  is a minimal locking system derived from Beaker, can be used to help
-  implement the :meth:`.CacheImpl.get_or_create` method in a threadsafe
-  way that can maximize effectiveness across multiple threads as well
-  as processes. :meth:`.CacheImpl.get_or_create` is the
-  key method used by templates.
-* All arguments passed to ``**kw`` come directly from the parameters
-  inside the ``<%def>``, ``<%block>``, or ``<%page>`` tags directly,
-  minus the ``"cache_"`` prefix, as strings, with the exception of
-  the argument ``cache_timeout``, which is passed to the plugin
-  as the name ``timeout`` with the value converted to an integer.
-  Arguments present in ``cache_args`` on :class:`.Template` or
-  :class:`.TemplateLookup` are passed directly, but are superseded
-  by those present in the most specific template tag.
-* The directory where :class:`.Template` places module files can
-  be acquired using the accessor ``self.cache.template.module_directory``.
-  This directory can be a good place to throw cache-related work
-  files, underneath a prefix like ``_my_cache_work`` so that name
-  conflicts with generated modules don't occur.
-
-API Reference
-=============
-
-.. autoclass:: mako.cache.Cache
-    :members:
-    :show-inheritance:
-
-.. autoclass:: mako.cache.CacheImpl
-    :members:
-    :show-inheritance:
-
-.. autofunction:: mako.cache.register_plugin
-
-.. autoclass:: mako.ext.beaker_cache.BeakerCacheImpl
-    :members:
-    :show-inheritance:
-
diff --git a/lib/mako-0.7.2/doc/build/conf.py b/lib/mako-0.7.2/doc/build/conf.py
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/conf.py
+++ /dev/null
@@ -1,287 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Mako documentation build configuration file
-#
-# This file is execfile()d with the current directory set to its containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import sys, os
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.insert(0, os.path.abspath('../..'))
-sys.path.insert(0, os.path.abspath('.'))
-
-import mako
-
-# -- General configuration -----------------------------------------------------
-
-# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
-
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-#extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode',
-#                'sphinx.ext.doctest', 'builder.builders']
-
-extensions = ['sphinx.ext.autodoc','sphinx.ext.intersphinx',
-                'sphinx.ext.doctest', 'builder.builders']
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['templates']
-
-nitpicky = True
-
-site_base = "http://www.makotemplates.org"
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-template_bridge = "builder.builders.MakoBridge"
-
-# The encoding of source files.
-#source_encoding = 'utf-8-sig'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = u'Mako'
-copyright = u'the Mako authors and contributors'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = mako.__version__
-# The full version, including alpha/beta/rc tags.
-release = mako.__version__
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-exclude_patterns = ['build']
-
-# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-
-# -- Options for HTML output ---------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages.  See the documentation for
-# a list of builtin themes.
-html_theme = 'default'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further.  For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
-# The style sheet to use for HTML and HTML Help pages. A file of that name
-# must exist either in Sphinx' static/ path, or in one of the custom paths
-# given in html_static_path.
-html_style = 'default.css'
-
-# The name for this set of Sphinx documents.  If None, it defaults to
-# "<project> v<release> documentation".
-html_title = "%s %s Documentation" % (project, release)
-
-# A shorter title for the navigation bar.  Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['static']
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-html_last_updated_fmt = '%m/%d/%Y %H:%M:%S'
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-html_domain_indices = False
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, the reST sources are included in the HTML build as _sources/<name>.
-#html_copy_source = True
-
-# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
-
-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
-
-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it.  The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'Makodoc'
-
-#autoclass_content = 'both'
-
-# -- Options for LaTeX output --------------------------------------------------
-
-# The paper size ('letter' or 'a4').
-#latex_paper_size = 'letter'
-
-# The font size ('10pt', '11pt' or '12pt').
-#latex_font_size = '10pt'
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, documentclass [howto/manual]).
-latex_documents = [
-  ('index', 'mako_%s.tex' % release.replace('.', '_'), ur'Mako Documentation',
-   ur'Mike Bayer', 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# If true, show page references after internal links.
-#latex_show_pagerefs = False
-
-# If true, show URL addresses after external links.
-#latex_show_urls = False
-
-# Additional stuff for the LaTeX preamble.
-# sets TOC depth to 2.
-latex_preamble = '\setcounter{tocdepth}{3}'
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_domain_indices = True
-
-#latex_elements = {
-#    'papersize': 'letterpaper',
-#    'pointsize': '10pt',
-#}
-
-# -- Options for manual page output --------------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [
-    ('index', 'mako', u'Mako Documentation',
-     [u'Mako authors'], 1)
-]
-
-
-# -- Options for Epub output ---------------------------------------------------
-
-# Bibliographic Dublin Core info.
-epub_title = u'Mako'
-epub_author = u'Mako authors'
-epub_publisher = u'Mako authors'
-epub_copyright = u'Mako authors'
-
-# The language of the text. It defaults to the language option
-# or en if the language is not set.
-#epub_language = ''
-
-# The scheme of the identifier. Typical schemes are ISBN or URL.
-#epub_scheme = ''
-
-# The unique identifier of the text. This can be a ISBN number
-# or the project homepage.
-#epub_identifier = ''
-
-# A unique identification for the text.
-#epub_uid = ''
-
-# HTML files that should be inserted before the pages created by sphinx.
-# The format is a list of tuples containing the path and title.
-#epub_pre_files = []
-
-# HTML files shat should be inserted after the pages created by sphinx.
-# The format is a list of tuples containing the path and title.
-#epub_post_files = []
-
-# A list of files that should not be packed into the epub file.
-#epub_exclude_files = []
-
-# The depth of the table of contents in toc.ncx.
-#epub_tocdepth = 3
-
-# Allow duplicate toc entries.
-#epub_tocdup = True
-
-intersphinx_mapping = {
-    'dogpilecache':('http://dogpilecache.readthedocs.org/en/latest', None),
-    'beaker':('http://beaker.readthedocs.org/en/latest',None),
-}
diff --git a/lib/mako-0.7.2/doc/build/defs.rst b/lib/mako-0.7.2/doc/build/defs.rst
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/defs.rst
+++ /dev/null
@@ -1,622 +0,0 @@
-.. _defs_toplevel:
-
-===============
-Defs and Blocks
-===============
-
-``<%def>`` and ``<%block>`` are two tags that both demarcate any block of text
-and/or code.   They both exist within generated Python as a callable function,
-i.e., a Python ``def``.   They differ in their scope and calling semantics.
-Whereas ``<%def>`` provides a construct that is very much like a named Python
-``def``, the ``<%block>`` is more layout oriented.
-
-Using Defs
-==========
-
-The ``<%def>`` tag requires a ``name`` attribute, where the ``name`` references
-a Python function signature:
-
-.. sourcecode:: mako
-
-    <%def name="hello()">
-        hello world
-    </%def>
-
-To invoke the ``<%def>``, it is normally called as an expression:
-
-.. sourcecode:: mako
-
-    the def:  ${hello()}
-
-If the ``<%def>`` is not nested inside of another ``<%def>``,
-it's known as a **top level def** and can be accessed anywhere in
-the template, including above where it was defined.
-
-All defs, top level or not, have access to the current
-contextual namespace in exactly the same way their containing
-template does. Suppose the template below is executed with the
-variables ``username`` and ``accountdata`` inside the context:
-
-.. sourcecode:: mako
-
-    Hello there ${username}, how are ya.  Lets see what your account says:
-
-    ${account()}
-
-    <%def name="account()">
-        Account for ${username}:<br/>
-
-        % for row in accountdata:
-            Value: ${row}<br/>
-        % endfor
-    </%def>
-
-The ``username`` and ``accountdata`` variables are present
-within the main template body as well as the body of the
-``account()`` def.
-
-Since defs are just Python functions, you can define and pass
-arguments to them as well:
-
-.. sourcecode:: mako
-
-    ${account(accountname='john')}
-
-    <%def name="account(accountname, type='regular')">
-        account name: ${accountname}, type: ${type}
-    </%def>
-
-When you declare an argument signature for your def, they are
-required to follow normal Python conventions (i.e., all
-arguments are required except keyword arguments with a default
-value). This is in contrast to using context-level variables,
-which evaluate to ``UNDEFINED`` if you reference a name that
-does not exist.
-
-Calling Defs from Other Files
------------------------------
-
-Top level ``<%def>``\ s are **exported** by your template's
-module, and can be called from the outside; including from other
-templates, as well as normal Python code. Calling a ``<%def>``
-from another template is something like using an ``<%include>``
--- except you are calling a specific function within the
-template, not the whole template.
-
-The remote ``<%def>`` call is also a little bit like calling
-functions from other modules in Python. There is an "import"
-step to pull the names from another template into your own
-template; then the function or functions are available.
-
-To import another template, use the ``<%namespace>`` tag:
-
-.. sourcecode:: mako
-
-    <%namespace name="mystuff" file="mystuff.html"/>
-
-The above tag adds a local variable ``mystuff`` to the current
-scope.
-
-Then, just call the defs off of ``mystuff``:
-
-.. sourcecode:: mako
-
-    ${mystuff.somedef(x=5,y=7)}
-
-The ``<%namespace>`` tag also supports some of the other
-semantics of Python's ``import`` statement, including pulling
-names into the local variable space, or using ``*`` to represent
-all names, using the ``import`` attribute:
-
-.. sourcecode:: mako
-
-    <%namespace file="mystuff.html" import="foo, bar"/>
-
-This is just a quick intro to the concept of a **namespace**,
-which is a central Mako concept that has its own chapter in
-these docs. For more detail and examples, see
-:ref:`namespaces_toplevel`.
-
-Calling Defs Programmatically
------------------------------
-
-You can call defs programmatically from any :class:`.Template` object
-using the :meth:`~.Template.get_def()` method, which returns a :class:`.DefTemplate`
-object. This is a :class:`.Template` subclass which the parent
-:class:`.Template` creates, and is usable like any other template:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-
-    template = Template("""
-        <%def name="hi(name)">
-            hi ${name}!
-        </%def>
-
-        <%def name="bye(name)">
-            bye ${name}!
-        </%def>
-    """)
-
-    print template.get_def("hi").render(name="ed")
-    print template.get_def("bye").render(name="ed")
-
-Defs within Defs
-----------------
-
-The def model follows regular Python rules for closures.
-Declaring ``<%def>`` inside another ``<%def>`` declares it
-within the parent's **enclosing scope**:
-
-.. sourcecode:: mako
-
-    <%def name="mydef()">
-        <%def name="subdef()">
-            a sub def
-        </%def>
-
-        i'm the def, and the subcomponent is ${subdef()}
-    </%def>
-
-Just like Python, names that exist outside the inner ``<%def>``
-exist inside it as well:
-
-.. sourcecode:: mako
-
-    <%
-        x = 12
-    %>
-    <%def name="outer()">
-        <%
-            y = 15
-        %>
-        <%def name="inner()">
-            inner, x is ${x}, y is ${y}
-        </%def>
-
-        outer, x is ${x}, y is ${y}
-    </%def>
-
-Assigning to a name inside of a def declares that name as local
-to the scope of that def (again, like Python itself). This means
-the following code will raise an error:
-
-.. sourcecode:: mako
-
-    <%
-        x = 10
-    %>
-    <%def name="somedef()">
-        ## error !
-        somedef, x is ${x}
-        <%
-            x = 27
-        %>
-    </%def>
-
-...because the assignment to ``x`` declares ``x`` as local to the
-scope of ``somedef``, rendering the "outer" version unreachable
-in the expression that tries to render it.
-
-.. _defs_with_content:
-
-Calling a Def with Embedded Content and/or Other Defs
------------------------------------------------------
-
-A flip-side to def within def is a def call with content. This
-is where you call a def, and at the same time declare a block of
-content (or multiple blocks) that can be used by the def being
-called. The main point of such a call is to create custom,
-nestable tags, just like any other template language's
-custom-tag creation system -- where the external tag controls the
-execution of the nested tags and can communicate state to them.
-Only with Mako, you don't have to use any external Python
-modules, you can define arbitrarily nestable tags right in your
-templates.
-
-To achieve this, the target def is invoked using the form
-``<%namepacename:defname>`` instead of the normal ``${}``
-syntax. This syntax, introduced in Mako 0.2.3, is functionally
-equivalent to another tag known as ``%call``, which takes the form
-``<%call expr='namespacename.defname(args)'>``. While ``%call``
-is available in all versions of Mako, the newer style is
-probably more familiar looking. The ``namespace`` portion of the
-call is the name of the **namespace** in which the def is
-defined -- in the most simple cases, this can be ``local`` or
-``self`` to reference the current template's namespace (the
-difference between ``local`` and ``self`` is one of inheritance
--- see :ref:`namespaces_builtin` for details).
-
-When the target def is invoked, a variable ``caller`` is placed
-in its context which contains another namespace containing the
-body and other defs defined by the caller. The body itself is
-referenced by the method ``body()``. Below, we build a ``%def``
-that operates upon ``caller.body()`` to invoke the body of the
-custom tag:
-
-.. sourcecode:: mako
-
-    <%def name="buildtable()">
-        <table>
-            <tr><td>
-                ${caller.body()}
-            </td></tr>
-        </table>
-    </%def>
-
-    <%self:buildtable>
-        I am the table body.
-    </%self:buildtable>
-
-This produces the output (whitespace formatted):
-
-.. sourcecode:: html
-
-    <table>
-        <tr><td>
-            I am the table body.
-        </td></tr>
-    </table>
-
-Using the older ``%call`` syntax looks like:
-
-.. sourcecode:: mako
-
-    <%def name="buildtable()">
-        <table>
-            <tr><td>
-                ${caller.body()}
-            </td></tr>
-        </table>
-    </%def>
-
-    <%call expr="buildtable()">
-        I am the table body.
-    </%call>
-
-The ``body()`` can be executed multiple times or not at all.
-This means you can use def-call-with-content to build iterators,
-conditionals, etc:
-
-.. sourcecode:: mako
-
-    <%def name="lister(count)">
-        % for x in range(count):
-            ${caller.body()}
-        % endfor
-    </%def>
-
-    <%self:lister count="${3}">
-        hi
-    </%self:lister>
-
-Produces:
-
-.. sourcecode:: html
-
-    hi
-    hi
-    hi
-
-Notice above we pass ``3`` as a Python expression, so that it
-remains as an integer.
-
-A custom "conditional" tag:
-
-.. sourcecode:: mako
-
-    <%def name="conditional(expression)">
-        % if expression:
-            ${caller.body()}
-        % endif
-    </%def>
-
-    <%self:conditional expression="${4==4}">
-        i'm the result
-    </%self:conditional>
-
-Produces:
-
-.. sourcecode:: html
-
-    i'm the result
-
-But that's not all. The ``body()`` function also can handle
-arguments, which will augment the local namespace of the body
-callable. The caller must define the arguments which it expects
-to receive from its target def using the ``args`` attribute,
-which is a comma-separated list of argument names. Below, our
-``<%def>`` calls the ``body()`` of its caller, passing in an
-element of data from its argument:
-
-.. sourcecode:: mako
-
-    <%def name="layoutdata(somedata)">
-        <table>
-        % for item in somedata:
-            <tr>
-            % for col in item:
-                <td>${caller.body(col=col)}</td>
-            % endfor
-            </tr>
-        % endfor
-        </table>
-    </%def>
-
-    <%self:layoutdata somedata="${[[1,2,3],[4,5,6],[7,8,9]]}" args="col">\
-    Body data: ${col}\
-    </%self:layoutdata>
-
-Produces:
-
-.. sourcecode:: html
-
-    <table>
-        <tr>
-            <td>Body data: 1</td>
-            <td>Body data: 2</td>
-            <td>Body data: 3</td>
-        </tr>
-        <tr>
-            <td>Body data: 4</td>
-            <td>Body data: 5</td>
-            <td>Body data: 6</td>
-        </tr>
-        <tr>
-            <td>Body data: 7</td>
-            <td>Body data: 8</td>
-            <td>Body data: 9</td>
-        </tr>
-    </table>
-
-You don't have to stick to calling just the ``body()`` function.
-The caller can define any number of callables, allowing the
-``<%call>`` tag to produce whole layouts:
-
-.. sourcecode:: mako
-
-    <%def name="layout()">
-        ## a layout def
-        <div class="mainlayout">
-            <div class="header">
-                ${caller.header()}
-            </div>
-
-            <div class="sidebar">
-                ${caller.sidebar()}
-            </div>
-
-            <div class="content">
-                ${caller.body()}
-            </div>
-        </div>
-    </%def>
-
-    ## calls the layout def
-    <%self:layout>
-        <%def name="header()">
-            I am the header
-        </%def>
-        <%def name="sidebar()">
-            <ul>
-                <li>sidebar 1</li>
-                <li>sidebar 2</li>
-            </ul>
-        </%def>
-
-            this is the body
-    </%self:layout>
-
-The above layout would produce:
-
-.. sourcecode:: html
-
-    <div class="mainlayout">
-        <div class="header">
-        I am the header
-        </div>
-
-        <div class="sidebar">
-        <ul>
-            <li>sidebar 1</li>
-            <li>sidebar 2</li>
-        </ul>
-        </div>
-
-        <div class="content">
-        this is the body
-        </div>
-    </div>
-
-The number of things you can do with ``<%call>`` and/or the
-``<%namespacename:defname>`` calling syntax is enormous. You can
-create form widget libraries, such as an enclosing ``<FORM>``
-tag and nested HTML input elements, or portable wrapping schemes
-using ``<div>`` or other elements. You can create tags that
-interpret rows of data, such as from a database, providing the
-individual columns of each row to a ``body()`` callable which
-lays out the row any way it wants. Basically anything you'd do
-with a "custom tag" or tag library in some other system, Mako
-provides via ``<%def>`` tags and plain Python callables which are
-invoked via ``<%namespacename:defname>`` or ``<%call>``.
-
-.. _blocks:
-
-Using Blocks
-============
-
-The ``<%block>`` tag introduces some new twists on the
-``<%def>`` tag which make it more closely tailored towards layout.
-
-.. versionadded:: 0.4.1
-
-An example of a block:
-
-.. sourcecode:: mako
-
-    <html>
-        <body>
-            <%block>
-                this is a block.
-            </%block>
-        </body>
-    </html>
-
-In the above example, we define a simple block.  The block renders its content in the place
-that it's defined.  Since the block is called for us, it doesn't need a name and the above
-is referred to as an **anonymous block**.  So the output of the above template will be:
-
-.. sourcecode:: html
-
-    <html>
-        <body>
-                this is a block.
-        </body>
-    </html>
-
-So in fact the above block has absolutely no effect.  Its usefulness comes when we start
-using modifiers.  Such as, we can apply a filter to our block:
-
-.. sourcecode:: mako
-
-    <html>
-        <body>
-            <%block filter="h">
-                <html>this is some escaped html.</html>
-            </%block>
-        </body>
-    </html>
-
-or perhaps a caching directive:
-
-.. sourcecode:: mako
-
-    <html>
-        <body>
-            <%block cached="True" cache_timeout="60">
-                This content will be cached for 60 seconds.
-            </%block>
-        </body>
-    </html>
-
-Blocks also work in iterations, conditionals, just like defs:
-
-.. sourcecode:: mako
-
-    % if some_condition:
-        <%block>condition is met</%block>
-    % endif
-
-While the block renders at the point it is defined in the template,
-the underlying function is present in the generated Python code only
-once, so there's no issue with placing a block inside of a loop or
-similar. Anonymous blocks are defined as closures in the local
-rendering body, so have access to local variable scope:
-
-.. sourcecode:: mako
-
-    % for i in range(1, 4):
-        <%block>i is ${i}</%block>
-    % endfor
-
-Using Named Blocks
-------------------
-
-Possibly the more important area where blocks are useful is when we
-do actually give them names. Named blocks are tailored to behave
-somewhat closely to Jinja2's block tag, in that they define an area
-of a layout which can be overridden by an inheriting template. In
-sharp contrast to the ``<%def>`` tag, the name given to a block is
-global for the entire template regardless of how deeply it's nested:
-
-.. sourcecode:: mako
-
-    <html>
-    <%block name="header">
-        <head>
-            <title>
-                <%block name="title">Title</%block>
-            </title>
-        </head>
-    </%block>
-    <body>
-        ${next.body()}
-    </body>
-    </html>
-
-The above example has two named blocks "``header``" and "``title``", both of which can be referred to
-by an inheriting template. A detailed walkthrough of this usage can be found at :ref:`inheritance_toplevel`.
-
-Note above that named blocks don't have any argument declaration the way defs do. They still implement themselves
-as Python functions, however, so they can be invoked additional times beyond their initial definition:
-
-.. sourcecode:: mako
-
-    <div name="page">
-        <%block name="pagecontrol">
-            <a href="">previous page</a> |
-            <a href="">next page</a>
-        </%block>
-
-        <table>
-            ## some content
-        </table>
-
-        ${pagecontrol()}
-    </div>
-
-The content referenced by ``pagecontrol`` above will be rendered both above and below the ``<table>`` tags.
-
-To keep things sane, named blocks have restrictions that defs do not:
-
-* The ``<%block>`` declaration cannot have any argument signature.
-* The name of a ``<%block>`` can only be defined once in a template -- an error is raised if two blocks of the same
-  name occur anywhere in a single template, regardless of nesting.  A similar error is raised if a top level def
-  shares the same name as that of a block.
-* A named ``<%block>`` cannot be defined within a ``<%def>``, or inside the body of a "call", i.e.
-  ``<%call>`` or ``<%namespacename:defname>`` tag.  Anonymous blocks can, however.
-
-Using Page Arguments in Named Blocks
-------------------------------------
-
-A named block is very much like a top level def. It has a similar
-restriction to these types of defs in that arguments passed to the
-template via the ``<%page>`` tag aren't automatically available.
-Using arguments with the ``<%page>`` tag is described in the section
-:ref:`namespaces_body`, and refers to scenarios such as when the
-``body()`` method of a template is called from an inherited template passing
-arguments, or the template is invoked from an ``<%include>`` tag
-with arguments. To allow a named block to share the same arguments
-passed to the page, the ``args`` attribute can be used:
-
-.. sourcecode:: mako
-
-    <%page args="post"/>
-
-    <a name="${post.title}" />
-
-    <span class="post_prose">
-        <%block name="post_prose" args="post">
-            ${post.content}
-        </%block>
-    </span>
-
-Where above, if the template is called via a directive like
-``<%include file="post.mako" args="post=post" />``, the ``post``
-variable is available both in the main body as well as the
-``post_prose`` block.
-
-Similarly, the ``**pageargs`` variable is present, in named blocks only,
-for those arguments not explicit in the ``<%page>`` tag:
-
-.. sourcecode:: mako
-
-    <%block name="post_prose">
-        ${pageargs['post'].content}
-    </%block>
-
-The ``args`` attribute is only allowed with named blocks. With
-anonymous blocks, the Python function is always rendered in the same
-scope as the call itself, so anything available directly outside the
-anonymous block is available inside as well.
diff --git a/lib/mako-0.7.2/doc/build/filtering.rst b/lib/mako-0.7.2/doc/build/filtering.rst
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/filtering.rst
+++ /dev/null
@@ -1,344 +0,0 @@
-.. _filtering_toplevel:
-
-=======================
-Filtering and Buffering
-=======================
-
-Expression Filtering
-====================
-
-As described in the chapter :ref:`syntax_toplevel`, the "``|``" operator can be
-applied to a "``${}``" expression to apply escape filters to the
-output:
-
-.. sourcecode:: mako
-
-    ${"this is some text" | u}
-
-The above expression applies URL escaping to the expression, and
-produces ``this+is+some+text``.
-
-The built-in escape flags are:
-
-* ``u`` : URL escaping, provided by
-  ``urllib.quote_plus(string.encode('utf-8'))``
-* ``h`` : HTML escaping, provided by
-  ``markupsafe.escape(string)``
-
-  .. versionadded:: 0.3.4
-     Prior versions use ``cgi.escape(string, True)``.
-
-* ``x`` : XML escaping
-* ``trim`` : whitespace trimming, provided by ``string.strip()``
-* ``entity`` : produces HTML entity references for applicable
-  strings, derived from ``htmlentitydefs``
-* ``unicode`` (``str`` on Python 3): produces a Python unicode
-  string (this function is applied by default)
-* ``decode.<some encoding>``: decode input into a Python
-  unicode with the specified encoding
-* ``n`` : disable all default filtering; only filters specified
-  in the local expression tag will be applied.
-
-To apply more than one filter, separate them by a comma:
-
-.. sourcecode:: mako
-
-    ${" <tag>some value</tag> " | h,trim}
-
-The above produces ``<tag>some value</tag>``, with
-no leading or trailing whitespace. The HTML escaping function is
-applied first, the "trim" function second.
-
-Naturally, you can make your own filters too. A filter is just a
-Python function that accepts a single string argument, and
-returns the filtered result. The expressions after the ``|``
-operator draw upon the local namespace of the template in which
-they appear, meaning you can define escaping functions locally:
-
-.. sourcecode:: mako
-
-    <%!
-        def myescape(text):
-            return "<TAG>" + text + "</TAG>"
-    %>
-
-    Here's some tagged text: ${"text" | myescape}
-
-Or from any Python module:
-
-.. sourcecode:: mako
-
-    <%!
-        import myfilters
-    %>
-
-    Here's some tagged text: ${"text" | myfilters.tagfilter}
-
-A page can apply a default set of filters to all expression tags
-using the ``expression_filter`` argument to the ``%page`` tag:
-
-.. sourcecode:: mako
-
-    <%page expression_filter="h"/>
-
-    Escaped text:  ${"<html>some html</html>"}
-
-Result:
-
-.. sourcecode:: html
-
-    Escaped text: <html>some html</html>
-
-.. _filtering_default_filters:
-
-The ``default_filters`` Argument
---------------------------------
-
-In addition to the ``expression_filter`` argument, the
-``default_filters`` argument to both :class:`.Template` and
-:class:`.TemplateLookup` can specify filtering for all expression tags
-at the programmatic level. This array-based argument, when given
-its default argument of ``None``, will be internally set to
-``["unicode"]`` (or ``["str"]`` on Python 3), except when
-``disable_unicode=True`` is set in which case it defaults to
-``["str"]``:
-
-.. sourcecode:: python
-
-    t = TemplateLookup(directories=['/tmp'], default_filters=['unicode'])
-
-To replace the usual ``unicode``/``str`` function with a
-specific encoding, the ``decode`` filter can be substituted:
-
-.. sourcecode:: python
-
-    t = TemplateLookup(directories=['/tmp'], default_filters=['decode.utf8'])
-
-To disable ``default_filters`` entirely, set it to an empty
-list:
-
-.. sourcecode:: python
-
-    t = TemplateLookup(directories=['/tmp'], default_filters=[])
-
-Any string name can be added to ``default_filters`` where it
-will be added to all expressions as a filter. The filters are
-applied from left to right, meaning the leftmost filter is
-applied first.
-
-.. sourcecode:: python
-
-    t = Template(templatetext, default_filters=['unicode', 'myfilter'])
-
-To ease the usage of ``default_filters`` with custom filters,
-you can also add imports (or other code) to all templates using
-the ``imports`` argument:
-
-.. sourcecode:: python
-
-    t = TemplateLookup(directories=['/tmp'],
-                       default_filters=['unicode', 'myfilter'],
-                       imports=['from mypackage import myfilter'])
-
-The above will generate templates something like this:
-
-.. sourcecode:: python
-
-    # ....
-    from mypackage import myfilter
-
-    def render_body(context):
-        context.write(myfilter(unicode("some text")))
-
-Turning off Filtering with the ``n`` Filter
--------------------------------------------
-
-In all cases the special ``n`` filter, used locally within an
-expression, will **disable** all filters declared in the
-``<%page>`` tag as well as in ``default_filters``. Such as:
-
-.. sourcecode:: mako
-
-    ${'myexpression' | n}
-
-will render ``myexpression`` with no filtering of any kind, and:
-
-.. sourcecode:: mako
-
-    ${'myexpression' | n,trim}
-
-will render ``myexpression`` using the ``trim`` filter only.
-
-Filtering Defs and Blocks
-=========================
-
-The ``%def`` and ``%block`` tags have an argument called ``filter`` which will apply the
-given list of filter functions to the output of the ``%def``:
-
-.. sourcecode:: mako
-
-    <%def name="foo()" filter="h, trim">
-        <b>this is bold</b>
-    </%def>
-
-When the ``filter`` attribute is applied to a def as above, the def
-is automatically **buffered** as well. This is described next.
-
-Buffering
-=========
-
-One of Mako's central design goals is speed. To this end, all of
-the textual content within a template and its various callables
-is by default piped directly to the single buffer that is stored
-within the :class:`.Context` object. While this normally is easy to
-miss, it has certain side effects. The main one is that when you
-call a def using the normal expression syntax, i.e.
-``${somedef()}``, it may appear that the return value of the
-function is the content it produced, which is then delivered to
-your template just like any other expression substitution,
-except that normally, this is not the case; the return value of
-``${somedef()}`` is simply the empty string ``''``. By the time
-you receive this empty string, the output of ``somedef()`` has
-been sent to the underlying buffer.
-
-You may not want this effect, if for example you are doing
-something like this:
-
-.. sourcecode:: mako
-
-    ${" results " + somedef() + " more results "}
-
-If the ``somedef()`` function produced the content "``somedef's
-results``", the above template would produce this output:
-
-.. sourcecode:: html
-
-    somedef's results results more results
-
-This is because ``somedef()`` fully executes before the
-expression returns the results of its concatenation; the
-concatenation in turn receives just the empty string as its
-middle expression.
-
-Mako provides two ways to work around this. One is by applying
-buffering to the ``%def`` itself:
-
-.. sourcecode:: mako
-
-    <%def name="somedef()" buffered="True">
-        somedef's results
-    </%def>
-
-The above definition will generate code similar to this:
-
-.. sourcecode:: python
-
-    def somedef():
-        context.push_buffer()
-        try:
-            context.write("somedef's results")
-        finally:
-            buf = context.pop_buffer()
-        return buf.getvalue()
-
-So that the content of ``somedef()`` is sent to a second buffer,
-which is then popped off the stack and its value returned. The
-speed hit inherent in buffering the output of a def is also
-apparent.
-
-Note that the ``filter`` argument on ``%def`` also causes the def to
-be buffered. This is so that the final content of the ``%def`` can
-be delivered to the escaping function in one batch, which
-reduces method calls and also produces more deterministic
-behavior for the filtering function itself, which can possibly
-be useful for a filtering function that wishes to apply a
-transformation to the text as a whole.
-
-The other way to buffer the output of a def or any Mako callable
-is by using the built-in ``capture`` function. This function
-performs an operation similar to the above buffering operation
-except it is specified by the caller.
-
-.. sourcecode:: mako
-
-    ${" results " + capture(somedef) + " more results "}
-
-Note that the first argument to the ``capture`` function is
-**the function itself**, not the result of calling it. This is
-because the ``capture`` function takes over the job of actually
-calling the target function, after setting up a buffered
-environment. To send arguments to the function, just send them
-to ``capture`` instead:
-
-.. sourcecode:: mako
-
-    ${capture(somedef, 17, 'hi', use_paging=True)}
-
-The above call is equivalent to the unbuffered call:
-
-.. sourcecode:: mako
-
-    ${somedef(17, 'hi', use_paging=True)}
-
-Decorating
-==========
-
-.. versionadded:: 0.2.5
-
-Somewhat like a filter for a ``%def`` but more flexible, the ``decorator``
-argument to ``%def`` allows the creation of a function that will
-work in a similar manner to a Python decorator. The function can
-control whether or not the function executes. The original
-intent of this function is to allow the creation of custom cache
-logic, but there may be other uses as well.
-
-``decorator`` is intended to be used with a regular Python
-function, such as one defined in a library module. Here we'll
-illustrate the python function defined in the template for
-simplicities' sake:
-
-.. sourcecode:: mako
-
-    <%!
-        def bar(fn):
-            def decorate(context, *args, **kw):
-                context.write("BAR")
-                fn(*args, **kw)
-                context.write("BAR")
-                return ''
-            return decorate
-    %>
-
-    <%def name="foo()" decorator="bar">
-        this is foo
-    </%def>
-
-    ${foo()}
-
-The above template will return, with more whitespace than this,
-``"BAR this is foo BAR"``. The function is the render callable
-itself (or possibly a wrapper around it), and by default will
-write to the context. To capture its output, use the :func:`.capture`
-callable in the ``mako.runtime`` module (available in templates
-as just ``runtime``):
-
-.. sourcecode:: mako
-
-    <%!
-        def bar(fn):
-            def decorate(context, *args, **kw):
-                return "BAR" + runtime.capture(context, fn, *args, **kw) + "BAR"
-            return decorate
-    %>
-
-    <%def name="foo()" decorator="bar">
-        this is foo
-    </%def>
-
-    ${foo()}
-
-The decorator can be used with top-level defs as well as nested
-defs, and blocks too. Note that when calling a top-level def from the
-:class:`.Template` API, i.e. ``template.get_def('somedef').render()``,
-the decorator has to write the output to the ``context``, i.e.
-as in the first example. The return value gets discarded.
diff --git a/lib/mako-0.7.2/doc/build/index.rst b/lib/mako-0.7.2/doc/build/index.rst
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/index.rst
+++ /dev/null
@@ -1,22 +0,0 @@
-Table of Contents
-=================
-
-.. toctree::
-    :maxdepth: 2
-
-    usage
-    syntax
-    defs
-    runtime
-    namespaces
-    inheritance
-    filtering
-    unicode
-    caching
-
-Indices and Tables
-------------------
-
-* :ref:`genindex`
-* :ref:`search`
-
diff --git a/lib/mako-0.7.2/doc/build/inheritance.rst b/lib/mako-0.7.2/doc/build/inheritance.rst
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/inheritance.rst
+++ /dev/null
@@ -1,534 +0,0 @@
-.. _inheritance_toplevel:
-
-===========
-Inheritance
-===========
-
-.. note::  Most of the inheritance examples here take advantage of a feature that's
-    new in Mako as of version 0.4.1 called the "block".  This tag is very similar to
-    the "def" tag but is more streamlined for usage with inheritance.  Note that
-    all of the examples here which use blocks can also use defs instead.  Contrasting
-    usages will be illustrated.
-
-Using template inheritance, two or more templates can organize
-themselves into an **inheritance chain**, where content and
-functions from all involved templates can be intermixed. The
-general paradigm of template inheritance is this: if a template
-``A`` inherits from template ``B``, then template ``A`` agrees
-to send the executional control to template ``B`` at runtime
-(``A`` is called the **inheriting** template). Template ``B``,
-the **inherited** template, then makes decisions as to what
-resources from ``A`` shall be executed.
-
-In practice, it looks like this. Here's a hypothetical inheriting
-template, ``index.html``:
-
-.. sourcecode:: mako
-
-    ## index.html
-    <%inherit file="base.html"/>
-
-    <%block name="header">
-        this is some header content
-    </%block>
-
-    this is the body content.
-
-And ``base.html``, the inherited template:
-
-.. sourcecode:: mako
-
-    ## base.html
-    <html>
-        <body>
-            <div class="header">
-                <%block name="header"/>
-            </div>
-
-            ${self.body()}
-
-            <div class="footer">
-                <%block name="footer">
-                    this is the footer
-                </%block>
-            </div>
-        </body>
-    </html>
-
-Here is a breakdown of the execution:
-
-#. When ``index.html`` is rendered, control immediately passes to
-   ``base.html``.
-#. ``base.html`` then renders the top part of an HTML document,
-   then invokes the ``<%block name="header">`` block.  It invokes the
-   underlying ``header()`` function off of a built-in namespace
-   called ``self`` (this namespace was first introduced in the
-   :doc:`Namespaces chapter <namespaces>` in :ref:`namespace_self`). Since
-   ``index.html`` is the topmost template and also defines a block
-   called ``header``, it's this ``header`` block that ultimately gets
-   executed -- instead of the one that's present in ``base.html``.
-#. Control comes back to ``base.html``. Some more HTML is
-   rendered.
-#. ``base.html`` executes ``self.body()``. The ``body()``
-   function on all template-based namespaces refers to the main
-   body of the template, therefore the main body of
-   ``index.html`` is rendered.
-#. When ``<%block name="header">`` is encountered in ``index.html`` 
-   during the ``self.body()`` call, a conditional is checked -- does the
-   current inherited template, i.e. ``base.html``, also define this block? If yes,
-   the ``<%block>`` is **not** executed here -- the inheritance
-   mechanism knows that the parent template is responsible for rendering
-   this block (and in fact it already has).  In other words a block
-   only renders in its *basemost scope*.
-#. Control comes back to ``base.html``. More HTML is rendered,
-   then the ``<%block name="footer">`` expression is invoked.
-#. The ``footer`` block is only defined in ``base.html``, so being
-   the topmost definition of ``footer``, it's the one that
-   executes. If ``index.html`` also specified ``footer``, then
-   its version would **override** that of the base.
-#. ``base.html`` finishes up rendering its HTML and the template
-   is complete, producing:
-
-   .. sourcecode:: html
-
-        <html>
-            <body>
-                <div class="header">
-                    this is some header content
-                </div>
-
-                this is the body content.
-
-                <div class="footer">
-                    this is the footer
-                </div>
-            </body>
-        </html>
-
-...and that is template inheritance in a nutshell. The main idea
-is that the methods that you call upon ``self`` always
-correspond to the topmost definition of that method. Very much
-the way ``self`` works in a Python class, even though Mako is
-not actually using Python class inheritance to implement this
-functionality. (Mako doesn't take the "inheritance" metaphor too
-seriously; while useful to setup some commonly recognized
-semantics, a textual template is not very much like an
-object-oriented class construct in practice).
-
-Nesting Blocks
-==============
-
-The named blocks defined in an inherited template can also be nested within
-other blocks.  The name given to each block is globally accessible via any inheriting
-template.  We can add a new block ``title`` to our ``header`` block:
-
-.. sourcecode:: mako
-
-    ## base.html
-    <html>
-        <body>
-            <div class="header">
-                <%block name="header">
-                    <h2>
-                        <%block name="title"/>
-                    </h2>
-                </%block>
-            </div>
-
-            ${self.body()}
-
-            <div class="footer">
-                <%block name="footer">
-                    this is the footer
-                </%block>
-            </div>
-        </body>
-    </html>
-
-The inheriting template can name either or both of ``header`` and ``title``, separately
-or nested themselves:
-
-.. sourcecode:: mako
-
-    ## index.html
-    <%inherit file="base.html"/>
-
-    <%block name="header">
-        this is some header content
-        ${parent.header()}
-    </%block>
-
-    <%block name="title">
-        this is the title
-    </%block>
-
-    this is the body content.
-
-Note when we overrode ``header``, we added an extra call ``${parent.header()}`` in order to invoke
-the parent's ``header`` block in addition to our own.  That's described in more detail below,
-in :ref:`parent_namespace`.
-
-Rendering a Named Block Multiple Times
-======================================
-
-Recall from the section :ref:`blocks` that a named block is just like a ``<%def>``,
-with some different usage rules.  We can call one of our named sections distinctly, for example
-a section that is used more than once, such as the title of a page:
-
-.. sourcecode:: mako
-
-    <html>
-        <head>
-            <title>${self.title()}</title>
-        </head>
-        <body>
-        <%block name="header">
-            <h2><%block name="title"/></h2>
-        </%block>
-        ${self.body()}
-        </body>
-    </html>
-
-Where above an inheriting template can define ``<%block name="title">`` just once, and it will be
-used in the base template both in the ``<title>`` section as well as the ``<h2>``.
-
-But what about Defs?
-====================
-
-The previous example used the ``<%block>`` tag to produce areas of content
-to be overridden.  Before Mako 0.4.1, there wasn't any such tag -- instead
-there was only the ``<%def>`` tag.   As it turns out, named blocks and defs are
-largely interchangeable.  The def simply doesn't call itself automatically,
-and has more open-ended naming and scoping rules that are more flexible and similar
-to Python itself, but less suited towards layout.  The first example from
-this chapter using defs would look like:
-
-.. sourcecode:: mako
-
-    ## index.html
-    <%inherit file="base.html"/>
-
-    <%def name="header()">
-        this is some header content
-    </%def>
-
-    this is the body content.
-
-And ``base.html``, the inherited template:
-
-.. sourcecode:: mako
-
-    ## base.html
-    <html>
-        <body>
-            <div class="header">
-                ${self.header()}
-            </div>
-
-            ${self.body()}
-
-            <div class="footer">
-                ${self.footer()}
-            </div>
-        </body>
-    </html>
-
-    <%def name="header()"/>
-    <%def name="footer()">
-        this is the footer
-    </%def>
-
-Above, we illustrate that defs differ from blocks in that their definition
-and invocation are defined in two separate places, instead of at once. You can *almost* do exactly what a
-block does if you put the two together:
-
-.. sourcecode:: mako
-
-    <div class="header">
-        <%def name="header()"></%def>${self.header()}
-    </div>
-
-The ``<%block>`` is obviously more streamlined than the ``<%def>`` for this kind
-of usage.  In addition,
-the above "inline" approach with ``<%def>`` does not work with nesting:
-
-.. sourcecode:: mako
-
-    <head>
-        <%def name="header()">
-            <title>
-            ## this won't work !
-            <%def name="title()">default title</%def>${self.title()}
-            </title>
-        </%def>${self.header()}
-    </head>
-
-Where above, the ``title()`` def, because it's a def within a def, is not part of the
-template's exported namespace and will not be part of ``self``.  If the inherited template
-did define its own ``title`` def at the top level, it would be called, but the "default title"
-above is not present at all on ``self`` no matter what.  For this to work as expected
-you'd instead need to say:
-
-.. sourcecode:: mako
-
-    <head>
-        <%def name="header()">
-            <title>
-            ${self.title()}
-            </title>
-        </%def>${self.header()}
-
-        <%def name="title()"/>
-    </head>
-
-That is, ``title`` is defined outside of any other defs so that it is in the ``self`` namespace.
-It works, but the definition needs to be potentially far away from the point of render.
-
-A named block is always placed in the ``self`` namespace, regardless of nesting,
-so this restriction is lifted:
-
-.. sourcecode:: mako
-
-    ## base.html
-    <head>
-        <%block name="header">
-            <title>
-            <%block name="title"/>
-            </title>
-        </%block>
-    </head>
-
-The above template defines ``title`` inside of ``header``, and an inheriting template can define
-one or both in **any** configuration, nested inside each other or not, in order for them to be used:
-
-.. sourcecode:: mako
-
-    ## index.html
-    <%inherit file="base.html"/>
-    <%block name="title">
-        the title
-    </%block>
-    <%block name="header">
-        the header
-    </%block>
-
-So while the ``<%block>`` tag lifts the restriction of nested blocks not being available externally,
-in order to achieve this it *adds* the restriction that all block names in a single template need
-to be globally unique within the template, and additionally that a ``<%block>`` can't be defined
-inside of a ``<%def>``. It's a more restricted tag suited towards a more specific use case than ``<%def>``.
-
-Using the ``next`` Namespace to Produce Content Wrapping
-========================================================
-
-Sometimes you have an inheritance chain that spans more than two
-templates. Or maybe you don't, but you'd like to build your
-system such that extra inherited templates can be inserted in
-the middle of a chain where they would be smoothly integrated.
-If each template wants to define its layout just within its main
-body, you can't just call ``self.body()`` to get at the
-inheriting template's body, since that is only the topmost body.
-To get at the body of the *next* template, you call upon the
-namespace ``next``, which is the namespace of the template
-**immediately following** the current template.
-
-Lets change the line in ``base.html`` which calls upon
-``self.body()`` to instead call upon ``next.body()``:
-
-.. sourcecode:: mako
-
-    ## base.html
-    <html>
-        <body>
-            <div class="header">
-                <%block name="header"/>
-            </div>
-
-            ${next.body()}
-
-            <div class="footer">
-                <%block name="footer">
-                    this is the footer
-                </%block>
-            </div>
-        </body>
-    </html>
-
-
-Lets also add an intermediate template called ``layout.html``,
-which inherits from ``base.html``:
-
-.. sourcecode:: mako
-
-    ## layout.html
-    <%inherit file="base.html"/>
-    <ul>
-        <%block name="toolbar">
-            <li>selection 1</li>
-            <li>selection 2</li>
-            <li>selection 3</li>
-        </%block>
-    </ul>
-    <div class="mainlayout">
-        ${next.body()}
-    </div>
-
-And finally change ``index.html`` to inherit from
-``layout.html`` instead:
-
-.. sourcecode:: mako
-
-    ## index.html
-    <%inherit file="layout.html"/>
-
-    ## .. rest of template
-
-In this setup, each call to ``next.body()`` will render the body
-of the next template in the inheritance chain (which can be
-written as ``base.html -> layout.html -> index.html``). Control
-is still first passed to the bottommost template ``base.html``,
-and ``self`` still references the topmost definition of any
-particular def.
-
-The output we get would be:
-
-.. sourcecode:: html
-
-    <html>
-        <body>
-            <div class="header">
-                this is some header content
-            </div>
-
-            <ul>
-                <li>selection 1</li>
-                <li>selection 2</li>
-                <li>selection 3</li>
-            </ul>
-
-            <div class="mainlayout">
-            this is the body content.
-            </div>
-
-            <div class="footer">
-                this is the footer
-            </div>
-        </body>
-    </html>
-
-So above, we have the ``<html>``, ``<body>`` and
-``header``/``footer`` layout of ``base.html``, we have the
-``<ul>`` and ``mainlayout`` section of ``layout.html``, and the
-main body of ``index.html`` as well as its overridden ``header``
-def. The ``layout.html`` template is inserted into the middle of
-the chain without ``base.html`` having to change anything.
-Without the ``next`` namespace, only the main body of
-``index.html`` could be used; there would be no way to call
-``layout.html``'s body content.
-
-.. _parent_namespace:
-
-Using the ``parent`` Namespace to Augment Defs
-==============================================
-
-Lets now look at the other inheritance-specific namespace, the
-opposite of ``next`` called ``parent``. ``parent`` is the
-namespace of the template **immediately preceding** the current
-template. What's useful about this namespace is that
-defs or blocks can call upon their overridden versions.
-This is not as hard as it sounds and
-is very much like using the ``super`` keyword in Python. Lets
-modify ``index.html`` to augment the list of selections provided
-by the ``toolbar`` function in ``layout.html``:
-
-.. sourcecode:: mako
-
-    ## index.html
-    <%inherit file="layout.html"/>
-
-    <%block name="header">
-        this is some header content
-    </%block>
-
-    <%block name="toolbar">
-        ## call the parent's toolbar first
-        ${parent.toolbar()}
-        <li>selection 4</li>
-        <li>selection 5</li>
-    </%block>
-
-    this is the body content.
-
-Above, we implemented a ``toolbar()`` function, which is meant
-to override the definition of ``toolbar`` within the inherited
-template ``layout.html``. However, since we want the content
-from that of ``layout.html`` as well, we call it via the
-``parent`` namespace whenever we want it's content, in this case
-before we add our own selections. So the output for the whole
-thing is now:
-
-.. sourcecode:: html
-
-    <html>
-        <body>
-            <div class="header">
-                this is some header content
-            </div>
-
-            <ul>
-                <li>selection 1</li>
-                <li>selection 2</li>
-                <li>selection 3</li>
-                <li>selection 4</li>
-                <li>selection 5</li>
-            </ul>
-
-            <div class="mainlayout">
-            this is the body content.
-            </div>
-
-            <div class="footer">
-                this is the footer
-            </div>
-        </body>
-    </html>
-
-and you're now a template inheritance ninja!
-
-Inheritable Attributes
-======================
-
-The :attr:`attr <.Namespace.attr>` accessor of the :class:`.Namespace` object
-allows access to module level variables declared in a template. By accessing
-``self.attr``, you can access regular attributes from the
-inheritance chain as declared in ``<%! %>`` sections. Such as:
-
-.. sourcecode:: mako
-
-    <%!
-        class_ = "grey"
-    %>
-
-    <div class="${self.attr.class_}">
-        ${self.body()}
-    </div>
-
-If an inheriting template overrides ``class_`` to be
-``"white"``, as in:
-
-.. sourcecode:: mako
-
-    <%!
-        class_ = "white"
-    %>
-    <%inherit file="parent.html"/>
-
-    This is the body
-
-you'll get output like:
-
-.. sourcecode:: html
-
-    <div class="white">
-        This is the body
-    </div>
-
diff --git a/lib/mako-0.7.2/doc/build/namespaces.rst b/lib/mako-0.7.2/doc/build/namespaces.rst
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/namespaces.rst
+++ /dev/null
@@ -1,349 +0,0 @@
-.. _namespaces_toplevel:
-
-==========
-Namespaces
-==========
-
-Namespaces are used to organize groups of defs into
-categories, and also to "import" defs from other files.
-
-If the file ``components.html`` defines these two defs:
-
-.. sourcecode:: mako
-
-    ## components.html
-    <%def name="comp1()">
-        this is comp1
-    </%def>
-
-    <%def name="comp2(x)">
-        this is comp2, x is ${x}
-    </%def>
-
-you can make another file, for example ``index.html``, that
-pulls those two defs into a namespace called ``comp``:
-
-.. sourcecode:: mako
-
-    ## index.html
-    <%namespace name="comp" file="components.html"/>
-
-    Here's comp1:  ${comp.comp1()}
-    Here's comp2:  ${comp.comp2(x=5)}
-
-The ``comp`` variable above is an instance of
-:class:`.Namespace`, a **proxy object** which delivers
-method calls to the underlying template callable using the
-current context.
-
-``<%namespace>`` also provides an ``import`` attribute which can
-be used to pull the names into the local namespace, removing the
-need to call it via the "``.``" operator. When ``import`` is used, the
-``name`` attribute is optional.
-
-.. sourcecode:: mako
-
-    <%namespace file="components.html" import="comp1, comp2"/>
-
-    Heres comp1:  ${comp1()}
-    Heres comp2:  ${comp2(x=5)}
-
-``import`` also supports the "``*``" operator:
-
-.. sourcecode:: mako
-
-    <%namespace file="components.html" import="*"/>
-
-    Heres comp1:  ${comp1()}
-    Heres comp2:  ${comp2(x=5)}
-
-The names imported by the ``import`` attribute take precedence
-over any names that exist within the current context.
-
-.. note:: In current versions of Mako, usage of ``import='*'`` is
-   known to decrease performance of the template. This will be
-   fixed in a future release.
-
-The ``file`` argument allows expressions -- if looking for
-context variables, the ``context`` must be named explicitly:
-
-.. sourcecode:: mako
-
-    <%namespace name="dyn" file="${context['namespace_name']}"/>
-
-Ways to Call Namespaces
-=======================
-
-There are essentially four ways to call a function from a
-namespace.
-
-The "expression" format, as described previously. Namespaces are
-just Python objects with functions on them, and can be used in
-expressions like any other function:
-
-.. sourcecode:: mako
-
-    ${mynamespace.somefunction('some arg1', 'some arg2', arg3='some arg3', arg4='some arg4')}
-
-Synonymous with the "expression" format is the "custom tag"
-format, when a "closed" tag is used. This format, introduced in
-Mako 0.2.3, allows the usage of a "custom" Mako tag, with the
-function arguments passed in using named attributes:
-
-.. sourcecode:: mako
-
-    <%mynamespace:somefunction arg1="some arg1" arg2="some arg2" arg3="some arg3" arg4="some arg4"/>
-
-When using tags, the values of the arguments are taken as
-literal strings by default. To embed Python expressions as
-arguments, use the embedded expression format:
-
-.. sourcecode:: mako
-
-    <%mynamespace:somefunction arg1="${someobject.format()}" arg2="${somedef(5, 12)}"/>
-
-The "custom tag" format is intended mainly for namespace
-functions which recognize body content, which in Mako is known
-as a "def with embedded content":
-
-.. sourcecode:: mako
-
-    <%mynamespace:somefunction arg1="some argument" args="x, y">
-        Some record: ${x}, ${y}
-    </%mynamespace:somefunction>
-
-The "classic" way to call defs with embedded content is the ``<%call>`` tag:
-
-.. sourcecode:: mako
-
-    <%call expr="mynamespace.somefunction(arg1='some argument')" args="x, y">
-        Some record: ${x}, ${y}
-    </%call>
-
-For information on how to construct defs that embed content from
-the caller, see :ref:`defs_with_content`.
-
-.. _namespaces_python_modules:
-
-Namespaces from Regular Python Modules
-======================================
-
-Namespaces can also import regular Python functions from
-modules. These callables need to take at least one argument,
-``context``, an instance of :class:`.Context`. A module file 
-``some/module.py`` might contain the callable:
-
-.. sourcecode:: python
-
-    def my_tag(context):
-        context.write("hello world")
-        return ''
-
-A template can use this module via:
-
-.. sourcecode:: mako
-
-    <%namespace name="hw" module="some.module"/>
-
-    ${hw.my_tag()}
-
-Note that the ``context`` argument is not needed in the call;
-the :class:`.Namespace` tag creates a locally-scoped callable which
-takes care of it. The ``return ''`` is so that the def does not
-dump a ``None`` into the output stream -- the return value of any
-def is rendered after the def completes, in addition to whatever
-was passed to :meth:`.Context.write` within its body.
-
-If your def is to be called in an "embedded content" context,
-that is as described in :ref:`defs_with_content`, you should use
-the :func:`.supports_caller` decorator, which will ensure that Mako
-will ensure the correct "caller" variable is available when your
-def is called, supporting embedded content:
-
-.. sourcecode:: python
-
-    from mako.runtime import supports_caller
-
-    @supports_caller
-    def my_tag(context):
-        context.write("<div>")
-        context['caller'].body()
-        context.write("</div>")
-        return ''
-
-Capturing of output is available as well, using the
-outside-of-templates version of the :func:`.capture` function,
-which accepts the "context" as its first argument:
-
-.. sourcecode:: python
-
-    from mako.runtime import supports_caller, capture
-
-    @supports_caller
-    def my_tag(context):
-        return "<div>%s</div>" % \
-                capture(context, context['caller'].body, x="foo", y="bar")
-
-Declaring Defs in Namespaces
-============================
-
-The ``<%namespace>`` tag supports the definition of ``<%def>``\ s
-directly inside the tag. These defs become part of the namespace
-like any other function, and will override the definitions
-pulled in from a remote template or module:
-
-.. sourcecode:: mako
-
-    ## define a namespace
-    <%namespace name="stuff">
-        <%def name="comp1()">
-            comp1
-        </%def>
-    </%namespace>
-
-    ## then call it
-    ${stuff.comp1()}
-
-.. _namespaces_body:
-
-The ``body()`` Method
-=====================
-
-Every namespace that is generated from a template contains a
-method called ``body()``. This method corresponds to the main
-body of the template, and plays its most important roles when
-using inheritance relationships as well as
-def-calls-with-content.
-
-Since the ``body()`` method is available from a namespace just
-like all the other defs defined in a template, what happens if
-you send arguments to it? By default, the ``body()`` method
-accepts no positional arguments, and for usefulness in
-inheritance scenarios will by default dump all keyword arguments
-into a dictionary called ``pageargs``. But if you actually want
-to get at the keyword arguments, Mako recommends you define your
-own argument signature explicitly. You do this via using the
-``<%page>`` tag:
-
-.. sourcecode:: mako
-
-    <%page args="x, y, someval=8, scope='foo', **kwargs"/>
-
-A template which defines the above signature requires that the
-variables ``x`` and ``y`` are defined, defines default values
-for ``someval`` and ``scope``, and sets up ``**kwargs`` to
-receive all other keyword arguments. If ``**kwargs`` or similar
-is not present, the argument ``**pageargs`` gets tacked on by
-Mako. When the template is called as a top-level template (i.e.
-via :meth:`~.Template.render`) or via the ``<%include>`` tag, the
-values for these arguments will be pulled from the ``Context``.
-In all other cases, i.e. via calling the ``body()`` method, the
-arguments are taken as ordinary arguments from the method call.
-So above, the body might be called as:
-
-.. sourcecode:: mako
-
-    ${self.body(5, y=10, someval=15, delta=7)}
-
-The :class:`.Context` object also supplies a :attr:`~.Context.kwargs` accessor, for
-cases when you'd like to pass along whatever is in the context to
-a ``body()`` callable:
-
-.. sourcecode:: mako
-
-    ${next.body(**context.kwargs)}
-
-The usefulness of calls like the above become more apparent when
-one works with inheriting templates. For more information on
-this, as well as the meanings of the names ``self`` and
-``next``, see :ref:`inheritance_toplevel`.
-
-.. _namespaces_builtin:
-
-Built-in Namespaces
-===================
-
-The namespace is so great that Mako gives your template one (or
-two) for free. The names of these namespaces are ``local`` and
-``self``. Other built-in namespaces include ``parent`` and
-``next``, which are optional and are described in
-:ref:`inheritance_toplevel`.
-
-.. _namespace_local:
-
-``local``
----------
-
-The ``local`` namespace is basically the namespace for the
-currently executing template. This means that all of the top
-level defs defined in your template, as well as your template's
-``body()`` function, are also available off of the ``local``
-namespace.
-
-The ``local`` namespace is also where properties like ``uri``,
-``filename``, and ``module`` and the ``get_namespace`` method
-can be particularly useful.
-
-.. _namespace_self:
-
-``self``
---------
-
-The ``self`` namespace, in the case of a template that does not
-use inheritance, is synonymous with ``local``. If inheritance is
-used, then ``self`` references the topmost template in the
-inheritance chain, where it is most useful for providing the
-ultimate form of various "method" calls which may have been
-overridden at various points in an inheritance chain. See
-:ref:`inheritance_toplevel`.
-
-Inheritable Namespaces
-======================
-
-The ``<%namespace>`` tag includes an optional attribute
-``inheritable="True"``, which will cause the namespace to be
-attached to the ``self`` namespace. Since ``self`` is globally
-available throughout an inheritance chain (described in the next
-section), all the templates in an inheritance chain can get at
-the namespace imported in a super-template via ``self``.
-
-.. sourcecode:: mako
-
-    ## base.html
-    <%namespace name="foo" file="foo.html" inheritable="True"/>
-
-    ${next.body()}
-
-    ## somefile.html
-    <%inherit file="base.html"/>
-
-    ${self.foo.bar()}
-
-This allows a super-template to load a whole bunch of namespaces
-that its inheriting templates can get to, without them having to
-explicitly load those namespaces themselves.
-
-The ``import="*"`` part of the ``<%namespace>`` tag doesn't yet
-interact with the ``inheritable`` flag, so currently you have to
-use the explicit namespace name off of ``self``, followed by the
-desired function name. But more on this in a future release.
-
-API Reference
-=============
-
-.. autoclass:: mako.runtime.Namespace
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.runtime.TemplateNamespace
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.runtime.ModuleNamespace
-    :show-inheritance:
-    :members:
- 
-.. autofunction:: mako.runtime.supports_caller
-
-.. autofunction:: mako.runtime.capture
-
diff --git a/lib/mako-0.7.2/doc/build/runtime.rst b/lib/mako-0.7.2/doc/build/runtime.rst
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/runtime.rst
+++ /dev/null
@@ -1,448 +0,0 @@
-.. _runtime_toplevel:
-
-============================
-The Mako Runtime Environment
-============================
-
-This section describes a little bit about the objects and
-built-in functions that are available in templates.
-
-.. _context:
-
-Context
-=======
-
-The :class:`.Context` is the central object that is created when
-a template is first executed, and is responsible for handling
-all communication with the outside world.  Within the template
-environment, it is available via the :ref:`reserved name <reserved_names>`
-``context``.  The :class:`.Context` includes two
-major components, one of which is the output buffer, which is a
-file-like object such as Python's ``StringIO`` or similar, and
-the other a dictionary of variables that can be freely
-referenced within a template; this dictionary is a combination
-of the arguments sent to the :meth:`~.Template.render` function and
-some built-in variables provided by Mako's runtime environment.
-
-The Buffer
-----------
-
-The buffer is stored within the :class:`.Context`, and writing
-to it is achieved by calling the :meth:`~.Context.write` method
--- in a template this looks like ``context.write('some string')``.
-You usually don't need to care about this, as all text within a template, as
-well as all expressions provided by ``${}``, automatically send
-everything to this method. The cases you might want to be aware
-of its existence are if you are dealing with various
-filtering/buffering scenarios, which are described in
-:ref:`filtering_toplevel`, or if you want to programmatically
-send content to the output stream, such as within a ``<% %>``
-block.
-
-.. sourcecode:: mako
-
-    <%
-        context.write("some programmatic text")
-    %>
-
-The actual buffer may or may not be the original buffer sent to
-the :class:`.Context` object, as various filtering/caching
-scenarios may "push" a new buffer onto the context's underlying
-buffer stack. For this reason, just stick with
-``context.write()`` and content will always go to the topmost
-buffer.
-
-.. _context_vars:
-
-Context Variables
------------------
-
-When your template is compiled into a Python module, the body
-content is enclosed within a Python function called
-``render_body``. Other top-level defs defined in the template are
-defined within their own function bodies which are named after
-the def's name with the prefix ``render_`` (i.e. ``render_mydef``).
-One of the first things that happens within these functions is
-that all variable names that are referenced within the function
-which are not defined in some other way (i.e. such as via
-assignment, module level imports, etc.) are pulled from the
-:class:`.Context` object's dictionary of variables. This is how you're
-able to freely reference variable names in a template which
-automatically correspond to what was passed into the current
-:class:`.Context`.
-
-* **What happens if I reference a variable name that is not in
-  the current context?** - The value you get back is a special
-  value called ``UNDEFINED``, or if the ``strict_undefined=True`` flag
-  is used a ``NameError`` is raised. ``UNDEFINED`` is just a simple global
-  variable with the class :class:`mako.runtime.Undefined`. The
-  ``UNDEFINED`` object throws an error when you call ``str()`` on
-  it, which is what happens if you try to use it in an
-  expression.
-* **UNDEFINED makes it hard for me to find what name is missing** - An alternative
-  is to specify the option ``strict_undefined=True``
-  to the :class:`.Template` or :class:`.TemplateLookup`.  This will cause
-  any non-present variables to raise an immediate ``NameError``
-  which includes the name of the variable in its message
-  when :meth:`~.Template.render` is called -- ``UNDEFINED`` is not used.
-
-  .. versionadded:: 0.3.6
-
-* **Why not just return None?** Using ``UNDEFINED``, or
-  raising a ``NameError`` is more
-  explicit and allows differentiation between a value of ``None``
-  that was explicitly passed to the :class:`.Context` and a value that
-  wasn't present at all.
-* **Why raise an exception when you call str() on it ? Why not
-  just return a blank string?** - Mako tries to stick to the
-  Python philosophy of "explicit is better than implicit". In
-  this case, it's decided that the template author should be made
-  to specifically handle a missing value rather than
-  experiencing what may be a silent failure. Since ``UNDEFINED``
-  is a singleton object just like Python's ``True`` or ``False``,
-  you can use the ``is`` operator to check for it:
-
-  .. sourcecode:: mako
-
-        % if someval is UNDEFINED:
-            someval is: no value
-        % else:
-            someval is: ${someval}
-        % endif
-
-Another facet of the :class:`.Context` is that its dictionary of
-variables is **immutable**. Whatever is set when
-:meth:`~.Template.render` is called is what stays. Of course, since
-its Python, you can hack around this and change values in the
-context's internal dictionary, but this will probably will not
-work as well as you'd think. The reason for this is that Mako in
-many cases creates copies of the :class:`.Context` object, which
-get sent to various elements of the template and inheriting
-templates used in an execution. So changing the value in your
-local :class:`.Context` will not necessarily make that value
-available in other parts of the template's execution. Examples
-of where Mako creates copies of the :class:`.Context` include
-within top-level def calls from the main body of the template
-(the context is used to propagate locally assigned variables
-into the scope of defs; since in the template's body they appear
-as inlined functions, Mako tries to make them act that way), and
-within an inheritance chain (each template in an inheritance
-chain has a different notion of ``parent`` and ``next``, which
-are all stored in unique :class:`.Context` instances).
-
-* **So what if I want to set values that are global to everyone
-  within a template request?** - All you have to do is provide a
-  dictionary to your :class:`.Context` when the template first
-  runs, and everyone can just get/set variables from that. Lets
-  say its called ``attributes``.
-
-  Running the template looks like:
-
-  .. sourcecode:: python
-
-      output = template.render(attributes={})
-
-  Within a template, just reference the dictionary:
-
-  .. sourcecode:: mako
-
-      <%
-          attributes['foo'] = 'bar'
-      %>
-      'foo' attribute is: ${attributes['foo']}
-
-* **Why can't "attributes" be a built-in feature of the
-  Context?** - This is an area where Mako is trying to make as
-  few decisions about your application as it possibly can.
-  Perhaps you don't want your templates to use this technique of
-  assigning and sharing data, or perhaps you have a different
-  notion of the names and kinds of data structures that should
-  be passed around. Once again Mako would rather ask the user to
-  be explicit.
-
-Context Methods and Accessors
------------------------------
-
-Significant members of :class:`.Context` include:
-
-* ``context[key]`` / ``context.get(key, default=None)`` -
-  dictionary-like accessors for the context. Normally, any
-  variable you use in your template is automatically pulled from
-  the context if it isn't defined somewhere already. Use the
-  dictionary accessor and/or ``get`` method when you want a
-  variable that *is* already defined somewhere else, such as in
-  the local arguments sent to a ``%def`` call. If a key is not
-  present, like a dictionary it raises ``KeyError``.
-* ``keys()`` - all the names defined within this context.
-* ``kwargs`` - this returns a **copy** of the context's
-  dictionary of variables. This is useful when you want to
-  propagate the variables in the current context to a function
-  as keyword arguments, i.e.:
-
-  .. sourcecode:: mako
-
-        ${next.body(**context.kwargs)}
-
-* ``write(text)`` - write some text to the current output
-  stream.
-* ``lookup`` - returns the :class:`.TemplateLookup` instance that is
-  used for all file-lookups within the current execution (even
-  though individual :class:`.Template` instances can conceivably have
-  different instances of a :class:`.TemplateLookup`, only the
-  :class:`.TemplateLookup` of the originally-called :class:`.Template` gets
-  used in a particular execution).
-
-.. _loop_context:
-
-The Loop Context
-================
-
-Within ``% for`` blocks, the :ref:`reserved name<reserved_names>` ``loop``
-is available.  ``loop`` tracks the progress of
-the ``for`` loop and makes it easy to use the iteration state to control
-template behavior:
-
-.. sourcecode:: mako
-
-    <ul>
-    % for a in ("one", "two", "three"):
-        <li>Item ${loop.index}: ${a}</li>
-    % endfor
-    </ul>
-
-.. versionadded:: 0.7
-
-Iterations
-----------
-
-Regardless of the type of iterable you're looping over, ``loop`` always tracks
-the 0-indexed iteration count (available at ``loop.index``), its parity
-(through the ``loop.even`` and ``loop.odd`` bools), and ``loop.first``, a bool
-indicating whether the loop is on its first iteration.  If your iterable
-provides a ``__len__`` method, ``loop`` also provides access to
-a count of iterations remaining at ``loop.reverse_index`` and ``loop.last``,
-a bool indicating whether the loop is on its last iteration; accessing these
-without ``__len__`` will raise a ``TypeError``.
-
-Cycling
--------
-
-Cycling is available regardless of whether the iterable you're using provides
-a ``__len__`` method.  Prior to Mako 0.7, you might have generated a simple
-zebra striped list using ``enumerate``:
-
-.. sourcecode:: mako
-
-    <ul>
-    % for i, item in enumerate(('spam', 'ham', 'eggs')):
-      <li class="${'odd' if i % 2 else 'even'}">${item}</li>
-    % endfor
-    </ul>
-
-With ``loop.cycle``, you get the same results with cleaner code and less prep work:
-
-.. sourcecode:: mako
-
-    <ul>
-    % for item in ('spam', 'ham', 'eggs'):
-      <li class="${loop.cycle('even', 'odd')}">${item}</li>
-    % endfor
-    </ul>
-
-Both approaches produce output like the following:
-
-.. sourcecode:: html
-
-    <ul>
-      <li class="even">spam</li>
-      <li class="odd">ham</li>
-      <li class="even">eggs</li>
-    </ul>
-
-Parent Loops
-------------
-
-Loop contexts can also be transparently nested, and the Mako runtime will do
-the right thing and manage the scope for you.  You can access the parent loop
-context through ``loop.parent``.
-
-This allows you to reach all the way back up through the loop stack by
-chaining ``parent`` attribute accesses, i.e. ``loop.parent.parent....`` as
-long as the stack depth isn't exceeded.  For example, you can use the parent
-loop to make a checkered table:
-
-.. sourcecode:: mako
-
-    <table>
-    % for consonant in 'pbj':
-      <tr>
-      % for vowel in 'iou':
-        <td class="${'black' if (loop.parent.even == loop.even) else 'red'}">
-          ${consonant + vowel}t
-        </td>
-      % endfor
-      </tr>
-    % endfor
-    </table>
-
-.. sourcecode:: html
-
-    <table>
-      <tr>
-        <td class="black">
-          pit
-        </td>
-        <td class="red">
-          pot
-        </td>
-        <td class="black">
-          put
-        </td>
-      </tr>
-      <tr>
-        <td class="red">
-          bit
-        </td>
-        <td class="black">
-          bot
-        </td>
-        <td class="red">
-          but
-        </td>
-      </tr>
-      <tr>
-        <td class="black">
-          jit
-        </td>
-        <td class="red">
-          jot
-        </td>
-        <td class="black">
-          jut
-        </td>
-      </tr>
-    </table>
-
-.. _migrating_loop:
-
-Migrating Legacy Templates that Use the Word "loop"
----------------------------------------------------
-
-.. versionchanged:: 0.7
-   The ``loop`` name is now :ref:`reserved <reserved_names>` in Mako,
-   which means a template that refers to a variable named ``loop``
-   won't function correctly when used in Mako 0.7.
-
-To ease the transition for such systems, the feature can be disabled across the board for
-all templates, then re-enabled on a per-template basis for those templates which wish
-to make use of the new system.
-
-First, the ``enable_loop=False`` flag is passed to either the :class:`.TemplateLookup`
-or :class:`.Template` object in use:
-
-.. sourcecode:: python
-
-    lookup = TemplateLookup(directories=['/docs'], enable_loop=False)
-
-or:
-
-.. sourcecode:: python
-
-    template = Template("some template", enable_loop=False)
-
-An individual template can make usage of the feature when ``enable_loop`` is set to
-``False`` by switching it back on within the ``<%page>`` tag:
-
-.. sourcecode:: mako
-
-    <%page enable_loop="True"/>
-
-    % for i in collection:
-        ${i} ${loop.index}
-    % endfor
-
-Using the above scheme, it's safe to pass the name ``loop`` to the :meth:`.Template.render`
-method as well as to freely make usage of a variable named ``loop`` within a template, provided
-the ``<%page>`` tag doesn't override it.  New templates that want to use the ``loop`` context
-can then set up ``<%page enable_loop="True"/>`` to use the new feature without affecting
-old templates.
-
-All the Built-in Names
-======================
-
-A one-stop shop for all the names Mako defines. Most of these
-names are instances of :class:`.Namespace`, which are described
-in the next section, :ref:`namespaces_toplevel`. Also, most of
-these names other than ``context``, ``UNDEFINED``, and ``loop`` are
-also present *within* the :class:`.Context` itself.   The names
-``context``, ``loop`` and ``UNDEFINED`` themselves can't be passed
-to the context and can't be substituted -- see the section :ref:`reserved_names`.
-
-* ``context`` - this is the :class:`.Context` object, introduced
-  at :ref:`context`.
-* ``local`` - the namespace of the current template, described
-  in :ref:`namespaces_builtin`.
-* ``self`` - the namespace of the topmost template in an
-  inheritance chain (if any, otherwise the same as ``local``),
-  mostly described in :ref:`inheritance_toplevel`.
-* ``parent`` - the namespace of the parent template in an
-  inheritance chain (otherwise undefined); see
-  :ref:`inheritance_toplevel`.
-* ``next`` - the namespace of the next template in an
-  inheritance chain (otherwise undefined); see
-  :ref:`inheritance_toplevel`.
-* ``caller`` - a "mini" namespace created when using the
-  ``<%call>`` tag to define a "def call with content"; described
-  in :ref:`defs_with_content`.
-* ``loop`` - this provides access to :class:`.LoopContext` objects when
-  they are requested within ``% for`` loops, introduced at :ref:`loop_context`.
-* ``capture`` - a function that calls a given def and captures
-  its resulting content into a string, which is returned. Usage
-  is described in :ref:`filtering_toplevel`.
-* ``UNDEFINED`` - a global singleton that is applied to all
-  otherwise uninitialized template variables that were not
-  located within the :class:`.Context` when rendering began,
-  unless the :class:`.Template` flag ``strict_undefined``
-  is set to ``True``. ``UNDEFINED`` is
-  an instance of :class:`.Undefined`, and raises an
-  exception when its ``__str__()`` method is called.
-* ``pageargs`` - this is a dictionary which is present in a
-  template which does not define any ``**kwargs`` section in its
-  ``<%page>`` tag. All keyword arguments sent to the ``body()``
-  function of a template (when used via namespaces) go here by
-  default unless otherwise defined as a page argument. If this
-  makes no sense, it shouldn't; read the section
-  :ref:`namespaces_body`.
-
-.. _reserved_names:
-
-Reserved Names
---------------
-
-Mako has a few names that are considered to be "reserved" and can't be used
-as variable names.
-
-.. versionchanged:: 0.7
-   Mako raises an error if these words are found passed to the template
-   as context arguments, whereas in previous versions they'd be silently
-   ignored or lead to other error messages.
-
-* ``context`` - see :ref:`context`.
-* ``UNDEFINED`` - see :ref:`context_vars`.
-* ``loop`` - see :ref:`loop_context`.  Note this can be disabled for legacy templates
-  via the ``enable_loop=False`` argument; see :ref:`migrating_loop`.
-
-API Reference
-=============
-
-.. autoclass:: mako.runtime.Context
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.runtime.LoopContext
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.runtime.Undefined
-    :show-inheritance:
-
diff --git a/lib/mako-0.7.2/doc/build/static/docs.css b/lib/mako-0.7.2/doc/build/static/docs.css
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/static/docs.css
+++ /dev/null
@@ -1,438 +0,0 @@
-/* global */
-
-body {
-  background-color: #FDFBFC;
-  margin:38px;
-  color:#333333;
-}
-
-a {
-    font-weight:normal; 
-    text-decoration:none;
-}
-
-form {
-    display:inline;
-}
-
-/* hyperlinks */
-
-a:link, a:visited, a:active {
-    color:#0000FF;
-}
-a:hover {
-    color:#700000;
-    text-decoration:underline;
-}
-
-/* paragraph links after sections.
-   These aren't visible until hovering
-   over the <h> tag, then have a 
-   "reverse video" effect over the actual
-   link
- */
-
-a.headerlink {
-    font-size: 0.8em;
-    padding: 0 4px 0 4px;
-    text-decoration: none;
-    visibility: hidden;
-}
-
-h1:hover > a.headerlink,
-h2:hover > a.headerlink,
-h3:hover > a.headerlink,
-h4:hover > a.headerlink,
-h5:hover > a.headerlink,
-h6:hover > a.headerlink,
-dt:hover > a.headerlink {
-    visibility: visible;
-}
-
-a.headerlink:hover {
-    background-color: #990000;
-    color: white;
-}
-
-
-/* Container setup */
-
-#docs-container {
-  max-width:1000px;
-}
-
-
-/* header/footer elements */
-
-#docs-header h1 {
-    font-size:20px;
-    color: #222222;
-    margin: 0;
-    padding: 0;
-}
-
-#docs-header {
-  font-family:Tahoma, Geneva,sans-serif;
-
-  font-size:.9em;
-
-}
-
-#docs-top-navigation,
-#docs-bottom-navigation {
-  font-family: Tahoma, Geneva, sans-serif;
-  background-color: #EEE;
-  border: solid 1px #CCC;
-  padding:10px;
-  font-size:.9em;
-}
-
-#docs-top-navigation {
-  margin:10px 0px 10px 0px;
-  line-height:1.2em;
-}
-
-.docs-navigation-links {
-  font-family:Tahoma, Geneva,sans-serif;
-}
-
-#docs-bottom-navigation {
-    float:right;
-    margin: 1em 0 1em 5px;
-}
-
-#docs-copyright {
-    font-size:.85em;
-    padding:5px 0px;
-}
-
-#docs-header h1,
-#docs-top-navigation h1,
-#docs-top-navigation h2 {
-  font-family:Tahoma,Geneva,sans-serif;
-  font-weight:normal;
-}
-
-#docs-top-navigation h2 {
-    margin:16px 4px 7px 5px;
-    font-size:2em;
-}
-
-#docs-search {
-    float:right;
-}
-
-#docs-top-page-control {
-  float:right;
-  width:350px;
-}
-
-#docs-top-page-control ul {
-  padding:0;
-  margin:0;
-}
-
-#docs-top-page-control li {
-    list-style-type:none;
-    padding:1px 8px;
-}
-
-
-#docs-container .version-num {
-    font-weight: bold;
-}
-
-
-/* content container, sidebar */
-
-#docs-body-container {
-  background-color:#EFEFEF;
-  border: solid 1px #CCC;
-
-}
-
-#docs-body,
-#docs-sidebar
- {
-  /*font-family: helvetica, arial, sans-serif;
-  font-size:.9em;*/
-
-  font-family: Tahoma, Geneva, sans-serif;
-  /*font-size:.85em;*/
-  line-height:1.5em;
-
-}
-
-#docs-sidebar > ul {
-  font-size:.9em;
-}
-
-#docs-sidebar {
-  float:left;
-  width:212px;
-  padding: 10px 0 0 15px;
-  /*font-size:.85em;*/
-}
-
-#docs-sidebar h3, #docs-sidebar h4 {
-    background-color: #DDDDDD;
-    color: #222222;
-    font-family: Tahoma, Geneva,sans-serif;
-    font-size: 1.1em;
-    font-weight: normal;
-    margin: 10px 0 0 -15px;
-    padding: 5px 10px 5px 10px;
-    text-shadow: 1px 1px 0 white;
-    width:210px;
-}
-
-#docs-sidebar h3 a, #docs-sidebar h4 a {
-  color: #222222;
-}
-#docs-sidebar ul {
-  margin: 10px 10px 10px 0px;
-  padding: 0;
-  list-style: none outside none;
-}
-
-
-#docs-sidebar ul ul {
-    margin-bottom: 0;
-    margin-top: 0;
-    list-style: square outside none;
-    margin-left: 20px;
-}
-
-#docs-body {
-  background-color:#FFFFFF;
-  padding:1px 10px 10px 10px;
-}
-
-#docs-body.withsidebar {
-  margin: 0 0 0 230px;
-  border-left:3px solid #DFDFDF;
-}
-
-#docs-body h1,
-#docs-body h2,
-#docs-body h3,
-#docs-body h4 {
-  font-family:Tahoma, Geneva, sans-serif;
-}
-
-#docs-body h1 {
-  /* hide the <h1> for each content section. */
-  display:none;
-  font-size:1.8em;
-}
-
-#docs-body h2 {
-  font-size:1.6em;
-}
-
-#docs-body h3 {
-  font-size:1.4em;
-}
-
-/* SQL popup, code styles */
-
-.highlight {
-  background:none;
-}
-
-#docs-container pre {
-  font-size:1.2em;
-}
-
-#docs-container .pre {
-  font-size:1.1em;
-}
-
-#docs-container pre {
-  background-color: #f0f0f0;  
-  border: solid 1px #ccc;
-  box-shadow: 2px 2px 3px #DFDFDF;
-  padding:10px;
-  margin: 5px 0px 5px 0px;
-  overflow:auto;
-  line-height:1.3em;
-}
-
-.popup_sql, .show_sql
-{
-    background-color: #FBFBEE;
-    padding:5px 10px;
-    margin:10px -5px;
-    border:1px dashed;
-}
-
-/* the [SQL] links used to display SQL */
-#docs-container .sql_link
-{
-  font-weight:normal;
-  font-family: arial, sans-serif;
-  font-size:.9em;
-  text-transform: uppercase;
-  color:#990000;
-  border:1px solid;
-  padding:1px 2px 1px 2px;
-  margin:0px 10px 0px 15px;
-  float:right;
-  line-height:1.2em;
-}
-
-#docs-container a.sql_link, 
-#docs-container .sql_link
-{
-    text-decoration: none;
-    padding:1px 2px;
-}
-
-#docs-container a.sql_link:hover {
-    text-decoration: none;
-    color:#fff;
-    border:1px solid #900;
-    background-color: #900;
-}
-
-/* docutils-specific elements */
-
-th.field-name {
-    text-align:right;
-}
-
-div.note, div.warning, p.deprecated, div.topic  {
-    background-color:#EEFFEF;
-}
-
-
-div.admonition, div.topic, p.deprecated, p.versionadded, p.versionchanged {
-    border:1px solid #CCCCCC;
-    padding:5px 10px;
-    font-size:.9em;
-    box-shadow: 2px 2px 3px #DFDFDF;
-}
-
-div.warning .admonition-title {
-    color:#FF0000;
-}
-
-div.admonition .admonition-title, div.topic .topic-title {
-    font-weight:bold;
-}
-
-.viewcode-back, .viewcode-link {
-    float:right;
-}
-
-dl.function > dt,
-dl.attribute > dt,
-dl.classmethod > dt,
-dl.method > dt,
-dl.class > dt,
-dl.exception > dt
-{
-    background-color:#F0F0F0;
-    margin:25px -10px 10px 10px;
-    padding: 0px 10px;
-}
-
-p.versionadded span.versionmodified,
-p.versionchanged span.versionmodified,
-p.deprecated span.versionmodified {
-    background-color: #F0F0F0;
-    font-style: italic;
-}
-
-dt:target, span.highlight {
-    background-color:#FBE54E;
-}
-
-a.headerlink {
-    font-size: 0.8em;
-    padding: 0 4px 0 4px;
-    text-decoration: none;
-    visibility: hidden;
-}
-
-h1:hover > a.headerlink,
-h2:hover > a.headerlink,
-h3:hover > a.headerlink,
-h4:hover > a.headerlink,
-h5:hover > a.headerlink,
-h6:hover > a.headerlink,
-dt:hover > a.headerlink {
-    visibility: visible;
-}
-
-a.headerlink:hover {
-    background-color: #00f;
-    color: white;
-}
-
-.clearboth {
-    clear:both;
-}
-
-tt.descname {
-    background-color:transparent;
-    font-size:1.2em;
-    font-weight:bold;
-}
-
-tt.descclassname {
-    background-color:transparent;
-}
-
-tt {
-    background-color:#ECF0F3;
-    padding:0 1px;
-}
-
-/* syntax highlighting overrides */
-.k, .kn {color:#0908CE;}
-.o {color:#BF0005;}
-.go {color:#804049;}
-
-
-/* special "index page" sections 
-   with specific formatting
-*/
-
-div#sqlalchemy-documentation {
-  font-size:.95em;
-}
-div#sqlalchemy-documentation em {
-  font-style:normal;
-}
-div#sqlalchemy-documentation .rubric{
-  font-size:14px;
-  background-color:#EEFFEF;
-  padding:5px;
-  border:1px solid #BFBFBF;
-}
-div#sqlalchemy-documentation a, div#sqlalchemy-documentation li {
-  padding:5px 0px;
-}
-
-div#getting-started {
-  border-bottom:1px solid;
-}
-
-div#sqlalchemy-documentation div#sqlalchemy-orm {
-  float:left;
-  width:48%;
-}
-
-div#sqlalchemy-documentation div#sqlalchemy-core {
-  float:left;
-  width:48%;
-  margin:0;
-  padding-left:10px;
-  border-left:1px solid;
-}
-
-div#dialect-documentation {
-  border-top:1px solid;
-  /*clear:left;*/
-}
diff --git a/lib/mako-0.7.2/doc/build/static/makoLogo.png b/lib/mako-0.7.2/doc/build/static/makoLogo.png
deleted file mode 100644
Binary file lib/mako-0.7.2/doc/build/static/makoLogo.png has changed
diff --git a/lib/mako-0.7.2/doc/build/static/site.css b/lib/mako-0.7.2/doc/build/static/site.css
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/static/site.css
+++ /dev/null
@@ -1,82 +0,0 @@
-body { 
-    font-family: Tahoma, Geneva, sans-serif;
-    line-height:1.4em;
-    margin:15px;
-    background-color:#FFFFFF;
-}
-img {border:none;}
-a { text-decoration: none;}
-a:visited  { color: #2929ff;}
-a:hover { color: #0000ff;}
-
-#wrap {
-    margin:0 auto;
-    max-width:1024px;
-    min-width:480px;
-    position:relative;
-    
-}
-h1 {
-    font-size:1.6em;
-    font-weight:bold;
-}
-
-h2 {
-    font-size:1.1em;
-    font-weight:bold;
-    margin:10px 0px 10px 0px;
-}
-
-.clearfix{
-    clear:both;
-}
-
-.red {
-	font-weight:bold;
-	color:#FF0000;
-}
-.rightbar {
-    float:right;
-    margin:10px 30px 10px 30px;
-}
-.slogan {
-    margin-top:10px;
-}
-.toolbar {
-    margin-top:20px;
-}
-.copyright {
-    font-size:.8em;
-    text-align:center;
-    color:909090;
-}
-.pylogo {
-	text-align:right;
-	float:right;
-}
-.code {
-    font-family:monospace;
-}
-
-li {
-    margin:1px 0px 1px 0px;
-}
-
-.speedchart td {
-    font-size:small;
-}
-
-pre.codesample { 
-    margin: 1.5em; 
-    padding: .5em; 
-    font-size: .95em; 
-    line-height:1em;
-    background-color: #eee;
-    border: 1px solid #ccc;
-    width:450px;
-    overflow:auto;
-}
-
-#speedchart {
-    margin:5px 10px 5px 10px;
-}
diff --git a/lib/mako-0.7.2/doc/build/syntax.rst b/lib/mako-0.7.2/doc/build/syntax.rst
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/syntax.rst
+++ /dev/null
@@ -1,469 +0,0 @@
-.. _syntax_toplevel:
-
-======
-Syntax
-======
-
-A Mako template is parsed from a text stream containing any kind
-of content, XML, HTML, email text, etc. The template can further
-contain Mako-specific directives which represent variable and/or
-expression substitutions, control structures (i.e. conditionals
-and loops), server-side comments, full blocks of Python code, as
-well as various tags that offer additional functionality. All of
-these constructs compile into real Python code. This means that
-you can leverage the full power of Python in almost every aspect
-of a Mako template.
-
-Expression Substitution
-=======================
-
-The simplest expression is just a variable substitution. The
-syntax for this is the ``${}`` construct, which is inspired by
-Perl, Genshi, JSP EL, and others:
-
-.. sourcecode:: mako
-
-    this is x: ${x}
-
-Above, the string representation of ``x`` is applied to the
-template's output stream. If you're wondering where ``x`` comes
-from, it's usually from the :class:`.Context` supplied to the
-template's rendering function. If ``x`` was not supplied to the
-template and was not otherwise assigned locally, it evaluates to
-a special value ``UNDEFINED``. More on that later.
-
-The contents within the ``${}`` tag are evaluated by Python
-directly, so full expressions are OK:
-
-.. sourcecode:: mako
-
-    pythagorean theorem:  ${pow(x,2) + pow(y,2)}
-
-The results of the expression are evaluated into a string result
-in all cases before being rendered to the output stream, such as
-the above example where the expression produces a numeric
-result.
-
-Expression Escaping
-===================
-
-Mako includes a number of built-in escaping mechanisms,
-including HTML, URI and XML escaping, as well as a "trim"
-function. These escapes can be added to an expression
-substitution using the ``|`` operator:
-
-.. sourcecode:: mako
-
-    ${"this is some text" | u}
-
-The above expression applies URL escaping to the expression, and
-produces ``this+is+some+text``. The ``u`` name indicates URL
-escaping, whereas ``h`` represents HTML escaping, ``x``
-represents XML escaping, and ``trim`` applies a trim function.
-
-Read more about built-in filtering functions, including how to
-make your own filter functions, in :ref:`filtering_toplevel`.
-
-Control Structures
-==================
-
-A control structure refers to all those things that control the
-flow of a program -- conditionals (i.e. ``if``/``else``), loops (like
-``while`` and ``for``), as well as things like ``try``/``except``. In Mako,
-control structures are written using the ``%`` marker followed
-by a regular Python control expression, and are "closed" by
-using another ``%`` marker with the tag "``end<name>``", where
-"``<name>``" is the keyword of the expression:
-
-.. sourcecode:: mako
-
-    % if x==5:
-        this is some output
-    % endif
-
-The ``%`` can appear anywhere on the line as long as no text
-precedes it; indentation is not significant. The full range of
-Python "colon" expressions are allowed here, including
-``if``/``elif``/``else``, ``while``, ``for``, and even ``def``, although
-Mako has a built-in tag for defs which is more full-featured.
-
-.. sourcecode:: mako
-
-    % for a in ['one', 'two', 'three', 'four', 'five']:
-        % if a[0] == 't':
-        its two or three
-        % elif a[0] == 'f':
-        four/five
-        % else:
-        one
-        % endif
-    % endfor
-
-The ``%`` sign can also be "escaped", if you actually want to
-emit a percent sign as the first non whitespace character on a
-line, by escaping it as in ``%%``:
-
-.. sourcecode:: mako
-
-    %% some text
-
-        %% some more text
-
-The Loop Context
-----------------
-
-The **loop context** provides additional information about a loop
-while inside of a ``% for`` structure:
-
-.. sourcecode:: mako
-
-    <ul>
-    % for a in ("one", "two", "three"):
-        <li>Item ${loop.index}: ${a}</li>
-    % endfor
-    </ul>
-
-See :ref:`loop_context` for more information on this feature.
-
-.. versionadded:: 0.7
-
-Comments
-========
-
-Comments come in two varieties. The single line comment uses
-``##`` as the first non-space characters on a line:
-
-.. sourcecode:: mako
-
-    ## this is a comment.
-    ...text ...
-
-A multiline version exists using ``<%doc> ...text... </%doc>``:
-
-.. sourcecode:: mako
-
-    <%doc>
-        these are comments
-        more comments
-    </%doc>
-
-Newline Filters
-===============
-
-The backslash ("``\``") character, placed at the end of any
-line, will consume the newline character before continuing to
-the next line:
-
-.. sourcecode:: mako
-
-    here is a line that goes onto \
-    another line.
-
-The above text evaluates to:
-
-.. sourcecode:: text
-
-    here is a line that goes onto another line.
-
-Python Blocks
-=============
-
-Any arbitrary block of python can be dropped in using the ``<%
-%>`` tags:
-
-.. sourcecode:: mako
-
-    this is a template
-    <%
-        x = db.get_resource('foo')
-        y = [z.element for z in x if x.frobnizzle==5]
-    %>
-    % for elem in y:
-        element: ${elem}
-    % endfor
-
-Within ``<% %>``, you're writing a regular block of Python code.
-While the code can appear with an arbitrary level of preceding
-whitespace, it has to be consistently formatted with itself.
-Mako's compiler will adjust the block of Python to be consistent
-with the surrounding generated Python code.
-
-Module-level Blocks
-===================
-
-A variant on ``<% %>`` is the module-level code block, denoted
-by ``<%! %>``. Code within these tags is executed at the module
-level of the template, and not within the rendering function of
-the template. Therefore, this code does not have access to the
-template's context and is only executed when the template is
-loaded into memory (which can be only once per application, or
-more, depending on the runtime environment). Use the ``<%! %>``
-tags to declare your template's imports, as well as any
-pure-Python functions you might want to declare:
-
-.. sourcecode:: mako
-
-    <%!
-        import mylib
-        import re
-
-        def filter(text):
-            return re.sub(r'^@', '', text)
-    %>
-
-Any number of ``<%! %>`` blocks can be declared anywhere in a
-template; they will be rendered in the resulting module 
-in a single contiguous block above all render callables,
-in the order in which they appear in the source template.
-
-Tags
-====
-
-The rest of what Mako offers takes place in the form of tags.
-All tags use the same syntax, which is similar to an XML tag
-except that the first character of the tag name is a ``%``
-character. The tag is closed either by a contained slash
-character, or an explicit closing tag:
-
-.. sourcecode:: mako
-
-    <%include file="foo.txt"/>
-
-    <%def name="foo" buffered="True">
-        this is a def
-    </%def>
-
-All tags have a set of attributes which are defined for each
-tag. Some of these attributes are required. Also, many
-attributes support **evaluation**, meaning you can embed an
-expression (using ``${}``) inside the attribute text:
-
-.. sourcecode:: mako
-
-    <%include file="/foo/bar/${myfile}.txt"/>
-
-Whether or not an attribute accepts runtime evaluation depends
-on the type of tag and how that tag is compiled into the
-template. The best way to find out if you can stick an
-expression in is to try it! The lexer will tell you if it's not
-valid.
-
-Heres a quick summary of all the tags:
-
-``<%page>``
------------
-
-This tag defines general characteristics of the template,
-including caching arguments, and optional lists of arguments
-which the template expects when invoked.
-
-.. sourcecode:: mako
-
-    <%page args="x, y, z='default'"/>
-
-Or a page tag that defines caching characteristics:
-
-.. sourcecode:: mako
-
-    <%page cached="True" cache_type="memory"/>
-
-Currently, only one ``<%page>`` tag gets used per template, the
-rest get ignored. While this will be improved in a future
-release, for now make sure you have only one ``<%page>`` tag
-defined in your template, else you may not get the results you
-want. The details of what ``<%page>`` is used for are described
-further in :ref:`namespaces_body` as well as :ref:`caching_toplevel`.
-
-``<%include>``
---------------
-
-A tag that is familiar from other template languages, ``%include``
-is a regular joe that just accepts a file argument and calls in
-the rendered result of that file:
-
-.. sourcecode:: mako
-
-    <%include file="header.html"/>
-
-        hello world
-
-    <%include file="footer.html"/>
-
-Include also accepts arguments which are available as ``<%page>`` arguments in the receiving template:
-
-.. sourcecode:: mako
-
-    <%include file="toolbar.html" args="current_section='members', username='ed'"/>
-
-``<%def>``
-----------
-
-The ``%def`` tag defines a Python function which contains a set
-of content, that can be called at some other point in the
-template. The basic idea is simple:
-
-.. sourcecode:: mako
-
-    <%def name="myfunc(x)">
-        this is myfunc, x is ${x}
-    </%def>
-
-    ${myfunc(7)}
-
-The ``%def`` tag is a lot more powerful than a plain Python ``def``, as
-the Mako compiler provides many extra services with ``%def`` that
-you wouldn't normally have, such as the ability to export defs
-as template "methods", automatic propagation of the current
-:class:`.Context`, buffering/filtering/caching flags, and def calls
-with content, which enable packages of defs to be sent as
-arguments to other def calls (not as hard as it sounds). Get the
-full deal on what ``%def`` can do in :ref:`defs_toplevel`.
-
-``<%block>``
-------------
-
-``%block`` is a tag that is close to a ``%def``,
-except executes itself immediately in its base-most scope,
-and can also be anonymous (i.e. with no name):
-
-.. sourcecode:: mako
-
-    <%block filter="h">
-        some <html> stuff.
-    </%block>
-
-Inspired by Jinja2 blocks, named blocks offer a syntactically pleasing way
-to do inheritance:
-
-.. sourcecode:: mako
-
-    <html>
-        <body>
-        <%block name="header">
-            <h2><%block name="title"/></h2>
-        </%block>
-        ${self.body()}
-        </body>
-    </html>
-
-Blocks are introduced in :ref:`blocks` and further described in :ref:`inheritance_toplevel`.
-
-.. versionadded:: 0.4.1
-
-``<%namespace>``
-----------------
-
-``%namespace`` is Mako's equivalent of Python's ``import``
-statement. It allows access to all the rendering functions and
-metadata of other template files, plain Python modules, as well
-as locally defined "packages" of functions.
-
-.. sourcecode:: mako
-
-    <%namespace file="functions.html" import="*"/>
-
-The underlying object generated by ``%namespace``, an instance of
-:class:`.mako.runtime.Namespace`, is a central construct used in
-templates to reference template-specific information such as the
-current URI, inheritance structures, and other things that are
-not as hard as they sound right here. Namespaces are described
-in :ref:`namespaces_toplevel`.
-
-``<%inherit>``
---------------
-
-Inherit allows templates to arrange themselves in **inheritance
-chains**. This is a concept familiar in many other template
-languages.
-
-.. sourcecode:: mako
-
-    <%inherit file="base.html"/>
-
-When using the ``%inherit`` tag, control is passed to the topmost
-inherited template first, which then decides how to handle
-calling areas of content from its inheriting templates. Mako
-offers a lot of flexibility in this area, including dynamic
-inheritance, content wrapping, and polymorphic method calls.
-Check it out in :ref:`inheritance_toplevel`.
-
-``<%``\ nsname\ ``:``\ defname\ ``>``
--------------------------------------
-
-Any user-defined "tag" can be created against
-a namespace by using a tag with a name of the form
-``<%<namespacename>:<defname>>``. The closed and open formats of such a
-tag are equivalent to an inline expression and the ``<%call>``
-tag, respectively.
-
-.. sourcecode:: mako
-
-    <%mynamespace:somedef param="some value">
-        this is the body
-    </%mynamespace:somedef>
-
-To create custom tags which accept a body, see
-:ref:`defs_with_content`.
-
-.. versionadded:: 0.2.3
-
-``<%call>``
------------
-
-The call tag is the "classic" form of a user-defined tag, and is
-roughly equivalent to the ``<%namespacename:defname>`` syntax
-described above. This tag is also described in :ref:`defs_with_content`.
-
-``<%doc>``
-----------
-
-The ``%doc`` tag handles multiline comments:
-
-.. sourcecode:: mako
-
-    <%doc>
-        these are comments
-        more comments
-    </%doc>
-
-Also the ``##`` symbol as the first non-space characters on a line can be used for single line comments.
-
-``<%text>``
------------
-
-This tag suspends the Mako lexer's normal parsing of Mako
-template directives, and returns its entire body contents as
-plain text. It is used pretty much to write documentation about
-Mako:
-
-.. sourcecode:: mako
-
-    <%text filter="h">
-        heres some fake mako ${syntax}
-        <%def name="x()">${x}</%def>
-    </%text>
-
-Returning Early from a Template
-===============================
-
-Sometimes you want to stop processing a template or ``<%def>``
-method in the middle and just use the text you've accumulated so
-far. You can use a ``return`` statement inside a Python
-block to do that.
-
-.. sourcecode:: mako
-
-    % if not len(records):
-        No records found.
-        <% return %>
-    % endif
-
-Or perhaps:
-
-.. sourcecode:: mako
-
-    <%
-        if not len(records):
-            return
-    %>
-
diff --git a/lib/mako-0.7.2/doc/build/templates/base.mako b/lib/mako-0.7.2/doc/build/templates/base.mako
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/templates/base.mako
+++ /dev/null
@@ -1,51 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
-<head>
-<title><%block name="head_title">Mako Templates for Python</%block></title>
-<%block name="headers">
-</%block>
-<link rel="stylesheet" href="${pathto('_static/site.css', 1)}"></link>
-
-
-</head>
-<body>
-    <div id="wrap">
-    <div class="rightbar">
-    <div class="slogan">
-    Hyperfast and lightweight templating for the Python platform.
-    </div>
-
-    % if toolbar:
-    <div class="toolbar">
-    <a href="${site_base}/">Home</a>
-      |  
-    <a href="${site_base}/trac">Trac</a>
-      |  
-    <a href="${site_base}/community.html">Community</a>
-      |  
-    <a href="${pathto('index')}">Documentation</a>
-      |  
-    <a href="${site_base}/download.html">Download</a>
-    </div>
-    % endif
-
-    </div>
-
-    <a href="${site_base}/"><img src="${pathto('_static/makoLogo.png', 1)}" /></a>
-
-    <hr/>
-
-    ${next.body()}
-<div class="clearfix">
-<%block name="footer">
-<hr/>
-
-<div class="copyright">Website content copyright © by Michael Bayer.
-    All rights reserved.  Mako and its documentation are licensed
-    under the MIT license.  mike(&)zzzcomputing.com</div>
-</%block>
-</div>
-</div>
-</body>
-</html>
diff --git a/lib/mako-0.7.2/doc/build/templates/genindex.mako b/lib/mako-0.7.2/doc/build/templates/genindex.mako
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/templates/genindex.mako
+++ /dev/null
@@ -1,77 +0,0 @@
-<%inherit file="${context['layout']}"/>
-
-<%block name="show_title" filter="util.striptags">
-    ${_('Index')}
-</%block>
-
-   <h1 id="index">${_('Index')}</h1>
-
-   % for i, (key, dummy) in enumerate(genindexentries):
-    ${i != 0 and '| ' or ''}<a href="#${key}"><strong>${key}</strong></a>
-   % endfor
-
-   <hr />
-
-   % for i, (key, entries) in enumerate(genindexentries):
-<h2 id="${key}">${key}</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    <%
-        breakat = genindexcounts[i] // 2
-        numcols = 1
-        numitems = 0
-    %>
-% for entryname, (links, subitems) in entries:
-
-<dt>
-    % if links:
-        <a href="${links[0][1]}">${entryname|h}</a>
-        % for unknown, link in links[1:]:
-            , <a href="${link}">[${i}]</a>
-        % endfor
-    % else:
-        ${entryname|h}
-    % endif
-</dt>
-
-    % if subitems:
-    <dd><dl>
-      % for subentryname, subentrylinks in subitems:
-      <dt><a href="${subentrylinks[0][1]}">${subentryname|h}</a>
-              % for j, (unknown, link) in enumerate(subentrylinks[1:]):
-                  <a href="${link}">[${j}]</a>
-              % endfor
-      </dt>
-      % endfor
-    </dl></dd>
-    % endif
-
-  <%
-    numitems = numitems + 1 + len(subitems)
-  %>
-  % if numcols <2 and numitems > breakat:
-     <%
-        numcols = numcols + 1
-     %>
-        </dl></td><td width="33%" valign="top"><dl>
-  % endif
-
-% endfor
-<dt></dt></dl>
-</td></tr></table>
-% endfor
-
-<%def name="sidebarrel()">
-% if split_index:
-   <h4>${_('Index')}</h4>
-   <p>
-   % for i, (key, dummy) in enumerate(genindexentries):
-       ${i > 0 and '| ' or ''}
-       <a href="${pathto('genindex-' + key)}"><strong>${key}</strong></a>
-   % endfor
-   </p>
-
-   <p><a href="${pathto('genindex-all')}"><strong>${_('Full index on one page')}</strong></a></p>
-% endif
-   ${parent.sidebarrel()}
-</%def>
diff --git a/lib/mako-0.7.2/doc/build/templates/layout.mako b/lib/mako-0.7.2/doc/build/templates/layout.mako
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/templates/layout.mako
+++ /dev/null
@@ -1,199 +0,0 @@
-## coding: utf-8
-<%!
-    local_script_files = []
-%>
-<%doc>
-    Structural elements are all prefixed with "docs-"
-    to prevent conflicts when the structure is integrated into the 
-    main site.
-    
-    docs-container ->
-        docs-header ->
-            docs-search
-            docs-version-header
-        docs-top-navigation
-            docs-top-page-control
-            docs-navigation-banner
-        docs-body-container ->
-            docs-sidebar
-            docs-body
-        docs-bottom-navigation
-            docs-copyright
-</%doc>
-
-<%inherit file="base.mako"/>
-
-<%
-withsidebar = bool(toc) and current_page_name != 'index'
-%>
-
-<%block name="head_title">
-    % if current_page_name != 'index':
-    ${capture(self.show_title) | util.striptags} — 
-    % endif
-    ${docstitle|h}
-</%block>
-
-
-<div id="docs-container">
-
-<%block name="headers">
-    <link rel="stylesheet" href="${pathto('_static/pygments.css', 1)}" type="text/css" />
-    <link rel="stylesheet" href="${pathto('_static/docs.css', 1)}" type="text/css" />
-
-    <script type="text/javascript">
-      var DOCUMENTATION_OPTIONS = {
-          URL_ROOT:    '${pathto("", 1)}',
-          VERSION:     '${release|h}',
-          COLLAPSE_MODINDEX: false,
-          FILE_SUFFIX: '${file_suffix}'
-      };
-    </script>
-    % for scriptfile in script_files + self.attr.local_script_files:
-        <script type="text/javascript" src="${pathto(scriptfile, 1)}"></script>
-    % endfor
-    % if hasdoc('about'):
-        <link rel="author" title="${_('About these documents')}" href="${pathto('about')}" />
-    % endif
-    <link rel="index" title="${_('Index')}" href="${pathto('genindex')}" />
-    <link rel="search" title="${_('Search')}" href="${pathto('search')}" />
-    % if hasdoc('copyright'):
-        <link rel="copyright" title="${_('Copyright')}" href="${pathto('copyright')}" />
-    % endif
-    <link rel="top" title="${docstitle|h}" href="${pathto('index')}" />
-    % if parents:
-        <link rel="up" title="${parents[-1]['title']|util.striptags}" href="${parents[-1]['link']|h}" />
-    % endif
-    % if nexttopic:
-        <link rel="next" title="${nexttopic['title']|util.striptags}" href="${nexttopic['link']|h}" />
-    % endif
-    % if prevtopic:
-        <link rel="prev" title="${prevtopic['title']|util.striptags}" href="${prevtopic['link']|h}" />
-    % endif
-</%block>
-
-<div id="docs-header">
-    <h1>${docstitle|h}</h1>
-
-    <div id="docs-search">
-    Search:
-    <form class="search" action="${pathto('search')}" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="${_('Search')}" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </div>
-
-    <div id="docs-version-header">
-        Release: <span class="version-num">${release}</span>
-
-    </div>
-
-</div>
-
-<div id="docs-top-navigation">
-    <div id="docs-top-page-control" class="docs-navigation-links">
-        <ul>
-        % if prevtopic:
-            <li>Prev:
-            <a href="${prevtopic['link']|h}" title="${_('previous chapter')}">${prevtopic['title']}</a>
-            </li>
-        % endif
-        % if nexttopic:
-            <li>Next:
-            <a href="${nexttopic['link']|h}" title="${_('next chapter')}">${nexttopic['title']}</a>
-            </li>
-        % endif
-
-        <li>
-            <a href="${pathto('index')}">Table of Contents</a> |
-            <a href="${pathto('genindex')}">Index</a>
-            % if sourcename:
-            | <a href="${pathto('_sources/' + sourcename, True)|h}">${_('view source')}
-            % endif
-        </li>
-        </ul>
-    </div>
-
-    <div id="docs-navigation-banner">
-        <a href="${pathto('index')}">${docstitle|h}</a>
-        % if parents:
-            % for parent in parents:
-                » <a href="${parent['link']|h}" title="${parent['title']}">${parent['title']}</a>
-            % endfor
-        % endif
-        % if current_page_name != 'index':
-        » ${self.show_title()} 
-        % endif
-
-        <h2>
-            <%block name="show_title">
-                ${title}
-            </%block>
-        </h2>
-    </div>
-
-</div>
-
-<div id="docs-body-container">
-
-% if withsidebar:
-    <div id="docs-sidebar">
-    <h3><a href="${pathto('index')}">Table of Contents</a></h3>
-    ${toc}
-
-    % if prevtopic:
-    <h4>Previous Topic</h4>
-    <p>
-    <a href="${prevtopic['link']|h}" title="${_('previous chapter')}">${prevtopic['title']}</a>
-    </p>
-    % endif
-    % if nexttopic:
-    <h4>Next Topic</h4>
-    <p>
-    <a href="${nexttopic['link']|h}" title="${_('next chapter')}">${nexttopic['title']}</a>
-    </p>
-    % endif
-
-    <h4>Quick Search</h4>
-    <p>
-    <form class="search" action="${pathto('search')}" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="${_('Search')}" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </p>
-
-    </div>
-% endif
-
-    <div id="docs-body" class="${'withsidebar' if withsidebar else ''}" >
-        ${next.body()}
-    </div>
-
-</div>
-
-<div id="docs-bottom-navigation" class="docs-navigation-links">
-    % if prevtopic:
-        Previous:
-        <a href="${prevtopic['link']|h}" title="${_('previous chapter')}">${prevtopic['title']}</a>
-    % endif
-    % if nexttopic:
-        Next:
-        <a href="${nexttopic['link']|h}" title="${_('next chapter')}">${nexttopic['title']}</a>
-    % endif
-
-    <div id="docs-copyright">
-    % if hasdoc('copyright'):
-        © <a href="${pathto('copyright')}">Copyright</a> ${copyright|h}.
-    % else:
-        © Copyright ${copyright|h}.
-    % endif
-    % if show_sphinx:
-        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> ${sphinx_version|h} 
-        with Mako templates.
-    % endif
-    </div>
-</div>
-
-</div>
diff --git a/lib/mako-0.7.2/doc/build/templates/page.mako b/lib/mako-0.7.2/doc/build/templates/page.mako
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/templates/page.mako
+++ /dev/null
@@ -1,2 +0,0 @@
-<%inherit file="${context['layout']}"/>
-${body| util.strip_toplevel_anchors}
\ No newline at end of file
diff --git a/lib/mako-0.7.2/doc/build/templates/rtd_layout.mako b/lib/mako-0.7.2/doc/build/templates/rtd_layout.mako
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/templates/rtd_layout.mako
+++ /dev/null
@@ -1,174 +0,0 @@
-<!-- readthedocs add-in template, ported from their jinja source -->
-
-<%inherit file="/layout.mako"/>
-
-<%
-    newscript = []
-    # strip out script files that RTD wants to provide
-    for script in script_files:
-        for token in ("jquery.js", "underscore.js", "doctools.js"):
-            if token in script:
-                break
-        else:
-            newscript.append(script)
-    script_files[:] = newscript
-%>
-
-<%block name="headers">
-    ${parent.headers()}
-<!-- RTD <head> -->
-<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
-<script type="text/javascript" src="${MEDIA_URL}javascript/underscore.js"></script>
-<script type="text/javascript" src="${MEDIA_URL}javascript/doctools.js"></script>
-<script type="text/javascript" src="${MEDIA_URL}javascript/searchtools.js"></script>
-##{% if using_theme %}
-##  <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
-##{% endif %}
-  <script type="text/javascript">
-    var doc_version = "${current_version}";
-    var doc_slug = "${slug}";
-  </script>
-  <script type="text/javascript" src="${MEDIA_URL}javascript/rtd.js"></script>
-<!-- end RTD <head> -->
-</%block>
-
-${next.body()}
-
-<%block name="footer">
-    ${parent.footer()}
- <!-- End original user content -->
-## Keep this here, so that the RTD logo doesn't stomp on the bottom of the theme.
-<br>
-<br>
-<br>
-
-<style type="text/css">
-  .badge {
-    position: fixed;
-    display: block;
-    bottom: 5px;
-    height: 40px;
-    text-indent: -9999em;
-    border-radius: 3px;
-    -moz-border-radius: 3px;
-    -webkit-border-radius: 3px;
-    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
-    -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
-    -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
-  }
-  #version_menu {
-    position: fixed;
-    display: none;
-    bottom: 11px;
-    right: 166px;
-    list-style-type: none;
-    margin: 0;
-  }
-  .footer_popout:hover #version_menu {
-    display: block;
-  }
-  #version_menu li {
-    display: block;
-    float: right;
-  }
-  #version_menu li a {
-    display: block;
-    padding: 6px 10px 4px 10px;
-    margin: 7px 7px 0 0;
-    font-weight: bold;
-    font-size: 14px;
-    height: 20px;
-    line-height: 17px;
-    text-decoration: none;
-    color: #fff;
-    background: #8ca1af url(../images/gradient-light.png) bottom left repeat-x;
-    border-radius: 3px;
-    -moz-border-radius: 3px;
-    -webkit-border-radius: 3px;
-    box-shadow: 0 1px 1px #465158;
-    -moz-box-shadow: 0 1px 1px #465158;
-    -webkit-box-shadow: 0 1px 1px #465158;
-    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
-  }
-  #version_menu li a:hover {
-    text-decoration: none;
-    background-color: #697983;
-    box-shadow: 0 1px 0px #465158;
-    -moz-box-shadow: 0 1px 0px #465158;
-    -webkit-box-shadow: 0 1px 0px #465158;
-  }
-  .badge.rtd {
-    background: #257597 url(http://media.readthedocs.org/images/badge-rtd.png) top left no-repeat;
-    border: 1px solid #282E32;
-    width: 160px;
-    right: 5px;
-  }
-  .badge.revsys { background: #465158 url(http://media.readthedocs.org/images/badge-revsys.png) top left no-repeat;
-    border: 1px solid #1C5871;
-    width: 290px;
-    right: 173px;
-  }
-  .badge.revsys-inline-sponsored {
-    position: inherit;
-    margin-left: auto;
-    margin-right: 175px;
-    margin-bottom: 5px;
-    background: #465158 url(http://media.readthedocs.org/images/badge-revsys.png) top left no-repeat;
-    border: 1px solid #1C5871;
-    width: 290px;
-    right: 173px;
-  }
-  .badge.revsys-inline {
-    position: inherit;
-    margin-left: auto;
-    margin-right: 175px;
-    margin-bottom: 5px;
-    background: #465158 url(http://media.readthedocs.org/images/badge-revsys-sm.png) top left no-repeat;
-    border: 1px solid #1C5871;
-    width: 205px;
-    right: 173px;
-  }
-
-</style>
-<div class="rtd_doc_footer">
-  <div class="footer_popout">
-    <a href="http://readthedocs.org/projects/${slug}/?fromdocs=${slug}" class="badge rtd">Brought to you by Read the Docs</a>
-    <ul id="version_menu">
-      ## note that rtd.js blows this away, probably checks if the links
-      ## are good or something like that (in which case why are they in the 'versions' 
-      ## collection...)
-      % for _slug, url in versions:
-        <li><a href="http://readthedocs.org${url}">${_slug}</a></li>
-      % endfor
-    </ul>
-  </div>
-</div>
-<!-- RTD Analytics Code -->
-<script type="text/javascript">
-  var _gaq = _gaq || [];
-  _gaq.push(['_setAccount', 'UA-17997319-1']);
-  _gaq.push(['_trackPageview']);
-
-  (function() {
-    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-  })();
-</script>
-
-% if analytics_code:
-<!-- User Analytics Code -->
-<script type="text/javascript">
-  var _gaq = _gaq || [];
-  _gaq.push(['_setAccount', '${analytics_code}']);
-  _gaq.push(['_trackPageview']);
-
-  (function() {
-    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-  })();
-</script>
-% endif
-
-</%block>
diff --git a/lib/mako-0.7.2/doc/build/templates/search.mako b/lib/mako-0.7.2/doc/build/templates/search.mako
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/templates/search.mako
+++ /dev/null
@@ -1,25 +0,0 @@
-<%inherit file="${context['layout']}"/>
-
-<%!
-    local_script_files = ['_static/searchtools.js']
-%>
-
-<%block name="show_title" filter="util.striptags">
-    ${_('Search')}
-</%block>
-
-<div id="searchform">
-<h3>Enter Search Terms:</h3>
-<form class="search" action="${pathto('search')}" method="get">
-  <input type="text" name="q" size="18" /> <input type="submit" value="${_('Search')}" />
-  <input type="hidden" name="check_keywords" value="yes" />
-  <input type="hidden" name="area" value="default" />
-</form>
-</div>
-
-<div id="search-results"></div>
-
-<%block name="footer">
-    ${parent.footer()}
-    <script type="text/javascript" src="searchindex.js"></script>
-</%block>
diff --git a/lib/mako-0.7.2/doc/build/unicode.rst b/lib/mako-0.7.2/doc/build/unicode.rst
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/unicode.rst
+++ /dev/null
@@ -1,345 +0,0 @@
-.. _unicode_toplevel:
-
-===================
-The Unicode Chapter
-===================
-
-The Python language supports two ways of representing what we
-know as "strings", i.e. series of characters. In Python 2, the
-two types are ``string`` and ``unicode``, and in Python 3 they are
-``bytes`` and ``string``. A key aspect of the Python 2 ``string`` and
-Python 3 ``bytes`` types are that they contain no information
-regarding what **encoding** the data is stored in. For this
-reason they were commonly referred to as **byte strings** on
-Python 2, and Python 3 makes this name more explicit. The
-origins of this come from Python's background of being developed
-before the Unicode standard was even available, back when
-strings were C-style strings and were just that, a series of
-bytes. Strings that had only values below 128 just happened to
-be **ASCII** strings and were printable on the console, whereas
-strings with values above 128 would produce all kinds of
-graphical characters and bells.
-
-Contrast the "byte-string" type with the "unicode/string" type.
-Objects of this latter type are created whenever you say something like
-``u"hello world"`` (or in Python 3, just ``"hello world"``). In this
-case, Python represents each character in the string internally
-using multiple bytes per character (something similar to
-UTF-16). What's important is that when using the
-``unicode``/``string`` type to store strings, Python knows the
-data's encoding; it's in its own internal format. Whereas when
-using the ``string``/``bytes`` type, it does not.
-
-When Python 2 attempts to treat a byte-string as a string, which
-means it's attempting to compare/parse its characters, to coerce
-it into another encoding, or to decode it to a unicode object,
-it has to guess what the encoding is. In this case, it will
-pretty much always guess the encoding as ``ascii``... and if the
-byte-string contains bytes above value 128, you'll get an error.
-Python 3 eliminates much of this confusion by just raising an
-error unconditionally if a byte-string is used in a
-character-aware context.
-
-There is one operation that Python *can* do with a non-ASCII
-byte-string, and it's a great source of confusion: it can dump the
-byte-string straight out to a stream or a file, with nary a care
-what the encoding is. To Python, this is pretty much like
-dumping any other kind of binary data (like an image) to a
-stream somewhere. In Python 2, it is common to see programs that
-embed all kinds of international characters and encodings into
-plain byte-strings (i.e. using ``"hello world"`` style literals)
-can fly right through their run, sending reams of strings out to
-wherever they are going, and the programmer, seeing the same
-output as was expressed in the input, is now under the illusion
-that his or her program is Unicode-compliant. In fact, their
-program has no unicode awareness whatsoever, and similarly has
-no ability to interact with libraries that *are* unicode aware.
-Python 3 makes this much less likely by defaulting to unicode as
-the storage format for strings.
-
-The "pass through encoded data" scheme is what template
-languages like Cheetah and earlier versions of Myghty do by
-default. Mako as of version 0.2 also supports this mode of
-operation when using Python 2, using the ``disable_unicode=True``
-flag. However, when using Mako in its default mode of
-unicode-aware, it requires explicitness when dealing with
-non-ASCII encodings. Additionally, if you ever need to handle
-unicode strings and other kinds of encoding conversions more
-intelligently, the usage of raw byte-strings quickly becomes a
-nightmare, since you are sending the Python interpreter
-collections of bytes for which it can make no intelligent
-decisions with regards to encoding. In Python 3 Mako only allows
-usage of native, unicode strings.
-
-In normal Mako operation, all parsed template constructs and
-output streams are handled internally as Python ``unicode``
-objects. It's only at the point of :meth:`~.Template.render` that this unicode
-stream may be rendered into whatever the desired output encoding
-is. The implication here is that the template developer must
-:ensure that :ref:`the encoding of all non-ASCII templates is explicit
-<set_template_file_encoding>` (still required in Python 3),
-that :ref:`all non-ASCII-encoded expressions are in one way or another
-converted to unicode <handling_non_ascii_expressions>`
-(not much of a burden in Python 3), and that :ref:`the output stream of the
-template is handled as a unicode stream being encoded to some
-encoding <defining_output_encoding>` (still required in Python 3).
-
-.. _set_template_file_encoding:
-
-Specifying the Encoding of a Template File
-==========================================
-
-This is the most basic encoding-related setting, and it is
-equivalent to Python's "magic encoding comment", as described in
-`pep-0263 <http://www.python.org/dev/peps/pep-0263/>`_. Any
-template that contains non-ASCII characters requires that this
-comment be present so that Mako can decode to unicode (and also
-make usage of Python's AST parsing services). Mako's lexer will
-use this encoding in order to convert the template source into a
-``unicode`` object before continuing its parsing:
-
-.. sourcecode:: mako
-
-    ## -*- coding: utf-8 -*-
-
-    Alors vous imaginez ma surprise, au lever du jour, quand 
-    une drôle de petite voix m’a réveillé. Elle disait:
-     « S’il vous plaît… dessine-moi un mouton! »
-
-For the picky, the regular expression used is derived from that
-of the above mentioned pep:
-
-.. sourcecode:: python
-
-    #.*coding[:=]\s*([-\w.]+).*\n
-
-The lexer will convert to unicode in all cases, so that if any
-characters exist in the template that are outside of the
-specified encoding (or the default of ``ascii``), the error will
-be immediate.
-
-As an alternative, the template encoding can be specified
-programmatically to either :class:`.Template` or :class:`.TemplateLookup` via
-the ``input_encoding`` parameter:
-
-.. sourcecode:: python
-
-    t = TemplateLookup(directories=['./'], input_encoding='utf-8')
-
-The above will assume all located templates specify ``utf-8``
-encoding, unless the template itself contains its own magic
-encoding comment, which takes precedence.
-
-.. _handling_non_ascii_expressions:
-
-Handling Expressions
-====================
-
-The next area that encoding comes into play is in expression
-constructs. By default, Mako's treatment of an expression like
-this:
-
-.. sourcecode:: mako
-
-    ${"hello world"}
-
-looks something like this:
-
-.. sourcecode:: python
-
-    context.write(unicode("hello world"))
-
-In Python 3, it's just:
-
-.. sourcecode:: python
-
-    context.write(str("hello world"))
-
-That is, **the output of all expressions is run through the
-``unicode`` built-in**. This is the default setting, and can be
-modified to expect various encodings. The ``unicode`` step serves
-both the purpose of rendering non-string expressions into
-strings (such as integers or objects which contain ``__str()__``
-methods), and to ensure that the final output stream is
-constructed as a unicode object. The main implication of this is
-that **any raw byte-strings that contain an encoding other than
-ASCII must first be decoded to a Python unicode object**. It
-means you can't say this in Python 2:
-
-.. sourcecode:: mako
-
-    ${"voix m’a réveillé."}  ## error in Python 2!
-
-You must instead say this:
-
-.. sourcecode:: mako
-
-    ${u"voix m’a réveillé."}  ## OK !
-
-Similarly, if you are reading data from a file that is streaming
-bytes, or returning data from some object that is returning a
-Python byte-string containing a non-ASCII encoding, you have to
-explicitly decode to unicode first, such as:
-
-.. sourcecode:: mako
-
-    ${call_my_object().decode('utf-8')}
-
-Note that filehandles acquired by ``open()`` in Python 3 default
-to returning "text", that is the decoding is done for you. See
-Python 3's documentation for the ``open()`` built-in for details on
-this.
-
-If you want a certain encoding applied to *all* expressions,
-override the ``unicode`` builtin with the ``decode`` built-in at the
-:class:`.Template` or :class:`.TemplateLookup` level:
-
-.. sourcecode:: python
-
-    t = Template(templatetext, default_filters=['decode.utf8'])
-
-Note that the built-in ``decode`` object is slower than the
-``unicode`` function, since unlike ``unicode`` it's not a Python
-built-in, and it also checks the type of the incoming data to
-determine if string conversion is needed first.
-
-The ``default_filters`` argument can be used to entirely customize
-the filtering process of expressions. This argument is described
-in :ref:`filtering_default_filters`.
-
-.. _defining_output_encoding:
-
-Defining Output Encoding
-========================
-
-Now that we have a template which produces a pure unicode output
-stream, all the hard work is done. We can take the output and do
-anything with it.
-
-As stated in the :doc:`"Usage" chapter <usage>`, both :class:`.Template` and
-:class:`.TemplateLookup` accept ``output_encoding`` and ``encoding_errors``
-parameters which can be used to encode the output in any Python
-supported codec:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-    from mako.lookup import TemplateLookup
-
-    mylookup = TemplateLookup(directories=['/docs'], output_encoding='utf-8', encoding_errors='replace')
-
-    mytemplate = mylookup.get_template("foo.txt")
-    print mytemplate.render()
-
-:meth:`~.Template.render` will return a ``bytes`` object in Python 3 if an output
-encoding is specified. By default it performs no encoding and
-returns a native string.
-
-:meth:`~.Template.render_unicode` will return the template output as a Python
-``unicode`` object (or ``string`` in Python 3):
-
-.. sourcecode:: python
-
-    print mytemplate.render_unicode()
-
-The above method disgards the output encoding keyword argument;
-you can encode yourself by saying:
-
-.. sourcecode:: python
-
-    print mytemplate.render_unicode().encode('utf-8', 'replace')
-
-Buffer Selection
-----------------
-
-Mako does play some games with the style of buffering used
-internally, to maximize performance. Since the buffer is by far
-the most heavily used object in a render operation, it's
-important!
-
-When calling :meth:`~.Template.render` on a template that does not specify any
-output encoding (i.e. it's ``ascii``), Python's ``cStringIO`` module,
-which cannot handle encoding of non-ASCII ``unicode`` objects
-(even though it can send raw byte-strings through), is used for
-buffering. Otherwise, a custom Mako class called
-``FastEncodingBuffer`` is used, which essentially is a super
-dumbed-down version of ``StringIO`` that gathers all strings into
-a list and uses ``u''.join(elements)`` to produce the final output
--- it's markedly faster than ``StringIO``.
-
-.. _unicode_disabled:
-
-Saying to Heck with It: Disabling the Usage of Unicode Entirely
-===============================================================
-
-Some segments of Mako's userbase choose to make no usage of
-Unicode whatsoever, and instead would prefer the "pass through"
-approach; all string expressions in their templates return
-encoded byte-strings, and they would like these strings to pass
-right through. The only advantage to this approach is that
-templates need not use ``u""`` for literal strings; there's an
-arguable speed improvement as well since raw byte-strings
-generally perform slightly faster than unicode objects in
-Python. For these users, assuming they're sticking with Python
-2, they can hit the ``disable_unicode=True`` flag as so:
-
-.. sourcecode:: python
-
-    # -*- encoding:utf-8 -*-
-    from mako.template import Template
-
-    t = Template("drôle de petite voix m’a réveillé.", disable_unicode=True, input_encoding='utf-8')
-    print t.code
-
-The ``disable_unicode`` mode is strictly a Python 2 thing. It is
-not supported at all in Python 3.
-
-The generated module source code will contain elements like
-these:
-
-.. sourcecode:: python
-
-    # -*- encoding:utf-8 -*-
-    #  ...more generated code ...
-
-    def render_body(context,**pageargs):
-        context.caller_stack.push_frame()
-        try:
-            __M_locals = dict(pageargs=pageargs)
-            # SOURCE LINE 1
-            context.write('dr\xc3\xb4le de petite voix m\xe2\x80\x99a r\xc3\xa9veill\xc3\xa9.')
-            return ''
-        finally:
-            context.caller_stack.pop_frame()
-
-Where above that the string literal used within :meth:`.Context.write`
-is a regular byte-string.
-
-When ``disable_unicode=True`` is turned on, the ``default_filters``
-argument which normally defaults to ``["unicode"]`` now defaults
-to ``["str"]`` instead. Setting ``default_filters`` to the empty list
-``[]`` can remove the overhead of the ``str`` call. Also, in this
-mode you **cannot** safely call :meth:`~.Template.render_unicode` -- you'll get
-unicode/decode errors.
-
-The ``h`` filter (HTML escape) uses a less performant pure Python
-escape function in non-unicode mode. This because
-MarkupSafe only supports Python unicode objects for non-ASCII
-strings.
-
-.. versionchanged:: 0.3.4
-   In prior versions, it used ``cgi.escape()``, which has been replaced
-   with a function that also escapes single quotes.
-
-Rules for using ``disable_unicode=True``
-----------------------------------------
-
-* Don't use this mode unless you really, really want to and you
-  absolutely understand what you're doing.
-* Don't use this option just because you don't want to learn to
-  use Unicode properly; we aren't supporting user issues in this
-  mode of operation. We will however offer generous help for the
-  vast majority of users who stick to the Unicode program.
-* Python 3 is unicode by default, and the flag is not available
-  when running on Python 3.
-
diff --git a/lib/mako-0.7.2/doc/build/usage.rst b/lib/mako-0.7.2/doc/build/usage.rst
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/build/usage.rst
+++ /dev/null
@@ -1,520 +0,0 @@
-.. _usage_toplevel:
-
-=====
-Usage
-=====
-
-Basic Usage
-===========
-
-This section describes the Python API for Mako templates. If you
-are using Mako within a web framework such as Pylons, the work
-of integrating Mako's API is already done for you, in which case
-you can skip to the next section, :ref:`syntax_toplevel`.
-
-The most basic way to create a template and render it is through
-the :class:`.Template` class:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-
-    mytemplate = Template("hello world!")
-    print mytemplate.render()
-
-Above, the text argument to :class:`.Template` is **compiled** into a
-Python module representation. This module contains a function
-called ``render_body()``, which produces the output of the
-template. When ``mytemplate.render()`` is called, Mako sets up a
-runtime environment for the template and calls the
-``render_body()`` function, capturing the output into a buffer and
-returning its string contents.
-
-
-The code inside the ``render_body()`` function has access to a
-namespace of variables. You can specify these variables by
-sending them as additional keyword arguments to the :meth:`~.Template.render`
-method:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-
-    mytemplate = Template("hello, ${name}!")
-    print mytemplate.render(name="jack")
-
-The :meth:`~.Template.render` method calls upon Mako to create a
-:class:`.Context` object, which stores all the variable names accessible
-to the template and also stores a buffer used to capture output.
-You can create this :class:`.Context` yourself and have the template
-render with it, using the :meth:`~.Template.render_context` method:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-    from mako.runtime import Context
-    from StringIO import StringIO
-
-    mytemplate = Template("hello, ${name}!")
-    buf = StringIO()
-    ctx = Context(buf, name="jack")
-    mytemplate.render_context(ctx)
-    print buf.getvalue()
-
-Using File-Based Templates
-==========================
-
-A :class:`.Template` can also load its template source code from a file,
-using the ``filename`` keyword argument:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-
-    mytemplate = Template(filename='/docs/mytmpl.txt')
-    print mytemplate.render()
-
-For improved performance, a :class:`.Template` which is loaded from a
-file can also cache the source code to its generated module on
-the filesystem as a regular Python module file (i.e. a ``.py``
-file). To do this, just add the ``module_directory`` argument to
-the template:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-
-    mytemplate = Template(filename='/docs/mytmpl.txt', module_directory='/tmp/mako_modules')
-    print mytemplate.render()
-
-When the above code is rendered, a file
-``/tmp/mako_modules/docs/mytmpl.txt.py`` is created containing the
-source code for the module. The next time a :class:`.Template` with the
-same arguments is created, this module file will be
-automatically re-used.
-
-.. _usage_templatelookup:
-
-Using ``TemplateLookup``
-========================
-
-All of the examples thus far have dealt with the usage of a
-single :class:`.Template` object. If the code within those templates
-tries to locate another template resource, it will need some way
-to find them, using simple URI strings. For this need, the
-resolution of other templates from within a template is
-accomplished by the :class:`.TemplateLookup` class. This class is
-constructed given a list of directories in which to search for
-templates, as well as keyword arguments that will be passed to
-the :class:`.Template` objects it creates:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-    from mako.lookup import TemplateLookup
-
-    mylookup = TemplateLookup(directories=['/docs'])
-    mytemplate = Template("""<%include file="header.txt"/> hello world!""", lookup=mylookup)
-
-Above, we created a textual template which includes the file
-``"header.txt"``. In order for it to have somewhere to look for
-``"header.txt"``, we passed a :class:`.TemplateLookup` object to it, which
-will search in the directory ``/docs`` for the file ``"header.txt"``.
-
-Usually, an application will store most or all of its templates
-as text files on the filesystem. So far, all of our examples
-have been a little bit contrived in order to illustrate the
-basic concepts. But a real application would get most or all of
-its templates directly from the :class:`.TemplateLookup`, using the
-aptly named :meth:`~.TemplateLookup.get_template` method, which accepts the URI of the
-desired template:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-    from mako.lookup import TemplateLookup
-
-    mylookup = TemplateLookup(directories=['/docs'], module_directory='/tmp/mako_modules')
-
-    def serve_template(templatename, **kwargs):
-        mytemplate = mylookup.get_template(templatename)
-        print mytemplate.render(**kwargs)
-
-In the example above, we create a :class:`.TemplateLookup` which will
-look for templates in the ``/docs`` directory, and will store
-generated module files in the ``/tmp/mako_modules`` directory. The
-lookup locates templates by appending the given URI to each of
-its search directories; so if you gave it a URI of
-``/etc/beans/info.txt``, it would search for the file
-``/docs/etc/beans/info.txt``, else raise a :class:`.TopLevelNotFound`
-exception, which is a custom Mako exception.
-
-When the lookup locates templates, it will also assign a ``uri``
-property to the :class:`.Template` which is the URI passed to the
-:meth:`~.TemplateLookup.get_template()` call. :class:`.Template` uses this URI to calculate the
-name of its module file. So in the above example, a
-``templatename`` argument of ``/etc/beans/info.txt`` will create a
-module file ``/tmp/mako_modules/etc/beans/info.txt.py``.
-
-Setting the Collection Size
----------------------------
-
-The :class:`.TemplateLookup` also serves the important need of caching a
-fixed set of templates in memory at a given time, so that
-successive URI lookups do not result in full template
-compilations and/or module reloads on each request. By default,
-the :class:`.TemplateLookup` size is unbounded. You can specify a fixed
-size using the ``collection_size`` argument:
-
-.. sourcecode:: python
-
-    mylookup = TemplateLookup(directories=['/docs'],
-                    module_directory='/tmp/mako_modules', collection_size=500)
-
-The above lookup will continue to load templates into memory
-until it reaches a count of around 500. At that point, it will
-clean out a certain percentage of templates using a least
-recently used scheme.
-
-Setting Filesystem Checks
--------------------------
-
-Another important flag on :class:`.TemplateLookup` is
-``filesystem_checks``. This defaults to ``True``, and says that each
-time a template is returned by the :meth:`~.TemplateLookup.get_template()` method, the
-revision time of the original template file is checked against
-the last time the template was loaded, and if the file is newer
-will reload its contents and recompile the template. On a
-production system, setting ``filesystem_checks`` to ``False`` can
-afford a small to moderate performance increase (depending on
-the type of filesystem used).
-
-.. _usage_unicode:
-
-Using Unicode and Encoding
-==========================
-
-Both :class:`.Template` and :class:`.TemplateLookup` accept ``output_encoding``
-and ``encoding_errors`` parameters which can be used to encode the
-output in any Python supported codec:
-
-.. sourcecode:: python
-
-    from mako.template import Template
-    from mako.lookup import TemplateLookup
-
-    mylookup = TemplateLookup(directories=['/docs'], output_encoding='utf-8', encoding_errors='replace')
-
-    mytemplate = mylookup.get_template("foo.txt")
-    print mytemplate.render()
-
-When using Python 3, the :meth:`~.Template.render` method will return a ``bytes``
-object, **if** ``output_encoding`` is set. Otherwise it returns a
-``string``.
-
-Additionally, the :meth:`~.Template.render_unicode()` method exists which will
-return the template output as a Python ``unicode`` object, or in
-Python 3 a ``string``:
-
-.. sourcecode:: python
-
-    print mytemplate.render_unicode()
-
-The above method disregards the output encoding keyword
-argument; you can encode yourself by saying:
-
-.. sourcecode:: python
-
-    print mytemplate.render_unicode().encode('utf-8', 'replace')
-
-Note that Mako's ability to return data in any encoding and/or
-``unicode`` implies that the underlying output stream of the
-template is a Python unicode object. This behavior is described
-fully in :ref:`unicode_toplevel`.
-
-.. _handling_exceptions:
-
-Handling Exceptions
-===================
-
-Template exceptions can occur in two distinct places. One is
-when you **lookup, parse and compile** the template, the other
-is when you **run** the template. Within the running of a
-template, exceptions are thrown normally from whatever Python
-code originated the issue. Mako has its own set of exception
-classes which mostly apply to the lookup and lexer/compiler
-stages of template construction. Mako provides some library
-routines that can be used to help provide Mako-specific
-information about any exception's stack trace, as well as
-formatting the exception within textual or HTML format. In all
-cases, the main value of these handlers is that of converting
-Python filenames, line numbers, and code samples into Mako
-template filenames, line numbers, and code samples. All lines
-within a stack trace which correspond to a Mako template module
-will be converted to be against the originating template file.
-
-To format exception traces, the :func:`.text_error_template` and
-:func:`.html_error_template` functions are provided. They make usage of
-``sys.exc_info()`` to get at the most recently thrown exception.
-Usage of these handlers usually looks like:
-
-.. sourcecode:: python
-
-    from mako import exceptions
-
-    try:
-        template = lookup.get_template(uri)
-        print template.render()
-    except:
-        print exceptions.text_error_template().render()
-
-Or for the HTML render function:
-
-.. sourcecode:: python
-
-    from mako import exceptions
-
-    try:
-        template = lookup.get_template(uri)
-        print template.render()
-    except:
-        print exceptions.html_error_template().render()
-
-The :func:`.html_error_template` template accepts two options:
-specifying ``full=False`` causes only a section of an HTML
-document to be rendered. Specifying ``css=False`` will disable the
-default stylesheet from being rendered.
-
-E.g.:
-
-.. sourcecode:: python
-
-    print exceptions.html_error_template().render(full=False)
-
-The HTML render function is also available built-in to
-:class:`.Template` using the ``format_exceptions`` flag. In this case, any
-exceptions raised within the **render** stage of the template
-will result in the output being substituted with the output of
-:func:`.html_error_template`:
-
-.. sourcecode:: python
-
-    template = Template(filename="/foo/bar", format_exceptions=True)
-    print template.render()
-
-Note that the compile stage of the above template occurs when
-you construct the :class:`.Template` itself, and no output stream is
-defined. Therefore exceptions which occur within the
-lookup/parse/compile stage will not be handled and will
-propagate normally. While the pre-render traceback usually will
-not include any Mako-specific lines anyway, it will mean that
-exceptions which occur previous to rendering and those which
-occur within rendering will be handled differently... so the
-``try``/``except`` patterns described previously are probably of more
-general use.
-
-The underlying object used by the error template functions is
-the :class:`.RichTraceback` object. This object can also be used
-directly to provide custom error views. Here's an example usage
-which describes its general API:
-
-.. sourcecode:: python
-
-    from mako.exceptions import RichTraceback
-
-    try:
-        template = lookup.get_template(uri)
-        print template.render()
-    except:
-        traceback = RichTraceback()
-        for (filename, lineno, function, line) in traceback.traceback:
-            print "File %s, line %s, in %s" % (filename, lineno, function)
-            print line, "\n"
-        print "%s: %s" % (str(traceback.error.__class__.__name__), traceback.error)
-
-Common Framework Integrations
-=============================
-
-The Mako distribution includes a little bit of helper code for
-the purpose of using Mako in some popular web framework
-scenarios. This is a brief description of what's included.
-
-WSGI
-----
-
-A sample WSGI application is included in the distribution in the
-file ``examples/wsgi/run_wsgi.py``. This runner is set up to pull
-files from a `templates` as well as an `htdocs` directory and
-includes a rudimental two-file layout. The WSGI runner acts as a
-fully functional standalone web server, using ``wsgiutils`` to run
-itself, and propagates GET and POST arguments from the request
-into the :class:`.Context`, can serve images, CSS files and other kinds
-of files, and also displays errors using Mako's included
-exception-handling utilities.
-
-Pygments
---------
-
-A `Pygments <http://pygments.pocoo.org>`_-compatible syntax
-highlighting module is included under :mod:`mako.ext.pygmentplugin`.
-This module is used in the generation of Mako documentation and
-also contains various `setuptools` entry points under the heading
-``pygments.lexers``, including ``mako``, ``html+mako``, ``xml+mako``
-(see the ``setup.py`` file for all the entry points).
-
-Babel
------
-
-Mako provides support for extracting `gettext` messages from
-templates via a `Babel`_ extractor
-entry point under ``mako.ext.babelplugin``.
-
-`Gettext` messages are extracted from all Python code sections,
-including those of control lines and expressions embedded
-in tags.
-
-`Translator
-comments <http://babel.edgewall.org/wiki/Documentation/messages.html#comments-tags-and-translator-comments-explanation>`_
-may also be extracted from Mako templates when a comment tag is
-specified to `Babel`_ (such as with
-the ``-c`` option).
-
-For example, a project ``"myproj"`` contains the following Mako
-template at ``myproj/myproj/templates/name.html``:
-
-.. sourcecode:: mako
-
-    <div id="name">
-      Name:
-      ## TRANSLATORS: This is a proper name. See the gettext
-      ## manual, section Names.
-      ${_('Francois Pinard')}
-    </div>
-
-To extract gettext messages from this template the project needs
-a Mako section in its `Babel Extraction Method Mapping
-file <http://babel.edgewall.org/wiki/Documentation/messages.html#extraction-method-mapping-and-configuration>`_
-(typically located at ``myproj/babel.cfg``):
-
-.. sourcecode:: cfg
-
-    # Extraction from Python source files
-
-    [python: myproj/**.py]
-
-    # Extraction from Mako templates
-
-    [mako: myproj/templates/**.html]
-    input_encoding = utf-8
-
-The Mako extractor supports an optional ``input_encoding``
-parameter specifying the encoding of the templates (identical to
-:class:`.Template`/:class:`.TemplateLookup`'s ``input_encoding`` parameter).
-
-Invoking `Babel`_'s extractor at the
-command line in the project's root directory:
-
-.. sourcecode:: sh
-
-    myproj$ pybabel extract -F babel.cfg -c "TRANSLATORS:" .
-
-will output a `gettext` catalog to `stdout` including the following:
-
-.. sourcecode:: pot
-
-    #. TRANSLATORS: This is a proper name. See the gettext
-    #. manual, section Names.
-    #: myproj/templates/name.html:5
-    msgid "Francois Pinard"
-    msgstr ""
-
-This is only a basic example:
-`Babel`_ can be invoked from ``setup.py``
-and its command line options specified in the accompanying
-``setup.cfg`` via `Babel Distutils/Setuptools
-Integration <http://babel.edgewall.org/wiki/Documentation/setup.html>`_.
-
-Comments must immediately precede a `gettext` message to be
-extracted. In the following case the ``TRANSLATORS:`` comment would
-not have been extracted:
-
-.. sourcecode:: mako
-
-    <div id="name">
-      ## TRANSLATORS: This is a proper name. See the gettext
-      ## manual, section Names.
-      Name: ${_('Francois Pinard')}
-    </div>
-
-See the `Babel User
-Guide <http://babel.edgewall.org/wiki/Documentation/index.html>`_
-for more information.
-
-.. _babel: http://babel.edgewall.org/
-
-
-API Reference
-=============
-
-.. autoclass:: mako.template.Template
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.template.DefTemplate
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.lookup.TemplateCollection
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.lookup.TemplateLookup
-    :show-inheritance:
-    :members:
-
-.. autoclass:: mako.exceptions.RichTraceback
-    :show-inheritance:
-
-    .. py:attribute:: error
-
-       the exception instance.
-
-    .. py:attribute:: message
-
-       the exception error message as unicode.
-
-    .. py:attribute:: source
-
-       source code of the file where the error occurred.
-       If the error occurred within a compiled template,
-       this is the template source.
-
-    .. py:attribute:: lineno
-
-       line number where the error occurred.  If the error
-       occurred within a compiled template, the line number
-       is adjusted to that of the template source.
-
-    .. py:attribute:: records
-
-       a list of 8-tuples containing the original
-       python traceback elements, plus the
-       filename, line number, source line, and full template source
-       for the traceline mapped back to its originating source
-       template, if any for that traceline (else the fields are ``None``).
-
-    .. py:attribute:: reverse_records
-
-       the list of records in reverse
-       traceback -- a list of 4-tuples, in the same format as a regular
-       python traceback, with template-corresponding
-       traceback records replacing the originals.
-
-    .. py:attribute:: reverse_traceback
-
-       the traceback list in reverse.
-
-.. autofunction:: mako.exceptions.html_error_template
-
-.. autofunction:: mako.exceptions.text_error_template
-
diff --git a/lib/mako-0.7.2/doc/caching.html b/lib/mako-0.7.2/doc/caching.html
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/caching.html
+++ /dev/null
@@ -1,777 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
-<head>
-<title>
-    
-                Caching
-             — 
-    Mako 0.7.2 Documentation
-</title>
-
-    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
-
-    <script type="text/javascript">
-      var DOCUMENTATION_OPTIONS = {
-          URL_ROOT:    '#',
-          VERSION:     '0.7.2',
-          COLLAPSE_MODINDEX: false,
-          FILE_SUFFIX: '.html'
-      };
-    </script>
-        <script type="text/javascript" src="_static/jquery.js"></script>
-        <script type="text/javascript" src="_static/underscore.js"></script>
-        <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
-    <link rel="top" title="Mako 0.7.2 Documentation" href="index.html" />
-        <link rel="prev" title="The Unicode Chapter" href="unicode.html" />
-
-<link rel="stylesheet" href="_static/site.css"></link>
-
-
-</head>
-<body>
-    <div id="wrap">
-    <div class="rightbar">
-    <div class="slogan">
-    Hyperfast and lightweight templating for the Python platform.
-    </div>
-
-
-    </div>
-
-    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
-
-    <hr/>
-
-    
-
-
-
-
-
-
-
-
-
-<div id="docs-container">
-
-
-
-<div id="docs-header">
-    <h1>Mako 0.7.2 Documentation</h1>
-
-    <div id="docs-search">
-    Search:
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </div>
-
-    <div id="docs-version-header">
-        Release: <span class="version-num">0.7.2</span>
-
-    </div>
-
-</div>
-
-<div id="docs-top-navigation">
-    <div id="docs-top-page-control" class="docs-navigation-links">
-        <ul>
-            <li>Prev:
-            <a href="unicode.html" title="previous chapter">The Unicode Chapter</a>
-            </li>
-
-        <li>
-            <a href="index.html">Table of Contents</a> |
-            <a href="genindex.html">Index</a>
-            | <a href="_sources/caching.txt">view source
-        </li>
-        </ul>
-    </div>
-
-    <div id="docs-navigation-banner">
-        <a href="index.html">Mako 0.7.2 Documentation</a>
-        » 
-                Caching
-             
-
-        <h2>
-            
-                Caching
-            
-        </h2>
-    </div>
-
-</div>
-
-<div id="docs-body-container">
-
-    <div id="docs-sidebar">
-    <h3><a href="index.html">Table of Contents</a></h3>
-    <ul>
-<li><a class="reference internal" href="#">Caching</a><ul>
-<li><a class="reference internal" href="#cache-arguments">Cache Arguments</a><ul>
-<li><a class="reference internal" href="#backend-specific-cache-arguments">Backend-Specific Cache Arguments</a></li>
-<li><a class="reference internal" href="#using-the-beaker-cache-backend">Using the Beaker Cache Backend</a></li>
-<li><a class="reference internal" href="#using-the-dogpile-cache-backend">Using the dogpile.cache Backend</a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#programmatic-cache-access">Programmatic Cache Access</a></li>
-<li><a class="reference internal" href="#cache-plugins">Cache Plugins</a><ul>
-<li><a class="reference internal" href="#guidelines-for-writing-cache-plugins">Guidelines for Writing Cache Plugins</a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#api-reference">API Reference</a></li>
-</ul>
-</li>
-</ul>
-
-
-    <h4>Previous Topic</h4>
-    <p>
-    <a href="unicode.html" title="previous chapter">The Unicode Chapter</a>
-    </p>
-
-    <h4>Quick Search</h4>
-    <p>
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </p>
-
-    </div>
-
-    <div id="docs-body" class="withsidebar" >
-        
-<div class="section" id="caching">
-<span id="caching-toplevel"></span><h1>Caching<a class="headerlink" href="#caching" title="Permalink to this headline">¶</a></h1>
-<p>Any template or component can be cached using the <tt class="docutils literal"><span class="pre">cache</span></tt>
-argument to the <tt class="docutils literal"><span class="pre"><%page></span></tt>, <tt class="docutils literal"><span class="pre"><%def></span></tt> or <tt class="docutils literal"><span class="pre"><%block></span></tt> directives:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">cached=</span><span class="s">"True"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="x">template text</span>
-</pre></div>
-</div>
-<p>The above template, after being executed the first time, will
-store its content within a cache that by default is scoped
-within memory. Subsequent calls to the template’s <a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a>
-method will return content directly from the cache. When the
-<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object itself falls out of scope, its corresponding
-cache is garbage collected along with the template.</p>
-<p>By default, caching requires that the <a class="reference external" href="http://beaker.readthedocs.org/">Beaker</a> package be installed on the
-system, however the mechanism of caching can be customized to use
-any third party or user defined system – see <a class="reference internal" href="#cache-plugins"><em>Cache Plugins</em></a>.</p>
-<p>In addition to being available on the <tt class="docutils literal"><span class="pre"><%page></span></tt> tag, the caching flag and all
-its options can be used with the <tt class="docutils literal"><span class="pre"><%def></span></tt> tag as well:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"mycomp"</span> <span class="na">cached=</span><span class="s">"True"</span> <span class="na">cache_timeout=</span><span class="s">"60"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    other text</span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>... and equivalently with the <tt class="docutils literal"><span class="pre"><%block></span></tt> tag, anonymous or named:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">block</span> <span class="na">cached=</span><span class="s">"True"</span> <span class="na">cache_timeout=</span><span class="s">"60"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    other text</span>
-<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<div class="section" id="cache-arguments">
-<h2>Cache Arguments<a class="headerlink" href="#cache-arguments" title="Permalink to this headline">¶</a></h2>
-<p>Mako has two cache arguments available on tags that are
-available in all cases.   The rest of the arguments
-available are specific to a backend.</p>
-<p>The two generic tags arguments are:</p>
-<ul>
-<li><p class="first"><tt class="docutils literal"><span class="pre">cached="True"</span></tt> - enable caching for this <tt class="docutils literal"><span class="pre"><%page></span></tt>,
-<tt class="docutils literal"><span class="pre"><%def></span></tt>, or <tt class="docutils literal"><span class="pre"><%block></span></tt>.</p>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">cache_key</span></tt> - the “key” used to uniquely identify this content
-in the cache.   Usually, this key is chosen automatically
-based on the name of the rendering callable (i.e. <tt class="docutils literal"><span class="pre">body</span></tt>
-when used in <tt class="docutils literal"><span class="pre"><%page></span></tt>, the name of the def when using <tt class="docutils literal"><span class="pre"><%def></span></tt>,
-the explicit or internally-generated name when using <tt class="docutils literal"><span class="pre"><%block></span></tt>).
-Using the <tt class="docutils literal"><span class="pre">cache_key</span></tt> parameter, the key can be overridden
-using a fixed or programmatically generated value.</p>
-<p>For example, here’s a page
-that caches any page which inherits from it, based on the
-filename of the calling template:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">cached=</span><span class="s">"True"</span> <span class="na">cache_key=</span><span class="s">"${self.filename}"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="cp">${</span><span class="nb">next</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span>
-
-<span class="cp">## rest of template</span><span class="x"></span>
-</pre></div>
-</div>
-</li>
-</ul>
-<p>On a <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> or <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>, the
-caching can be configured using these arguments:</p>
-<ul>
-<li><p class="first"><tt class="docutils literal"><span class="pre">cache_enabled</span></tt> - Setting this
-to <tt class="docutils literal"><span class="pre">False</span></tt> will disable all caching functionality
-when the template renders.  Defaults to <tt class="docutils literal"><span class="pre">True</span></tt>.
-e.g.:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">lookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span>
-                <span class="n">directories</span><span class="o">=</span><span class="s">'/path/to/templates'</span><span class="p">,</span>
-                <span class="n">cache_enabled</span> <span class="o">=</span> <span class="bp">False</span>
-                <span class="p">)</span>
-</pre></div>
-</div>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">cache_impl</span></tt> - The string name of the cache backend
-to use.   This defaults to <tt class="docutils literal"><span class="pre">'beaker'</span></tt>, which has historically
-been the only cache backend supported by Mako.</p>
-<p class="versionadded">
-<span class="versionmodified">New in version 0.6.0.</span></p>
-<p>For example, here’s how to use the upcoming
-<a class="reference external" href="http://dogpilecache.readthedocs.org">dogpile.cache</a>
-backend:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">lookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span>
-                <span class="n">directories</span><span class="o">=</span><span class="s">'/path/to/templates'</span><span class="p">,</span>
-                <span class="n">cache_impl</span> <span class="o">=</span> <span class="s">'dogpile.cache'</span><span class="p">,</span>
-                <span class="n">cache_args</span> <span class="o">=</span> <span class="p">{</span><span class="s">'regions'</span><span class="p">:</span><span class="n">my_dogpile_regions</span><span class="p">}</span>
-                <span class="p">)</span>
-</pre></div>
-</div>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">cache_args</span></tt> - A dictionary of cache parameters that
-will be consumed by the cache backend.   See
-<a class="reference internal" href="#beaker-backend"><em>Using the Beaker Cache Backend</em></a> for examples.</p>
-<p class="versionadded">
-<span class="versionmodified">New in version 0.6.0.</span></p>
-</li>
-</ul>
-<div class="section" id="backend-specific-cache-arguments">
-<h3>Backend-Specific Cache Arguments<a class="headerlink" href="#backend-specific-cache-arguments" title="Permalink to this headline">¶</a></h3>
-<p>The <tt class="docutils literal"><span class="pre"><%page></span></tt>, <tt class="docutils literal"><span class="pre"><%def></span></tt>, and <tt class="docutils literal"><span class="pre"><%block></span></tt> tags
-accept any named argument that starts with the prefix <tt class="docutils literal"><span class="pre">"cache_"</span></tt>.
-Those arguments are then packaged up and passed along to the
-underlying caching implementation, minus the <tt class="docutils literal"><span class="pre">"cache_"</span></tt> prefix.</p>
-<p>The actual arguments understood are determined by the backend.</p>
-<ul class="simple">
-<li><a class="reference internal" href="#beaker-backend"><em>Using the Beaker Cache Backend</em></a> - Includes arguments understood by
-Beaker.</li>
-<li><a class="reference internal" href="#dogpile-cache-backend"><em>Using the dogpile.cache Backend</em></a> - Includes arguments understood by
-dogpile.cache.</li>
-</ul>
-</div>
-<div class="section" id="using-the-beaker-cache-backend">
-<span id="beaker-backend"></span><h3>Using the Beaker Cache Backend<a class="headerlink" href="#using-the-beaker-cache-backend" title="Permalink to this headline">¶</a></h3>
-<p>When using Beaker, new implementations will want to make usage
-of <strong>cache regions</strong> so that cache configurations can be maintained
-externally to templates.  These configurations live under
-named “regions” that can be referred to within templates themselves.</p>
-<p class="versionadded">
-<span class="versionmodified">New in version 0.6.0: </span>Support for Beaker cache regions.</p>
-<p>For example, suppose we would like two regions.  One is a “short term”
-region that will store content in a memory-based dictionary,
-expiring after 60 seconds.   The other is a Memcached region,
-where values should expire in five minutes.   To configure
-our <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>, first we get a handle to a
-<a class="reference external" href="http://beaker.readthedocs.org/en/latest/modules/cache.html#beaker.cache.CacheManager" title="(in Beaker v1.6)"><tt class="xref py py-class docutils literal"><span class="pre">beaker.cache.CacheManager</span></tt></a>:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">beaker.cache</span> <span class="kn">import</span> <span class="n">CacheManager</span>
-
-<span class="n">manager</span> <span class="o">=</span> <span class="n">CacheManager</span><span class="p">(</span><span class="n">cache_regions</span><span class="o">=</span><span class="p">{</span>
-    <span class="s">'short_term'</span><span class="p">:{</span>
-        <span class="s">'type'</span><span class="p">:</span> <span class="s">'memory'</span><span class="p">,</span>
-        <span class="s">'expire'</span><span class="p">:</span> <span class="mi">60</span>
-    <span class="p">},</span>
-    <span class="s">'long_term'</span><span class="p">:{</span>
-        <span class="s">'type'</span><span class="p">:</span> <span class="s">'ext:memcached'</span><span class="p">,</span>
-        <span class="s">'url'</span><span class="p">:</span> <span class="s">'127.0.0.1:11211'</span><span class="p">,</span>
-        <span class="s">'expire'</span><span class="p">:</span> <span class="mi">300</span>
-    <span class="p">}</span>
-<span class="p">})</span>
-
-<span class="n">lookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span>
-                <span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/path/to/templates'</span><span class="p">],</span>
-                <span class="n">module_directory</span><span class="o">=</span><span class="s">'/path/to/modules'</span><span class="p">,</span>
-                <span class="n">cache_impl</span><span class="o">=</span><span class="s">'beaker'</span><span class="p">,</span>
-                <span class="n">cache_args</span><span class="o">=</span><span class="p">{</span>
-                    <span class="s">'manager'</span><span class="p">:</span><span class="n">manager</span>
-                <span class="p">}</span>
-        <span class="p">)</span>
-</pre></div>
-</div>
-<p>Our templates can then opt to cache data in one of either region,
-using the <tt class="docutils literal"><span class="pre">cache_region</span></tt> argument.   Such as using <tt class="docutils literal"><span class="pre">short_term</span></tt>
-at the <tt class="docutils literal"><span class="pre"><%page></span></tt> level:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">cached=</span><span class="s">"True"</span> <span class="na">cache_region=</span><span class="s">"short_term"</span><span class="cp">></span>
-
-<span class="cp">## ...</span><span class="x"></span>
-</pre></div>
-</div>
-<p>Or, <tt class="docutils literal"><span class="pre">long_term</span></tt> at the <tt class="docutils literal"><span class="pre"><%block></span></tt> level:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span> <span class="na">cached=</span><span class="s">"True"</span> <span class="na">cache_region=</span><span class="s">"long_term"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    other text</span>
-<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>The Beaker backend also works without regions.   There are a
-variety of arguments that can be passed to the <tt class="docutils literal"><span class="pre">cache_args</span></tt>
-dictionary, which are also allowable in templates via the
-<tt class="docutils literal"><span class="pre"><%page></span></tt>, <tt class="docutils literal"><span class="pre"><%block></span></tt>,
-and <tt class="docutils literal"><span class="pre"><%def></span></tt> tags specific to those sections.   The values
-given override those specified at the  <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>
-or <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> level.</p>
-<p>With the possible exception
-of <tt class="docutils literal"><span class="pre">cache_timeout</span></tt>, these arguments are probably better off
-staying at the template configuration level.  Each argument
-specified as <tt class="docutils literal"><span class="pre">cache_XYZ</span></tt> in a template tag is specified
-without the <tt class="docutils literal"><span class="pre">cache_</span></tt> prefix in the <tt class="docutils literal"><span class="pre">cache_args</span></tt> dictionary:</p>
-<ul class="simple">
-<li><tt class="docutils literal"><span class="pre">cache_timeout</span></tt> - number of seconds in which to invalidate the
-cached data.  After this timeout, the content is re-generated
-on the next call.  Available as <tt class="docutils literal"><span class="pre">timeout</span></tt> in the <tt class="docutils literal"><span class="pre">cache_args</span></tt>
-dictionary.</li>
-<li><tt class="docutils literal"><span class="pre">cache_type</span></tt> - type of caching. <tt class="docutils literal"><span class="pre">'memory'</span></tt>, <tt class="docutils literal"><span class="pre">'file'</span></tt>, <tt class="docutils literal"><span class="pre">'dbm'</span></tt>, or
-<tt class="docutils literal"><span class="pre">'ext:memcached'</span></tt> (note that  the string <tt class="docutils literal"><span class="pre">memcached</span></tt> is
-also accepted by the dogpile.cache Mako plugin, though not by Beaker itself).
-Available as <tt class="docutils literal"><span class="pre">type</span></tt> in the <tt class="docutils literal"><span class="pre">cache_args</span></tt> dictionary.</li>
-<li><tt class="docutils literal"><span class="pre">cache_url</span></tt> - (only used for <tt class="docutils literal"><span class="pre">memcached</span></tt> but required) a single
-IP address or a semi-colon separated list of IP address of
-memcache servers to use.  Available as <tt class="docutils literal"><span class="pre">url</span></tt> in the <tt class="docutils literal"><span class="pre">cache_args</span></tt>
-dictionary.</li>
-<li><tt class="docutils literal"><span class="pre">cache_dir</span></tt> - in the case of the <tt class="docutils literal"><span class="pre">'file'</span></tt> and <tt class="docutils literal"><span class="pre">'dbm'</span></tt> cache types,
-this is the filesystem directory with which to store data
-files. If this option is not present, the value of
-<tt class="docutils literal"><span class="pre">module_directory</span></tt> is used (i.e. the directory where compiled
-template modules are stored). If neither option is available
-an exception is thrown.  Available as <tt class="docutils literal"><span class="pre">dir</span></tt> in the
-<tt class="docutils literal"><span class="pre">cache_args</span></tt> dictionary.</li>
-</ul>
-</div>
-<div class="section" id="using-the-dogpile-cache-backend">
-<span id="dogpile-cache-backend"></span><h3>Using the dogpile.cache Backend<a class="headerlink" href="#using-the-dogpile-cache-backend" title="Permalink to this headline">¶</a></h3>
-<p><a class="reference external" href="http://dogpilecache.readthedocs.org">dogpile.cache</a> is a new replacement for Beaker.   It provides
-a modernized, slimmed down interface and is generally easier to use
-than Beaker.   As of this writing it has not yet been released.  dogpile.cache
-includes its own Mako cache plugin – see <a class="reference external" href="http://dogpilecache.readthedocs.org/en/latest/api.html#dogpile.cache.plugins.mako_cache" title="(in dogpile.cache v0.3.0)"><tt class="xref py py-mod docutils literal"><span class="pre">dogpile.cache.plugins.mako_cache</span></tt></a> in the
-dogpile.cache documentation.</p>
-</div>
-</div>
-<div class="section" id="programmatic-cache-access">
-<h2>Programmatic Cache Access<a class="headerlink" href="#programmatic-cache-access" title="Permalink to this headline">¶</a></h2>
-<p>The <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>, as well as any template-derived <a class="reference internal" href="namespaces.html#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>, has
-an accessor called <tt class="docutils literal"><span class="pre">cache</span></tt> which returns the <a class="reference internal" href="#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> object
-for that template. This object is a facade on top of the underlying
-<a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> object, and provides some very rudimental
-capabilities, such as the ability to get and put arbitrary
-values:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span>
-    <span class="n">local</span><span class="o">.</span><span class="n">cache</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s">"somekey"</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s">"memory"</span><span class="p">,</span> <span class="s">"somevalue"</span><span class="p">)</span>
-<span class="cp">%></span><span class="x"></span>
-</pre></div>
-</div>
-<p>Above, the cache associated with the <tt class="docutils literal"><span class="pre">local</span></tt> namespace is
-accessed and a key is placed within a memory cache.</p>
-<p>More commonly, the <tt class="docutils literal"><span class="pre">cache</span></tt> object is used to invalidate cached
-sections programmatically:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">template</span> <span class="o">=</span> <span class="n">lookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="s">'/sometemplate.html'</span><span class="p">)</span>
-
-<span class="c"># invalidate the "body" of the template</span>
-<span class="n">template</span><span class="o">.</span><span class="n">cache</span><span class="o">.</span><span class="n">invalidate_body</span><span class="p">()</span>
-
-<span class="c"># invalidate an individual def</span>
-<span class="n">template</span><span class="o">.</span><span class="n">cache</span><span class="o">.</span><span class="n">invalidate_def</span><span class="p">(</span><span class="s">'somedef'</span><span class="p">)</span>
-
-<span class="c"># invalidate an arbitrary key</span>
-<span class="n">template</span><span class="o">.</span><span class="n">cache</span><span class="o">.</span><span class="n">invalidate</span><span class="p">(</span><span class="s">'somekey'</span><span class="p">)</span>
-</pre></div>
-</div>
-<p>You can access any special method or attribute of the <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a>
-itself using the <a class="reference internal" href="#mako.cache.Cache.impl" title="mako.cache.Cache.impl"><tt class="xref py py-attr docutils literal"><span class="pre">impl</span></tt></a> attribute:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">template</span><span class="o">.</span><span class="n">cache</span><span class="o">.</span><span class="n">impl</span><span class="o">.</span><span class="n">do_something_special</span><span class="p">()</span>
-</pre></div>
-</div>
-<p>Note that using implementation-specific methods will mean you can’t
-swap in a different kind of <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> implementation at a
-later time.</p>
-</div>
-<div class="section" id="cache-plugins">
-<span id="id1"></span><h2>Cache Plugins<a class="headerlink" href="#cache-plugins" title="Permalink to this headline">¶</a></h2>
-<p>The mechanism used by caching can be plugged in
-using a <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> subclass.    This class implements
-the rudimental methods Mako needs to implement the caching
-API.   Mako includes the <a class="reference internal" href="#mako.ext.beaker_cache.BeakerCacheImpl" title="mako.ext.beaker_cache.BeakerCacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">BeakerCacheImpl</span></tt></a> class to
-provide the default implementation.  A <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> class
-is acquired by Mako using a <tt class="docutils literal"><span class="pre">pkg_resources</span></tt> entrypoint, using
-the name given as the <tt class="docutils literal"><span class="pre">cache_impl</span></tt> argument to <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>
-or <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>.    This entry point can be
-installed via the standard <cite>setuptools</cite>/<tt class="docutils literal"><span class="pre">setup()</span></tt> procedure, underneath
-the <cite>EntryPoint</cite> group named <tt class="docutils literal"><span class="pre">"mako.cache"</span></tt>.  It can also be
-installed at runtime via a convenience installer <a class="reference internal" href="#mako.cache.register_plugin" title="mako.cache.register_plugin"><tt class="xref py py-func docutils literal"><span class="pre">register_plugin()</span></tt></a>
-which accomplishes essentially the same task.</p>
-<p>An example plugin that implements a local dictionary cache:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.cache</span> <span class="kn">import</span> <span class="n">Cacheimpl</span><span class="p">,</span> <span class="n">register_plugin</span>
-
-<span class="k">class</span> <span class="nc">SimpleCacheImpl</span><span class="p">(</span><span class="n">CacheImpl</span><span class="p">):</span>
-    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cache</span><span class="p">):</span>
-        <span class="nb">super</span><span class="p">(</span><span class="n">SimpleCacheImpl</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="n">cache</span><span class="p">)</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">_cache</span> <span class="o">=</span> <span class="p">{}</span>
-
-    <span class="k">def</span> <span class="nf">get_or_create</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="n">creation_function</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
-        <span class="k">if</span> <span class="n">key</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_cache</span><span class="p">:</span>
-            <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_cache</span><span class="p">[</span><span class="n">key</span><span class="p">]</span>
-        <span class="k">else</span><span class="p">:</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">_cache</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span> <span class="o">=</span> <span class="n">creation_function</span><span class="p">()</span>
-            <span class="k">return</span> <span class="n">value</span>
-
-    <span class="k">def</span> <span class="nf">set</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">_cache</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span>
-
-    <span class="k">def</span> <span class="nf">get</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
-        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_cache</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">key</span><span class="p">)</span>
-
-    <span class="k">def</span> <span class="nf">invalidate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">_cache</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
-
-<span class="c"># optional - register the class locally</span>
-<span class="n">register_plugin</span><span class="p">(</span><span class="s">"simple"</span><span class="p">,</span> <span class="n">__name__</span><span class="p">,</span> <span class="s">"SimpleCacheImpl"</span><span class="p">)</span>
-</pre></div>
-</div>
-<p>Enabling the above plugin in a template would look like:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"mytemplate"</span><span class="p">,</span>
-             <span class="nb">file</span><span class="o">=</span><span class="s">"mytemplate.html"</span><span class="p">,</span>
-             <span class="n">cache_impl</span><span class="o">=</span><span class="s">'simple'</span><span class="p">)</span>
-</pre></div>
-</div>
-<div class="section" id="guidelines-for-writing-cache-plugins">
-<h3>Guidelines for Writing Cache Plugins<a class="headerlink" href="#guidelines-for-writing-cache-plugins" title="Permalink to this headline">¶</a></h3>
-<ul class="simple">
-<li>The <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> is created on a per-<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> basis.  The
-class should ensure that only data for the parent <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> is
-persisted or returned by the cache methods.    The actual <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>
-is available via the <tt class="docutils literal"><span class="pre">self.cache.template</span></tt> attribute.   The <tt class="docutils literal"><span class="pre">self.cache.id</span></tt>
-attribute, which is essentially the unique modulename of the template, is
-a good value to use in order to represent a unique namespace of keys specific
-to the template.</li>
-<li>Templates only use the <a class="reference internal" href="#mako.cache.CacheImpl.get_or_create" title="mako.cache.CacheImpl.get_or_create"><tt class="xref py py-meth docutils literal"><span class="pre">CacheImpl.get_or_create()</span></tt></a> method
-in an implicit fashion.  The <a class="reference internal" href="#mako.cache.CacheImpl.set" title="mako.cache.CacheImpl.set"><tt class="xref py py-meth docutils literal"><span class="pre">CacheImpl.set()</span></tt></a>,
-<a class="reference internal" href="#mako.cache.CacheImpl.get" title="mako.cache.CacheImpl.get"><tt class="xref py py-meth docutils literal"><span class="pre">CacheImpl.get()</span></tt></a>, and <a class="reference internal" href="#mako.cache.CacheImpl.invalidate" title="mako.cache.CacheImpl.invalidate"><tt class="xref py py-meth docutils literal"><span class="pre">CacheImpl.invalidate()</span></tt></a> methods are
-only used in response to direct programmatic access to the corresponding
-methods on the <a class="reference internal" href="#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> object.</li>
-<li><a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> will be accessed in a multithreaded fashion if the
-<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> itself is used multithreaded.  Care should be taken
-to ensure caching implementations are threadsafe.</li>
-<li>A library like <a class="reference external" href="http://pypi.python.org/pypi/dogpile.core">Dogpile</a>, which
-is a minimal locking system derived from Beaker, can be used to help
-implement the <a class="reference internal" href="#mako.cache.CacheImpl.get_or_create" title="mako.cache.CacheImpl.get_or_create"><tt class="xref py py-meth docutils literal"><span class="pre">CacheImpl.get_or_create()</span></tt></a> method in a threadsafe
-way that can maximize effectiveness across multiple threads as well
-as processes. <a class="reference internal" href="#mako.cache.CacheImpl.get_or_create" title="mako.cache.CacheImpl.get_or_create"><tt class="xref py py-meth docutils literal"><span class="pre">CacheImpl.get_or_create()</span></tt></a> is the
-key method used by templates.</li>
-<li>All arguments passed to <tt class="docutils literal"><span class="pre">**kw</span></tt> come directly from the parameters
-inside the <tt class="docutils literal"><span class="pre"><%def></span></tt>, <tt class="docutils literal"><span class="pre"><%block></span></tt>, or <tt class="docutils literal"><span class="pre"><%page></span></tt> tags directly,
-minus the <tt class="docutils literal"><span class="pre">"cache_"</span></tt> prefix, as strings, with the exception of
-the argument <tt class="docutils literal"><span class="pre">cache_timeout</span></tt>, which is passed to the plugin
-as the name <tt class="docutils literal"><span class="pre">timeout</span></tt> with the value converted to an integer.
-Arguments present in <tt class="docutils literal"><span class="pre">cache_args</span></tt> on <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> or
-<a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> are passed directly, but are superseded
-by those present in the most specific template tag.</li>
-<li>The directory where <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> places module files can
-be acquired using the accessor <tt class="docutils literal"><span class="pre">self.cache.template.module_directory</span></tt>.
-This directory can be a good place to throw cache-related work
-files, underneath a prefix like <tt class="docutils literal"><span class="pre">_my_cache_work</span></tt> so that name
-conflicts with generated modules don’t occur.</li>
-</ul>
-</div>
-</div>
-<div class="section" id="api-reference">
-<h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h2>
-<dl class="class">
-<dt id="mako.cache.Cache">
-<em class="property">class </em><tt class="descclassname">mako.cache.</tt><tt class="descname">Cache</tt><big>(</big><em>template</em>, <em>*args</em><big>)</big><a class="headerlink" href="#mako.cache.Cache" title="Permalink to this definition">¶</a></dt>
-<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
-<p>Represents a data content cache made available to the module
-space of a specific <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object.</p>
-<p class="versionadded">
-<span class="versionmodified">New in version 0.6: </span><a class="reference internal" href="#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> by itself is mostly a
-container for a <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> object, which implements
-a fixed API to provide caching services; specific subclasses exist to
-implement different
-caching strategies.   Mako includes a backend that works with
-the Beaker caching system.   Beaker itself then supports
-a number of backends (i.e. file, memory, memcached, etc.)</p>
-<p>The construction of a <a class="reference internal" href="#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> is part of the mechanics
-of a <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>, and programmatic access to this
-cache is typically via the <tt class="xref py py-attr docutils literal"><span class="pre">Template.cache</span></tt> attribute.</p>
-<dl class="method">
-<dt id="mako.cache.Cache.get">
-<tt class="descname">get</tt><big>(</big><em>key</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.Cache.get" title="Permalink to this definition">¶</a></dt>
-<dd><p>Retrieve a value from the cache.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>key</strong> – the value’s key.</li>
-<li><strong>**kw</strong> – cache configuration arguments.  The
-backend is configured using these arguments upon first request.
-Subsequent requests that use the same series of configuration
-values will use that same backend.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.cache.Cache.get_or_create">
-<tt class="descname">get_or_create</tt><big>(</big><em>key</em>, <em>creation_function</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.Cache.get_or_create" title="Permalink to this definition">¶</a></dt>
-<dd><p>Retrieve a value from the cache, using the given creation function
-to generate a new value.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="mako.cache.Cache.id">
-<tt class="descname">id</tt><em class="property"> = None</em><a class="headerlink" href="#mako.cache.Cache.id" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return the ‘id’ that identifies this cache.</p>
-<p>This is a value that should be globally unique to the
-<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> associated with this cache, and can
-be used by a caching system to name a local container
-for data specific to this template.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="mako.cache.Cache.impl">
-<tt class="descname">impl</tt><em class="property"> = None</em><a class="headerlink" href="#mako.cache.Cache.impl" title="Permalink to this definition">¶</a></dt>
-<dd><p>Provide the <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> in use by this <a class="reference internal" href="#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a>.</p>
-<p>This accessor allows a <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> with additional
-methods beyond that of <a class="reference internal" href="#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> to be used programmatically.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.cache.Cache.invalidate">
-<tt class="descname">invalidate</tt><big>(</big><em>key</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.Cache.invalidate" title="Permalink to this definition">¶</a></dt>
-<dd><p>Invalidate a value in the cache.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>key</strong> – the value’s key.</li>
-<li><strong>**kw</strong> – cache configuration arguments.  The
-backend is configured using these arguments upon first request.
-Subsequent requests that use the same series of configuration
-values will use that same backend.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.cache.Cache.invalidate_body">
-<tt class="descname">invalidate_body</tt><big>(</big><big>)</big><a class="headerlink" href="#mako.cache.Cache.invalidate_body" title="Permalink to this definition">¶</a></dt>
-<dd><p>Invalidate the cached content of the “body” method for this
-template.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.cache.Cache.invalidate_closure">
-<tt class="descname">invalidate_closure</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#mako.cache.Cache.invalidate_closure" title="Permalink to this definition">¶</a></dt>
-<dd><p>Invalidate a nested <tt class="docutils literal"><span class="pre"><%def></span></tt> within this template.</p>
-<p>Caching of nested defs is a blunt tool as there is no
-management of scope – nested defs that use cache tags
-need to have names unique of all other nested defs in the
-template, else their content will be overwritten by
-each other.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.cache.Cache.invalidate_def">
-<tt class="descname">invalidate_def</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#mako.cache.Cache.invalidate_def" title="Permalink to this definition">¶</a></dt>
-<dd><p>Invalidate the cached content of a particular <tt class="docutils literal"><span class="pre"><%def></span></tt> within this
-template.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.cache.Cache.put">
-<tt class="descname">put</tt><big>(</big><em>key</em>, <em>value</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.Cache.put" title="Permalink to this definition">¶</a></dt>
-<dd><p>A synonym for <a class="reference internal" href="#mako.cache.Cache.set" title="mako.cache.Cache.set"><tt class="xref py py-meth docutils literal"><span class="pre">Cache.set()</span></tt></a>.</p>
-<p>This is here for backwards compatibility.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.cache.Cache.set">
-<tt class="descname">set</tt><big>(</big><em>key</em>, <em>value</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.Cache.set" title="Permalink to this definition">¶</a></dt>
-<dd><p>Place a value in the cache.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>key</strong> – the value’s key.</li>
-<li><strong>value</strong> – the value.</li>
-<li><strong>**kw</strong> – cache configuration arguments.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="mako.cache.Cache.starttime">
-<tt class="descname">starttime</tt><em class="property"> = None</em><a class="headerlink" href="#mako.cache.Cache.starttime" title="Permalink to this definition">¶</a></dt>
-<dd><p>Epochal time value for when the owning <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> was
-first compiled.</p>
-<p>A cache implementation may wish to invalidate data earlier than
-this timestamp; this has the effect of the cache for a specific
-<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> starting clean any time the <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>
-is recompiled, such as when the original template file changed on
-the filesystem.</p>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="class">
-<dt id="mako.cache.CacheImpl">
-<em class="property">class </em><tt class="descclassname">mako.cache.</tt><tt class="descname">CacheImpl</tt><big>(</big><em>cache</em><big>)</big><a class="headerlink" href="#mako.cache.CacheImpl" title="Permalink to this definition">¶</a></dt>
-<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
-<p>Provide a cache implementation for use by <a class="reference internal" href="#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a>.</p>
-<dl class="method">
-<dt id="mako.cache.CacheImpl.get">
-<tt class="descname">get</tt><big>(</big><em>key</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.CacheImpl.get" title="Permalink to this definition">¶</a></dt>
-<dd><p>Retrieve a value from the cache.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>key</strong> – the value’s key.</li>
-<li><strong>**kw</strong> – cache configuration arguments.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.cache.CacheImpl.get_or_create">
-<tt class="descname">get_or_create</tt><big>(</big><em>key</em>, <em>creation_function</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.CacheImpl.get_or_create" title="Permalink to this definition">¶</a></dt>
-<dd><p>Retrieve a value from the cache, using the given creation function
-to generate a new value.</p>
-<p>This function <em>must</em> return a value, either from
-the cache, or via the given creation function.
-If the creation function is called, the newly
-created value should be populated into the cache
-under the given key before being returned.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>key</strong> – the value’s key.</li>
-<li><strong>creation_function</strong> – function that when called generates
-a new value.</li>
-<li><strong>**kw</strong> – cache configuration arguments.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.cache.CacheImpl.invalidate">
-<tt class="descname">invalidate</tt><big>(</big><em>key</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.CacheImpl.invalidate" title="Permalink to this definition">¶</a></dt>
-<dd><p>Invalidate a value in the cache.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>key</strong> – the value’s key.</li>
-<li><strong>**kw</strong> – cache configuration arguments.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="mako.cache.CacheImpl.pass_context">
-<tt class="descname">pass_context</tt><em class="property"> = False</em><a class="headerlink" href="#mako.cache.CacheImpl.pass_context" title="Permalink to this definition">¶</a></dt>
-<dd><p>If <tt class="docutils literal"><span class="pre">True</span></tt>, the <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> will be passed to
-<a class="reference internal" href="#mako.cache.CacheImpl.get_or_create" title="mako.cache.CacheImpl.get_or_create"><tt class="xref py py-meth docutils literal"><span class="pre">get_or_create</span></tt></a> as the name <tt class="docutils literal"><span class="pre">'context'</span></tt>.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.cache.CacheImpl.set">
-<tt class="descname">set</tt><big>(</big><em>key</em>, <em>value</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#mako.cache.CacheImpl.set" title="Permalink to this definition">¶</a></dt>
-<dd><p>Place a value in the cache.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>key</strong> – the value’s key.</li>
-<li><strong>value</strong> – the value.</li>
-<li><strong>**kw</strong> – cache configuration arguments.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="function">
-<dt id="mako.cache.register_plugin">
-<tt class="descclassname">mako.cache.</tt><tt class="descname">register_plugin</tt><big>(</big><em>self</em>, <em>name</em>, <em>modulepath</em>, <em>objname</em><big>)</big><a class="headerlink" href="#mako.cache.register_plugin" title="Permalink to this definition">¶</a></dt>
-<dd></dd></dl>
-
-<dl class="class">
-<dt id="mako.ext.beaker_cache.BeakerCacheImpl">
-<em class="property">class </em><tt class="descclassname">mako.ext.beaker_cache.</tt><tt class="descname">BeakerCacheImpl</tt><big>(</big><em>cache</em><big>)</big><a class="headerlink" href="#mako.ext.beaker_cache.BeakerCacheImpl" title="Permalink to this definition">¶</a></dt>
-<dd><p>Bases: <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">mako.cache.CacheImpl</span></tt></a></p>
-<p>A <a class="reference internal" href="#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> provided for the Beaker caching system.</p>
-<p>This plugin is used by default, based on the default
-value of <tt class="docutils literal"><span class="pre">'beaker'</span></tt> for the <tt class="docutils literal"><span class="pre">cache_impl</span></tt> parameter of the
-<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> or <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> classes.</p>
-</dd></dl>
-
-</div>
-</div>
-
-    </div>
-
-</div>
-
-<div id="docs-bottom-navigation" class="docs-navigation-links">
-        Previous:
-        <a href="unicode.html" title="previous chapter">The Unicode Chapter</a>
-
-    <div id="docs-copyright">
-        © Copyright the Mako authors and contributors.
-        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
-        with Mako templates.
-    </div>
-</div>
-
-</div>
-
-<div class="clearfix">
-
-<hr/>
-
-<div class="copyright">Website content copyright © by Michael Bayer.
-    All rights reserved.  Mako and its documentation are licensed
-    under the MIT license.  mike(&)zzzcomputing.com</div>
-
-</div>
-</div>
-</body>
-</html>
diff --git a/lib/mako-0.7.2/doc/defs.html b/lib/mako-0.7.2/doc/defs.html
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/defs.html
+++ /dev/null
@@ -1,726 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
-<head>
-<title>
-    
-                Defs and Blocks
-             — 
-    Mako 0.7.2 Documentation
-</title>
-
-    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
-
-    <script type="text/javascript">
-      var DOCUMENTATION_OPTIONS = {
-          URL_ROOT:    '#',
-          VERSION:     '0.7.2',
-          COLLAPSE_MODINDEX: false,
-          FILE_SUFFIX: '.html'
-      };
-    </script>
-        <script type="text/javascript" src="_static/jquery.js"></script>
-        <script type="text/javascript" src="_static/underscore.js"></script>
-        <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
-    <link rel="top" title="Mako 0.7.2 Documentation" href="index.html" />
-        <link rel="next" title="The Mako Runtime Environment" href="runtime.html" />
-        <link rel="prev" title="Syntax" href="syntax.html" />
-
-<link rel="stylesheet" href="_static/site.css"></link>
-
-
-</head>
-<body>
-    <div id="wrap">
-    <div class="rightbar">
-    <div class="slogan">
-    Hyperfast and lightweight templating for the Python platform.
-    </div>
-
-
-    </div>
-
-    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
-
-    <hr/>
-
-    
-
-
-
-
-
-
-
-
-
-<div id="docs-container">
-
-
-
-<div id="docs-header">
-    <h1>Mako 0.7.2 Documentation</h1>
-
-    <div id="docs-search">
-    Search:
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </div>
-
-    <div id="docs-version-header">
-        Release: <span class="version-num">0.7.2</span>
-
-    </div>
-
-</div>
-
-<div id="docs-top-navigation">
-    <div id="docs-top-page-control" class="docs-navigation-links">
-        <ul>
-            <li>Prev:
-            <a href="syntax.html" title="previous chapter">Syntax</a>
-            </li>
-            <li>Next:
-            <a href="runtime.html" title="next chapter">The Mako Runtime Environment</a>
-            </li>
-
-        <li>
-            <a href="index.html">Table of Contents</a> |
-            <a href="genindex.html">Index</a>
-            | <a href="_sources/defs.txt">view source
-        </li>
-        </ul>
-    </div>
-
-    <div id="docs-navigation-banner">
-        <a href="index.html">Mako 0.7.2 Documentation</a>
-        » 
-                Defs and Blocks
-             
-
-        <h2>
-            
-                Defs and Blocks
-            
-        </h2>
-    </div>
-
-</div>
-
-<div id="docs-body-container">
-
-    <div id="docs-sidebar">
-    <h3><a href="index.html">Table of Contents</a></h3>
-    <ul>
-<li><a class="reference internal" href="#">Defs and Blocks</a><ul>
-<li><a class="reference internal" href="#using-defs">Using Defs</a><ul>
-<li><a class="reference internal" href="#calling-defs-from-other-files">Calling Defs from Other Files</a></li>
-<li><a class="reference internal" href="#calling-defs-programmatically">Calling Defs Programmatically</a></li>
-<li><a class="reference internal" href="#defs-within-defs">Defs within Defs</a></li>
-<li><a class="reference internal" href="#calling-a-def-with-embedded-content-and-or-other-defs">Calling a Def with Embedded Content and/or Other Defs</a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#using-blocks">Using Blocks</a><ul>
-<li><a class="reference internal" href="#using-named-blocks">Using Named Blocks</a></li>
-<li><a class="reference internal" href="#using-page-arguments-in-named-blocks">Using Page Arguments in Named Blocks</a></li>
-</ul>
-</li>
-</ul>
-</li>
-</ul>
-
-
-    <h4>Previous Topic</h4>
-    <p>
-    <a href="syntax.html" title="previous chapter">Syntax</a>
-    </p>
-    <h4>Next Topic</h4>
-    <p>
-    <a href="runtime.html" title="next chapter">The Mako Runtime Environment</a>
-    </p>
-
-    <h4>Quick Search</h4>
-    <p>
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </p>
-
-    </div>
-
-    <div id="docs-body" class="withsidebar" >
-        
-<div class="section" id="defs-and-blocks">
-<span id="defs-toplevel"></span><h1>Defs and Blocks<a class="headerlink" href="#defs-and-blocks" title="Permalink to this headline">¶</a></h1>
-<p><tt class="docutils literal"><span class="pre"><%def></span></tt> and <tt class="docutils literal"><span class="pre"><%block></span></tt> are two tags that both demarcate any block of text
-and/or code.   They both exist within generated Python as a callable function,
-i.e., a Python <tt class="docutils literal"><span class="pre">def</span></tt>.   They differ in their scope and calling semantics.
-Whereas <tt class="docutils literal"><span class="pre"><%def></span></tt> provides a construct that is very much like a named Python
-<tt class="docutils literal"><span class="pre">def</span></tt>, the <tt class="docutils literal"><span class="pre"><%block></span></tt> is more layout oriented.</p>
-<div class="section" id="using-defs">
-<h2>Using Defs<a class="headerlink" href="#using-defs" title="Permalink to this headline">¶</a></h2>
-<p>The <tt class="docutils literal"><span class="pre"><%def></span></tt> tag requires a <tt class="docutils literal"><span class="pre">name</span></tt> attribute, where the <tt class="docutils literal"><span class="pre">name</span></tt> references
-a Python function signature:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"hello()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    hello world</span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>To invoke the <tt class="docutils literal"><span class="pre"><%def></span></tt>, it is normally called as an expression:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x">the def:  </span><span class="cp">${</span><span class="n">hello</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>If the <tt class="docutils literal"><span class="pre"><%def></span></tt> is not nested inside of another <tt class="docutils literal"><span class="pre"><%def></span></tt>,
-it’s known as a <strong>top level def</strong> and can be accessed anywhere in
-the template, including above where it was defined.</p>
-<p>All defs, top level or not, have access to the current
-contextual namespace in exactly the same way their containing
-template does. Suppose the template below is executed with the
-variables <tt class="docutils literal"><span class="pre">username</span></tt> and <tt class="docutils literal"><span class="pre">accountdata</span></tt> inside the context:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x">Hello there </span><span class="cp">${</span><span class="n">username</span><span class="cp">}</span><span class="x">, how are ya.  Lets see what your account says:</span>
-
-<span class="cp">${</span><span class="n">account</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"account()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    Account for </span><span class="cp">${</span><span class="n">username</span><span class="cp">}</span><span class="x">:<br/></span>
-
-    <span class="cp">%</span> <span class="k">for</span> <span class="n">row</span> <span class="ow">in</span> <span class="n">accountdata</span><span class="p">:</span><span class="x"></span>
-<span class="x">        Value: </span><span class="cp">${</span><span class="n">row</span><span class="cp">}</span><span class="x"><br/></span>
-    <span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>The <tt class="docutils literal"><span class="pre">username</span></tt> and <tt class="docutils literal"><span class="pre">accountdata</span></tt> variables are present
-within the main template body as well as the body of the
-<tt class="docutils literal"><span class="pre">account()</span></tt> def.</p>
-<p>Since defs are just Python functions, you can define and pass
-arguments to them as well:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="n">account</span><span class="p">(</span><span class="n">accountname</span><span class="o">=</span><span class="s">'john'</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"account(accountname, type='regular')"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    account name: </span><span class="cp">${</span><span class="n">accountname</span><span class="cp">}</span><span class="x">, type: </span><span class="cp">${</span><span class="nb">type</span><span class="cp">}</span><span class="x"></span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>When you declare an argument signature for your def, they are
-required to follow normal Python conventions (i.e., all
-arguments are required except keyword arguments with a default
-value). This is in contrast to using context-level variables,
-which evaluate to <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> if you reference a name that
-does not exist.</p>
-<div class="section" id="calling-defs-from-other-files">
-<h3>Calling Defs from Other Files<a class="headerlink" href="#calling-defs-from-other-files" title="Permalink to this headline">¶</a></h3>
-<p>Top level <tt class="docutils literal"><span class="pre"><%def></span></tt>s are <strong>exported</strong> by your template’s
-module, and can be called from the outside; including from other
-templates, as well as normal Python code. Calling a <tt class="docutils literal"><span class="pre"><%def></span></tt>
-from another template is something like using an <tt class="docutils literal"><span class="pre"><%include></span></tt>
-– except you are calling a specific function within the
-template, not the whole template.</p>
-<p>The remote <tt class="docutils literal"><span class="pre"><%def></span></tt> call is also a little bit like calling
-functions from other modules in Python. There is an “import”
-step to pull the names from another template into your own
-template; then the function or functions are available.</p>
-<p>To import another template, use the <tt class="docutils literal"><span class="pre"><%namespace></span></tt> tag:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">namespace</span> <span class="na">name=</span><span class="s">"mystuff"</span> <span class="na">file=</span><span class="s">"mystuff.html"</span><span class="cp">/></span><span class="x"></span>
-</pre></div>
-</div>
-<p>The above tag adds a local variable <tt class="docutils literal"><span class="pre">mystuff</span></tt> to the current
-scope.</p>
-<p>Then, just call the defs off of <tt class="docutils literal"><span class="pre">mystuff</span></tt>:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="n">mystuff</span><span class="o">.</span><span class="n">somedef</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span><span class="n">y</span><span class="o">=</span><span class="mi">7</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>The <tt class="docutils literal"><span class="pre"><%namespace></span></tt> tag also supports some of the other
-semantics of Python’s <tt class="docutils literal"><span class="pre">import</span></tt> statement, including pulling
-names into the local variable space, or using <tt class="docutils literal"><span class="pre">*</span></tt> to represent
-all names, using the <tt class="docutils literal"><span class="pre">import</span></tt> attribute:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">namespace</span> <span class="na">file=</span><span class="s">"mystuff.html"</span> <span class="na">import=</span><span class="s">"foo, bar"</span><span class="cp">/></span><span class="x"></span>
-</pre></div>
-</div>
-<p>This is just a quick intro to the concept of a <strong>namespace</strong>,
-which is a central Mako concept that has its own chapter in
-these docs. For more detail and examples, see
-<a class="reference internal" href="namespaces.html"><em>Namespaces</em></a>.</p>
-</div>
-<div class="section" id="calling-defs-programmatically">
-<h3>Calling Defs Programmatically<a class="headerlink" href="#calling-defs-programmatically" title="Permalink to this headline">¶</a></h3>
-<p>You can call defs programmatically from any <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object
-using the <a class="reference internal" href="usage.html#mako.template.Template.get_def" title="mako.template.Template.get_def"><tt class="xref py py-meth docutils literal"><span class="pre">get_def()</span></tt></a> method, which returns a <a class="reference internal" href="usage.html#mako.template.DefTemplate" title="mako.template.DefTemplate"><tt class="xref py py-class docutils literal"><span class="pre">DefTemplate</span></tt></a>
-object. This is a <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> subclass which the parent
-<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> creates, and is usable like any other template:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
-
-<span class="n">template</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"""</span>
-<span class="s">    <</span><span class="si">%d</span><span class="s">ef name="hi(name)"></span>
-<span class="s">        hi ${name}!</span>
-<span class="s">    </</span><span class="si">%d</span><span class="s">ef></span>
-
-<span class="s">    <</span><span class="si">%d</span><span class="s">ef name="bye(name)"></span>
-<span class="s">        bye ${name}!</span>
-<span class="s">    </</span><span class="si">%d</span><span class="s">ef></span>
-<span class="s">"""</span><span class="p">)</span>
-
-<span class="k">print</span> <span class="n">template</span><span class="o">.</span><span class="n">get_def</span><span class="p">(</span><span class="s">"hi"</span><span class="p">)</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">"ed"</span><span class="p">)</span>
-<span class="k">print</span> <span class="n">template</span><span class="o">.</span><span class="n">get_def</span><span class="p">(</span><span class="s">"bye"</span><span class="p">)</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">"ed"</span><span class="p">)</span>
-</pre></div>
-</div>
-</div>
-<div class="section" id="defs-within-defs">
-<h3>Defs within Defs<a class="headerlink" href="#defs-within-defs" title="Permalink to this headline">¶</a></h3>
-<p>The def model follows regular Python rules for closures.
-Declaring <tt class="docutils literal"><span class="pre"><%def></span></tt> inside another <tt class="docutils literal"><span class="pre"><%def></span></tt> declares it
-within the parent’s <strong>enclosing scope</strong>:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"mydef()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"subdef()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">        a sub def</span>
-<span class="x">    </span><span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-
-<span class="x">    i'm the def, and the subcomponent is </span><span class="cp">${</span><span class="n">subdef</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>Just like Python, names that exist outside the inner <tt class="docutils literal"><span class="pre"><%def></span></tt>
-exist inside it as well:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span>
-    <span class="n">x</span> <span class="o">=</span> <span class="mi">12</span>
-<span class="cp">%></span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"outer()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    </span><span class="cp"><%</span>
-        <span class="n">y</span> <span class="o">=</span> <span class="mi">15</span>
-    <span class="cp">%></span><span class="x"></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"inner()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">        inner, x is </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x">, y is </span><span class="cp">${</span><span class="n">y</span><span class="cp">}</span><span class="x"></span>
-<span class="x">    </span><span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-
-<span class="x">    outer, x is </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x">, y is </span><span class="cp">${</span><span class="n">y</span><span class="cp">}</span><span class="x"></span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>Assigning to a name inside of a def declares that name as local
-to the scope of that def (again, like Python itself). This means
-the following code will raise an error:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span>
-    <span class="n">x</span> <span class="o">=</span> <span class="mi">10</span>
-<span class="cp">%></span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"somedef()"</span><span class="cp">></span>
-    <span class="cp">## error !</span><span class="x"></span>
-<span class="x">    somedef, x is </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x"></span>
-<span class="x">    </span><span class="cp"><%</span>
-        <span class="n">x</span> <span class="o">=</span> <span class="mi">27</span>
-    <span class="cp">%></span><span class="x"></span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>...because the assignment to <tt class="docutils literal"><span class="pre">x</span></tt> declares <tt class="docutils literal"><span class="pre">x</span></tt> as local to the
-scope of <tt class="docutils literal"><span class="pre">somedef</span></tt>, rendering the “outer” version unreachable
-in the expression that tries to render it.</p>
-</div>
-<div class="section" id="calling-a-def-with-embedded-content-and-or-other-defs">
-<span id="defs-with-content"></span><h3>Calling a Def with Embedded Content and/or Other Defs<a class="headerlink" href="#calling-a-def-with-embedded-content-and-or-other-defs" title="Permalink to this headline">¶</a></h3>
-<p>A flip-side to def within def is a def call with content. This
-is where you call a def, and at the same time declare a block of
-content (or multiple blocks) that can be used by the def being
-called. The main point of such a call is to create custom,
-nestable tags, just like any other template language’s
-custom-tag creation system – where the external tag controls the
-execution of the nested tags and can communicate state to them.
-Only with Mako, you don’t have to use any external Python
-modules, you can define arbitrarily nestable tags right in your
-templates.</p>
-<p>To achieve this, the target def is invoked using the form
-<tt class="docutils literal"><span class="pre"><%namepacename:defname></span></tt> instead of the normal <tt class="docutils literal"><span class="pre">${}</span></tt>
-syntax. This syntax, introduced in Mako 0.2.3, is functionally
-equivalent to another tag known as <tt class="docutils literal"><span class="pre">%call</span></tt>, which takes the form
-<tt class="docutils literal"><span class="pre"><%call</span> <span class="pre">expr='namespacename.defname(args)'></span></tt>. While <tt class="docutils literal"><span class="pre">%call</span></tt>
-is available in all versions of Mako, the newer style is
-probably more familiar looking. The <tt class="docutils literal"><span class="pre">namespace</span></tt> portion of the
-call is the name of the <strong>namespace</strong> in which the def is
-defined – in the most simple cases, this can be <tt class="docutils literal"><span class="pre">local</span></tt> or
-<tt class="docutils literal"><span class="pre">self</span></tt> to reference the current template’s namespace (the
-difference between <tt class="docutils literal"><span class="pre">local</span></tt> and <tt class="docutils literal"><span class="pre">self</span></tt> is one of inheritance
-– see <a class="reference internal" href="namespaces.html#namespaces-builtin"><em>Built-in Namespaces</em></a> for details).</p>
-<p>When the target def is invoked, a variable <tt class="docutils literal"><span class="pre">caller</span></tt> is placed
-in its context which contains another namespace containing the
-body and other defs defined by the caller. The body itself is
-referenced by the method <tt class="docutils literal"><span class="pre">body()</span></tt>. Below, we build a <tt class="docutils literal"><span class="pre">%def</span></tt>
-that operates upon <tt class="docutils literal"><span class="pre">caller.body()</span></tt> to invoke the body of the
-custom tag:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"buildtable()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    <table></span>
-<span class="x">        <tr><td></span>
-<span class="x">            </span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x">        </td></tr></span>
-<span class="x">    </table></span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">self:buildtable</span><span class="cp">></span><span class="x"></span>
-<span class="x">    I am the table body.</span>
-<span class="cp"></%</span><span class="nb">self:buildtable</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>This produces the output (whitespace formatted):</p>
-<div class="highlight-html"><div class="highlight"><pre><span class="nt"><table></span>
-    <span class="nt"><tr><td></span>
-        I am the table body.
-    <span class="nt"></td></tr></span>
-<span class="nt"></table></span>
-</pre></div>
-</div>
-<p>Using the older <tt class="docutils literal"><span class="pre">%call</span></tt> syntax looks like:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"buildtable()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    <table></span>
-<span class="x">        <tr><td></span>
-<span class="x">            </span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x">        </td></tr></span>
-<span class="x">    </table></span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">call</span> <span class="na">expr=</span><span class="s">"buildtable()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    I am the table body.</span>
-<span class="cp"></%</span><span class="nb">call</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>The <tt class="docutils literal"><span class="pre">body()</span></tt> can be executed multiple times or not at all.
-This means you can use def-call-with-content to build iterators,
-conditionals, etc:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"lister(count)"</span><span class="cp">></span>
-    <span class="cp">%</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">count</span><span class="p">):</span><span class="x"></span>
-<span class="x">        </span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span>
-    <span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">self:lister</span> <span class="na">count=</span><span class="s">"${3}"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    hi</span>
-<span class="cp"></%</span><span class="nb">self:lister</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>Produces:</p>
-<div class="highlight-html"><div class="highlight"><pre>hi
-hi
-hi
-</pre></div>
-</div>
-<p>Notice above we pass <tt class="docutils literal"><span class="pre">3</span></tt> as a Python expression, so that it
-remains as an integer.</p>
-<p>A custom “conditional” tag:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"conditional(expression)"</span><span class="cp">></span>
-    <span class="cp">%</span> <span class="k">if</span> <span class="n">expression</span><span class="p">:</span><span class="x"></span>
-<span class="x">        </span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span>
-    <span class="cp">%</span><span class="k"> endif</span><span class="x"></span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">self:conditional</span> <span class="na">expression=</span><span class="s">"${4==4}"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    i'm the result</span>
-<span class="cp"></%</span><span class="nb">self:conditional</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>Produces:</p>
-<div class="highlight-html"><div class="highlight"><pre>i'm the result
-</pre></div>
-</div>
-<p>But that’s not all. The <tt class="docutils literal"><span class="pre">body()</span></tt> function also can handle
-arguments, which will augment the local namespace of the body
-callable. The caller must define the arguments which it expects
-to receive from its target def using the <tt class="docutils literal"><span class="pre">args</span></tt> attribute,
-which is a comma-separated list of argument names. Below, our
-<tt class="docutils literal"><span class="pre"><%def></span></tt> calls the <tt class="docutils literal"><span class="pre">body()</span></tt> of its caller, passing in an
-element of data from its argument:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"layoutdata(somedata)"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    <table></span>
-    <span class="cp">%</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">somedata</span><span class="p">:</span><span class="x"></span>
-<span class="x">        <tr></span>
-        <span class="cp">%</span> <span class="k">for</span> <span class="n">col</span> <span class="ow">in</span> <span class="n">item</span><span class="p">:</span><span class="x"></span>
-<span class="x">            <td></span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">body</span><span class="p">(</span><span class="n">col</span><span class="o">=</span><span class="n">col</span><span class="p">)</span><span class="cp">}</span><span class="x"></td></span>
-        <span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
-<span class="x">        </tr></span>
-    <span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
-<span class="x">    </table></span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">self:layoutdata</span> <span class="na">somedata=</span><span class="s">"${[[1,2,3],[4,5,6],[7,8,9]]}"</span> <span class="na">args=</span><span class="s">"col"</span><span class="cp">></span><span class="x">\</span>
-<span class="x">Body data: </span><span class="cp">${</span><span class="n">col</span><span class="cp">}</span><span class="x">\</span>
-<span class="cp"></%</span><span class="nb">self:layoutdata</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>Produces:</p>
-<div class="highlight-html"><div class="highlight"><pre><span class="nt"><table></span>
-    <span class="nt"><tr></span>
-        <span class="nt"><td></span>Body data: 1<span class="nt"></td></span>
-        <span class="nt"><td></span>Body data: 2<span class="nt"></td></span>
-        <span class="nt"><td></span>Body data: 3<span class="nt"></td></span>
-    <span class="nt"></tr></span>
-    <span class="nt"><tr></span>
-        <span class="nt"><td></span>Body data: 4<span class="nt"></td></span>
-        <span class="nt"><td></span>Body data: 5<span class="nt"></td></span>
-        <span class="nt"><td></span>Body data: 6<span class="nt"></td></span>
-    <span class="nt"></tr></span>
-    <span class="nt"><tr></span>
-        <span class="nt"><td></span>Body data: 7<span class="nt"></td></span>
-        <span class="nt"><td></span>Body data: 8<span class="nt"></td></span>
-        <span class="nt"><td></span>Body data: 9<span class="nt"></td></span>
-    <span class="nt"></tr></span>
-<span class="nt"></table></span>
-</pre></div>
-</div>
-<p>You don’t have to stick to calling just the <tt class="docutils literal"><span class="pre">body()</span></tt> function.
-The caller can define any number of callables, allowing the
-<tt class="docutils literal"><span class="pre"><%call></span></tt> tag to produce whole layouts:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"layout()"</span><span class="cp">></span>
-    <span class="cp">## a layout def</span><span class="x"></span>
-<span class="x">    <div class="mainlayout"></span>
-<span class="x">        <div class="header"></span>
-<span class="x">            </span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">header</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x">        </div></span>
-
-<span class="x">        <div class="sidebar"></span>
-<span class="x">            </span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">sidebar</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x">        </div></span>
-
-<span class="x">        <div class="content"></span>
-<span class="x">            </span><span class="cp">${</span><span class="n">caller</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x">        </div></span>
-<span class="x">    </div></span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span>
-
-<span class="cp">## calls the layout def</span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">self:layout</span><span class="cp">></span><span class="x"></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"header()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">        I am the header</span>
-<span class="x">    </span><span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"sidebar()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">        <ul></span>
-<span class="x">            <li>sidebar 1</li></span>
-<span class="x">            <li>sidebar 2</li></span>
-<span class="x">        </ul></span>
-<span class="x">    </span><span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-
-<span class="x">        this is the body</span>
-<span class="cp"></%</span><span class="nb">self:layout</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>The above layout would produce:</p>
-<div class="highlight-html"><div class="highlight"><pre><span class="nt"><div</span> <span class="na">class=</span><span class="s">"mainlayout"</span><span class="nt">></span>
-    <span class="nt"><div</span> <span class="na">class=</span><span class="s">"header"</span><span class="nt">></span>
-    I am the header
-    <span class="nt"></div></span>
-
-    <span class="nt"><div</span> <span class="na">class=</span><span class="s">"sidebar"</span><span class="nt">></span>
-    <span class="nt"><ul></span>
-        <span class="nt"><li></span>sidebar 1<span class="nt"></li></span>
-        <span class="nt"><li></span>sidebar 2<span class="nt"></li></span>
-    <span class="nt"></ul></span>
-    <span class="nt"></div></span>
-
-    <span class="nt"><div</span> <span class="na">class=</span><span class="s">"content"</span><span class="nt">></span>
-    this is the body
-    <span class="nt"></div></span>
-<span class="nt"></div></span>
-</pre></div>
-</div>
-<p>The number of things you can do with <tt class="docutils literal"><span class="pre"><%call></span></tt> and/or the
-<tt class="docutils literal"><span class="pre"><%namespacename:defname></span></tt> calling syntax is enormous. You can
-create form widget libraries, such as an enclosing <tt class="docutils literal"><span class="pre"><FORM></span></tt>
-tag and nested HTML input elements, or portable wrapping schemes
-using <tt class="docutils literal"><span class="pre"><div></span></tt> or other elements. You can create tags that
-interpret rows of data, such as from a database, providing the
-individual columns of each row to a <tt class="docutils literal"><span class="pre">body()</span></tt> callable which
-lays out the row any way it wants. Basically anything you’d do
-with a “custom tag” or tag library in some other system, Mako
-provides via <tt class="docutils literal"><span class="pre"><%def></span></tt> tags and plain Python callables which are
-invoked via <tt class="docutils literal"><span class="pre"><%namespacename:defname></span></tt> or <tt class="docutils literal"><span class="pre"><%call></span></tt>.</p>
-</div>
-</div>
-<div class="section" id="using-blocks">
-<span id="blocks"></span><h2>Using Blocks<a class="headerlink" href="#using-blocks" title="Permalink to this headline">¶</a></h2>
-<p>The <tt class="docutils literal"><span class="pre"><%block></span></tt> tag introduces some new twists on the
-<tt class="docutils literal"><span class="pre"><%def></span></tt> tag which make it more closely tailored towards layout.</p>
-<p class="versionadded">
-<span class="versionmodified">New in version 0.4.1.</span></p>
-<p>An example of a block:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><html></span>
-<span class="x">    <body></span>
-<span class="x">        </span><span class="cp"><%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="x">            this is a block.</span>
-<span class="x">        </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="x">    </body></span>
-<span class="x"></html></span>
-</pre></div>
-</div>
-<p>In the above example, we define a simple block.  The block renders its content in the place
-that it’s defined.  Since the block is called for us, it doesn’t need a name and the above
-is referred to as an <strong>anonymous block</strong>.  So the output of the above template will be:</p>
-<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span>
-    <span class="nt"><body></span>
-            this is a block.
-    <span class="nt"></body></span>
-<span class="nt"></html></span>
-</pre></div>
-</div>
-<p>So in fact the above block has absolutely no effect.  Its usefulness comes when we start
-using modifiers.  Such as, we can apply a filter to our block:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><html></span>
-<span class="x">    <body></span>
-<span class="x">        </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">filter=</span><span class="s">"h"</span><span class="cp">></span><span class="x"></span>
-<span class="x">            <html>this is some escaped html.</html></span>
-<span class="x">        </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="x">    </body></span>
-<span class="x"></html></span>
-</pre></div>
-</div>
-<p>or perhaps a caching directive:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><html></span>
-<span class="x">    <body></span>
-<span class="x">        </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">cached=</span><span class="s">"True"</span> <span class="na">cache_timeout=</span><span class="s">"60"</span><span class="cp">></span><span class="x"></span>
-<span class="x">            This content will be cached for 60 seconds.</span>
-<span class="x">        </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="x">    </body></span>
-<span class="x"></html></span>
-</pre></div>
-</div>
-<p>Blocks also work in iterations, conditionals, just like defs:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">%</span> <span class="k">if</span> <span class="n">some_condition</span><span class="p">:</span><span class="x"></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span><span class="cp">></span><span class="x">condition is met</span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span>
-<span class="cp">%</span><span class="k"> endif</span><span class="x"></span>
-</pre></div>
-</div>
-<p>While the block renders at the point it is defined in the template,
-the underlying function is present in the generated Python code only
-once, so there’s no issue with placing a block inside of a loop or
-similar. Anonymous blocks are defined as closures in the local
-rendering body, so have access to local variable scope:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">%</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">):</span><span class="x"></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span><span class="cp">></span><span class="x">i is </span><span class="cp">${</span><span class="n">i</span><span class="cp">}</%</span><span class="nb">block</span><span class="cp">></span>
-<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
-</pre></div>
-</div>
-<div class="section" id="using-named-blocks">
-<h3>Using Named Blocks<a class="headerlink" href="#using-named-blocks" title="Permalink to this headline">¶</a></h3>
-<p>Possibly the more important area where blocks are useful is when we
-do actually give them names. Named blocks are tailored to behave
-somewhat closely to Jinja2’s block tag, in that they define an area
-of a layout which can be overridden by an inheriting template. In
-sharp contrast to the <tt class="docutils literal"><span class="pre"><%def></span></tt> tag, the name given to a block is
-global for the entire template regardless of how deeply it’s nested:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><html></span>
-<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    <head></span>
-<span class="x">        <title></span>
-<span class="x">            </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"title"</span><span class="cp">></span><span class="x">Title</span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="x">        </title></span>
-<span class="x">    </head></span>
-<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="x"><body></span>
-<span class="x">    </span><span class="cp">${</span><span class="nb">next</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x"></body></span>
-<span class="x"></html></span>
-</pre></div>
-</div>
-<p>The above example has two named blocks “<tt class="docutils literal"><span class="pre">header</span></tt>” and “<tt class="docutils literal"><span class="pre">title</span></tt>”, both of which can be referred to
-by an inheriting template. A detailed walkthrough of this usage can be found at <a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</p>
-<p>Note above that named blocks don’t have any argument declaration the way defs do. They still implement themselves
-as Python functions, however, so they can be invoked additional times beyond their initial definition:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><div name="page"></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"pagecontrol"</span><span class="cp">></span><span class="x"></span>
-<span class="x">        <a href="">previous page</a> |</span>
-<span class="x">        <a href="">next page</a></span>
-<span class="x">    </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-
-<span class="x">    <table></span>
-<span class="x">        ## some content</span>
-<span class="x">    </table></span>
-
-<span class="x">    </span><span class="cp">${</span><span class="n">pagecontrol</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x"></div></span>
-</pre></div>
-</div>
-<p>The content referenced by <tt class="docutils literal"><span class="pre">pagecontrol</span></tt> above will be rendered both above and below the <tt class="docutils literal"><span class="pre"><table></span></tt> tags.</p>
-<p>To keep things sane, named blocks have restrictions that defs do not:</p>
-<ul class="simple">
-<li>The <tt class="docutils literal"><span class="pre"><%block></span></tt> declaration cannot have any argument signature.</li>
-<li>The name of a <tt class="docutils literal"><span class="pre"><%block></span></tt> can only be defined once in a template – an error is raised if two blocks of the same
-name occur anywhere in a single template, regardless of nesting.  A similar error is raised if a top level def
-shares the same name as that of a block.</li>
-<li>A named <tt class="docutils literal"><span class="pre"><%block></span></tt> cannot be defined within a <tt class="docutils literal"><span class="pre"><%def></span></tt>, or inside the body of a “call”, i.e.
-<tt class="docutils literal"><span class="pre"><%call></span></tt> or <tt class="docutils literal"><span class="pre"><%namespacename:defname></span></tt> tag.  Anonymous blocks can, however.</li>
-</ul>
-</div>
-<div class="section" id="using-page-arguments-in-named-blocks">
-<h3>Using Page Arguments in Named Blocks<a class="headerlink" href="#using-page-arguments-in-named-blocks" title="Permalink to this headline">¶</a></h3>
-<p>A named block is very much like a top level def. It has a similar
-restriction to these types of defs in that arguments passed to the
-template via the <tt class="docutils literal"><span class="pre"><%page></span></tt> tag aren’t automatically available.
-Using arguments with the <tt class="docutils literal"><span class="pre"><%page></span></tt> tag is described in the section
-<a class="reference internal" href="namespaces.html#namespaces-body"><em>The body() Method</em></a>, and refers to scenarios such as when the
-<tt class="docutils literal"><span class="pre">body()</span></tt> method of a template is called from an inherited template passing
-arguments, or the template is invoked from an <tt class="docutils literal"><span class="pre"><%include></span></tt> tag
-with arguments. To allow a named block to share the same arguments
-passed to the page, the <tt class="docutils literal"><span class="pre">args</span></tt> attribute can be used:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">args=</span><span class="s">"post"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="x"><a name="</span><span class="cp">${</span><span class="n">post</span><span class="o">.</span><span class="n">title</span><span class="cp">}</span><span class="x">" /></span>
-
-<span class="x"><span class="post_prose"></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"post_prose"</span> <span class="na">args=</span><span class="s">"post"</span><span class="cp">></span><span class="x"></span>
-<span class="x">        </span><span class="cp">${</span><span class="n">post</span><span class="o">.</span><span class="n">content</span><span class="cp">}</span><span class="x"></span>
-<span class="x">    </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="x"></span></span>
-</pre></div>
-</div>
-<p>Where above, if the template is called via a directive like
-<tt class="docutils literal"><span class="pre"><%include</span> <span class="pre">file="post.mako"</span> <span class="pre">args="post=post"</span> <span class="pre">/></span></tt>, the <tt class="docutils literal"><span class="pre">post</span></tt>
-variable is available both in the main body as well as the
-<tt class="docutils literal"><span class="pre">post_prose</span></tt> block.</p>
-<p>Similarly, the <tt class="docutils literal"><span class="pre">**pageargs</span></tt> variable is present, in named blocks only,
-for those arguments not explicit in the <tt class="docutils literal"><span class="pre"><%page></span></tt> tag:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"post_prose"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    </span><span class="cp">${</span><span class="n">pageargs</span><span class="p">[</span><span class="s">'post'</span><span class="p">]</span><span class="o">.</span><span class="n">content</span><span class="cp">}</span><span class="x"></span>
-<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>The <tt class="docutils literal"><span class="pre">args</span></tt> attribute is only allowed with named blocks. With
-anonymous blocks, the Python function is always rendered in the same
-scope as the call itself, so anything available directly outside the
-anonymous block is available inside as well.</p>
-</div>
-</div>
-</div>
-
-    </div>
-
-</div>
-
-<div id="docs-bottom-navigation" class="docs-navigation-links">
-        Previous:
-        <a href="syntax.html" title="previous chapter">Syntax</a>
-        Next:
-        <a href="runtime.html" title="next chapter">The Mako Runtime Environment</a>
-
-    <div id="docs-copyright">
-        © Copyright the Mako authors and contributors.
-        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
-        with Mako templates.
-    </div>
-</div>
-
-</div>
-
-<div class="clearfix">
-
-<hr/>
-
-<div class="copyright">Website content copyright © by Michael Bayer.
-    All rights reserved.  Mako and its documentation are licensed
-    under the MIT license.  mike(&)zzzcomputing.com</div>
-
-</div>
-</div>
-</body>
-</html>
diff --git a/lib/mako-0.7.2/doc/filtering.html b/lib/mako-0.7.2/doc/filtering.html
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/filtering.html
+++ /dev/null
@@ -1,476 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
-<head>
-<title>
-    
-                Filtering and Buffering
-             — 
-    Mako 0.7.2 Documentation
-</title>
-
-    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
-
-    <script type="text/javascript">
-      var DOCUMENTATION_OPTIONS = {
-          URL_ROOT:    '#',
-          VERSION:     '0.7.2',
-          COLLAPSE_MODINDEX: false,
-          FILE_SUFFIX: '.html'
-      };
-    </script>
-        <script type="text/javascript" src="_static/jquery.js"></script>
-        <script type="text/javascript" src="_static/underscore.js"></script>
-        <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
-    <link rel="top" title="Mako 0.7.2 Documentation" href="index.html" />
-        <link rel="next" title="The Unicode Chapter" href="unicode.html" />
-        <link rel="prev" title="Inheritance" href="inheritance.html" />
-
-<link rel="stylesheet" href="_static/site.css"></link>
-
-
-</head>
-<body>
-    <div id="wrap">
-    <div class="rightbar">
-    <div class="slogan">
-    Hyperfast and lightweight templating for the Python platform.
-    </div>
-
-
-    </div>
-
-    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
-
-    <hr/>
-
-    
-
-
-
-
-
-
-
-
-
-<div id="docs-container">
-
-
-
-<div id="docs-header">
-    <h1>Mako 0.7.2 Documentation</h1>
-
-    <div id="docs-search">
-    Search:
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </div>
-
-    <div id="docs-version-header">
-        Release: <span class="version-num">0.7.2</span>
-
-    </div>
-
-</div>
-
-<div id="docs-top-navigation">
-    <div id="docs-top-page-control" class="docs-navigation-links">
-        <ul>
-            <li>Prev:
-            <a href="inheritance.html" title="previous chapter">Inheritance</a>
-            </li>
-            <li>Next:
-            <a href="unicode.html" title="next chapter">The Unicode Chapter</a>
-            </li>
-
-        <li>
-            <a href="index.html">Table of Contents</a> |
-            <a href="genindex.html">Index</a>
-            | <a href="_sources/filtering.txt">view source
-        </li>
-        </ul>
-    </div>
-
-    <div id="docs-navigation-banner">
-        <a href="index.html">Mako 0.7.2 Documentation</a>
-        » 
-                Filtering and Buffering
-             
-
-        <h2>
-            
-                Filtering and Buffering
-            
-        </h2>
-    </div>
-
-</div>
-
-<div id="docs-body-container">
-
-    <div id="docs-sidebar">
-    <h3><a href="index.html">Table of Contents</a></h3>
-    <ul>
-<li><a class="reference internal" href="#">Filtering and Buffering</a><ul>
-<li><a class="reference internal" href="#expression-filtering">Expression Filtering</a><ul>
-<li><a class="reference internal" href="#the-default-filters-argument">The <tt class="docutils literal"><span class="pre">default_filters</span></tt> Argument</a></li>
-<li><a class="reference internal" href="#turning-off-filtering-with-the-n-filter">Turning off Filtering with the <tt class="docutils literal"><span class="pre">n</span></tt> Filter</a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#filtering-defs-and-blocks">Filtering Defs and Blocks</a></li>
-<li><a class="reference internal" href="#buffering">Buffering</a></li>
-<li><a class="reference internal" href="#decorating">Decorating</a></li>
-</ul>
-</li>
-</ul>
-
-
-    <h4>Previous Topic</h4>
-    <p>
-    <a href="inheritance.html" title="previous chapter">Inheritance</a>
-    </p>
-    <h4>Next Topic</h4>
-    <p>
-    <a href="unicode.html" title="next chapter">The Unicode Chapter</a>
-    </p>
-
-    <h4>Quick Search</h4>
-    <p>
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </p>
-
-    </div>
-
-    <div id="docs-body" class="withsidebar" >
-        
-<div class="section" id="filtering-and-buffering">
-<span id="filtering-toplevel"></span><h1>Filtering and Buffering<a class="headerlink" href="#filtering-and-buffering" title="Permalink to this headline">¶</a></h1>
-<div class="section" id="expression-filtering">
-<h2>Expression Filtering<a class="headerlink" href="#expression-filtering" title="Permalink to this headline">¶</a></h2>
-<p>As described in the chapter <a class="reference internal" href="syntax.html"><em>Syntax</em></a>, the “<tt class="docutils literal"><span class="pre">|</span></tt>” operator can be
-applied to a “<tt class="docutils literal"><span class="pre">${}</span></tt>” expression to apply escape filters to the
-output:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">"this is some text"</span> <span class="o">|</span> <span class="n">u</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>The above expression applies URL escaping to the expression, and
-produces <tt class="docutils literal"><span class="pre">this+is+some+text</span></tt>.</p>
-<p>The built-in escape flags are:</p>
-<ul>
-<li><p class="first"><tt class="docutils literal"><span class="pre">u</span></tt> : URL escaping, provided by
-<tt class="docutils literal"><span class="pre">urllib.quote_plus(string.encode('utf-8'))</span></tt></p>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">h</span></tt> : HTML escaping, provided by
-<tt class="docutils literal"><span class="pre">markupsafe.escape(string)</span></tt></p>
-<p class="versionadded">
-<span class="versionmodified">New in version 0.3.4: </span>Prior versions use <tt class="docutils literal"><span class="pre">cgi.escape(string,</span> <span class="pre">True)</span></tt>.</p>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">x</span></tt> : XML escaping</p>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">trim</span></tt> : whitespace trimming, provided by <tt class="docutils literal"><span class="pre">string.strip()</span></tt></p>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">entity</span></tt> : produces HTML entity references for applicable
-strings, derived from <tt class="docutils literal"><span class="pre">htmlentitydefs</span></tt></p>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">unicode</span></tt> (<tt class="docutils literal"><span class="pre">str</span></tt> on Python 3): produces a Python unicode
-string (this function is applied by default)</p>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">decode.<some</span> <span class="pre">encoding></span></tt>: decode input into a Python
-unicode with the specified encoding</p>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">n</span></tt> : disable all default filtering; only filters specified
-in the local expression tag will be applied.</p>
-</li>
-</ul>
-<p>To apply more than one filter, separate them by a comma:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">" <tag>some value</tag> "</span> <span class="o">|</span> <span class="n">h</span><span class="p">,</span><span class="n">trim</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>The above produces <tt class="docutils literal"><span class="pre">&lt;tag&gt;some</span> <span class="pre">value&lt;/tag&gt;</span></tt>, with
-no leading or trailing whitespace. The HTML escaping function is
-applied first, the “trim” function second.</p>
-<p>Naturally, you can make your own filters too. A filter is just a
-Python function that accepts a single string argument, and
-returns the filtered result. The expressions after the <tt class="docutils literal"><span class="pre">|</span></tt>
-operator draw upon the local namespace of the template in which
-they appear, meaning you can define escaping functions locally:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%!</span>
-    <span class="k">def</span> <span class="nf">myescape</span><span class="p">(</span><span class="n">text</span><span class="p">):</span>
-        <span class="k">return</span> <span class="s">"<TAG>"</span> <span class="o">+</span> <span class="n">text</span> <span class="o">+</span> <span class="s">"</TAG>"</span>
-<span class="cp">%></span><span class="x"></span>
-
-<span class="x">Here's some tagged text: </span><span class="cp">${</span><span class="s">"text"</span> <span class="o">|</span> <span class="n">myescape</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>Or from any Python module:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%!</span>
-    <span class="kn">import</span> <span class="nn">myfilters</span>
-<span class="cp">%></span><span class="x"></span>
-
-<span class="x">Here's some tagged text: </span><span class="cp">${</span><span class="s">"text"</span> <span class="o">|</span> <span class="n">myfilters</span><span class="o">.</span><span class="n">tagfilter</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>A page can apply a default set of filters to all expression tags
-using the <tt class="docutils literal"><span class="pre">expression_filter</span></tt> argument to the <tt class="docutils literal"><span class="pre">%page</span></tt> tag:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">expression_filter=</span><span class="s">"h"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="x">Escaped text:  </span><span class="cp">${</span><span class="s">"<html>some html</html>"</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>Result:</p>
-<div class="highlight-html"><div class="highlight"><pre>Escaped text: <span class="ni">&lt;</span>html<span class="ni">&gt;</span>some html<span class="ni">&lt;</span>/html<span class="ni">&gt;</span>
-</pre></div>
-</div>
-<div class="section" id="the-default-filters-argument">
-<span id="filtering-default-filters"></span><h3>The <tt class="docutils literal"><span class="pre">default_filters</span></tt> Argument<a class="headerlink" href="#the-default-filters-argument" title="Permalink to this headline">¶</a></h3>
-<p>In addition to the <tt class="docutils literal"><span class="pre">expression_filter</span></tt> argument, the
-<tt class="docutils literal"><span class="pre">default_filters</span></tt> argument to both <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> and
-<a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> can specify filtering for all expression tags
-at the programmatic level. This array-based argument, when given
-its default argument of <tt class="docutils literal"><span class="pre">None</span></tt>, will be internally set to
-<tt class="docutils literal"><span class="pre">["unicode"]</span></tt> (or <tt class="docutils literal"><span class="pre">["str"]</span></tt> on Python 3), except when
-<tt class="docutils literal"><span class="pre">disable_unicode=True</span></tt> is set in which case it defaults to
-<tt class="docutils literal"><span class="pre">["str"]</span></tt>:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/tmp'</span><span class="p">],</span> <span class="n">default_filters</span><span class="o">=</span><span class="p">[</span><span class="s">'unicode'</span><span class="p">])</span>
-</pre></div>
-</div>
-<p>To replace the usual <tt class="docutils literal"><span class="pre">unicode</span></tt>/<tt class="docutils literal"><span class="pre">str</span></tt> function with a
-specific encoding, the <tt class="docutils literal"><span class="pre">decode</span></tt> filter can be substituted:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/tmp'</span><span class="p">],</span> <span class="n">default_filters</span><span class="o">=</span><span class="p">[</span><span class="s">'decode.utf8'</span><span class="p">])</span>
-</pre></div>
-</div>
-<p>To disable <tt class="docutils literal"><span class="pre">default_filters</span></tt> entirely, set it to an empty
-list:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/tmp'</span><span class="p">],</span> <span class="n">default_filters</span><span class="o">=</span><span class="p">[])</span>
-</pre></div>
-</div>
-<p>Any string name can be added to <tt class="docutils literal"><span class="pre">default_filters</span></tt> where it
-will be added to all expressions as a filter. The filters are
-applied from left to right, meaning the leftmost filter is
-applied first.</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="n">templatetext</span><span class="p">,</span> <span class="n">default_filters</span><span class="o">=</span><span class="p">[</span><span class="s">'unicode'</span><span class="p">,</span> <span class="s">'myfilter'</span><span class="p">])</span>
-</pre></div>
-</div>
-<p>To ease the usage of <tt class="docutils literal"><span class="pre">default_filters</span></tt> with custom filters,
-you can also add imports (or other code) to all templates using
-the <tt class="docutils literal"><span class="pre">imports</span></tt> argument:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/tmp'</span><span class="p">],</span>
-                   <span class="n">default_filters</span><span class="o">=</span><span class="p">[</span><span class="s">'unicode'</span><span class="p">,</span> <span class="s">'myfilter'</span><span class="p">],</span>
-                   <span class="n">imports</span><span class="o">=</span><span class="p">[</span><span class="s">'from mypackage import myfilter'</span><span class="p">])</span>
-</pre></div>
-</div>
-<p>The above will generate templates something like this:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># ....</span>
-<span class="kn">from</span> <span class="nn">mypackage</span> <span class="kn">import</span> <span class="n">myfilter</span>
-
-<span class="k">def</span> <span class="nf">render_body</span><span class="p">(</span><span class="n">context</span><span class="p">):</span>
-    <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">myfilter</span><span class="p">(</span><span class="nb">unicode</span><span class="p">(</span><span class="s">"some text"</span><span class="p">)))</span>
-</pre></div>
-</div>
-</div>
-<div class="section" id="turning-off-filtering-with-the-n-filter">
-<h3>Turning off Filtering with the <tt class="docutils literal"><span class="pre">n</span></tt> Filter<a class="headerlink" href="#turning-off-filtering-with-the-n-filter" title="Permalink to this headline">¶</a></h3>
-<p>In all cases the special <tt class="docutils literal"><span class="pre">n</span></tt> filter, used locally within an
-expression, will <strong>disable</strong> all filters declared in the
-<tt class="docutils literal"><span class="pre"><%page></span></tt> tag as well as in <tt class="docutils literal"><span class="pre">default_filters</span></tt>. Such as:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">'myexpression'</span> <span class="o">|</span> <span class="n">n</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>will render <tt class="docutils literal"><span class="pre">myexpression</span></tt> with no filtering of any kind, and:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">'myexpression'</span> <span class="o">|</span> <span class="n">n</span><span class="p">,</span><span class="n">trim</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>will render <tt class="docutils literal"><span class="pre">myexpression</span></tt> using the <tt class="docutils literal"><span class="pre">trim</span></tt> filter only.</p>
-</div>
-</div>
-<div class="section" id="filtering-defs-and-blocks">
-<h2>Filtering Defs and Blocks<a class="headerlink" href="#filtering-defs-and-blocks" title="Permalink to this headline">¶</a></h2>
-<p>The <tt class="docutils literal"><span class="pre">%def</span></tt> and <tt class="docutils literal"><span class="pre">%block</span></tt> tags have an argument called <tt class="docutils literal"><span class="pre">filter</span></tt> which will apply the
-given list of filter functions to the output of the <tt class="docutils literal"><span class="pre">%def</span></tt>:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"foo()"</span> <span class="na">filter=</span><span class="s">"h, trim"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    <b>this is bold</b></span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>When the <tt class="docutils literal"><span class="pre">filter</span></tt> attribute is applied to a def as above, the def
-is automatically <strong>buffered</strong> as well. This is described next.</p>
-</div>
-<div class="section" id="buffering">
-<h2>Buffering<a class="headerlink" href="#buffering" title="Permalink to this headline">¶</a></h2>
-<p>One of Mako’s central design goals is speed. To this end, all of
-the textual content within a template and its various callables
-is by default piped directly to the single buffer that is stored
-within the <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object. While this normally is easy to
-miss, it has certain side effects. The main one is that when you
-call a def using the normal expression syntax, i.e.
-<tt class="docutils literal"><span class="pre">${somedef()}</span></tt>, it may appear that the return value of the
-function is the content it produced, which is then delivered to
-your template just like any other expression substitution,
-except that normally, this is not the case; the return value of
-<tt class="docutils literal"><span class="pre">${somedef()}</span></tt> is simply the empty string <tt class="docutils literal"><span class="pre">''</span></tt>. By the time
-you receive this empty string, the output of <tt class="docutils literal"><span class="pre">somedef()</span></tt> has
-been sent to the underlying buffer.</p>
-<p>You may not want this effect, if for example you are doing
-something like this:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">" results "</span> <span class="o">+</span> <span class="n">somedef</span><span class="p">()</span> <span class="o">+</span> <span class="s">" more results "</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>If the <tt class="docutils literal"><span class="pre">somedef()</span></tt> function produced the content “<tt class="docutils literal"><span class="pre">somedef's</span>
-<span class="pre">results</span></tt>”, the above template would produce this output:</p>
-<div class="highlight-html"><div class="highlight"><pre>somedef's results results more results
-</pre></div>
-</div>
-<p>This is because <tt class="docutils literal"><span class="pre">somedef()</span></tt> fully executes before the
-expression returns the results of its concatenation; the
-concatenation in turn receives just the empty string as its
-middle expression.</p>
-<p>Mako provides two ways to work around this. One is by applying
-buffering to the <tt class="docutils literal"><span class="pre">%def</span></tt> itself:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"somedef()"</span> <span class="na">buffered=</span><span class="s">"True"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    somedef's results</span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>The above definition will generate code similar to this:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">somedef</span><span class="p">():</span>
-    <span class="n">context</span><span class="o">.</span><span class="n">push_buffer</span><span class="p">()</span>
-    <span class="k">try</span><span class="p">:</span>
-        <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"somedef's results"</span><span class="p">)</span>
-    <span class="k">finally</span><span class="p">:</span>
-        <span class="n">buf</span> <span class="o">=</span> <span class="n">context</span><span class="o">.</span><span class="n">pop_buffer</span><span class="p">()</span>
-    <span class="k">return</span> <span class="n">buf</span><span class="o">.</span><span class="n">getvalue</span><span class="p">()</span>
-</pre></div>
-</div>
-<p>So that the content of <tt class="docutils literal"><span class="pre">somedef()</span></tt> is sent to a second buffer,
-which is then popped off the stack and its value returned. The
-speed hit inherent in buffering the output of a def is also
-apparent.</p>
-<p>Note that the <tt class="docutils literal"><span class="pre">filter</span></tt> argument on <tt class="docutils literal"><span class="pre">%def</span></tt> also causes the def to
-be buffered. This is so that the final content of the <tt class="docutils literal"><span class="pre">%def</span></tt> can
-be delivered to the escaping function in one batch, which
-reduces method calls and also produces more deterministic
-behavior for the filtering function itself, which can possibly
-be useful for a filtering function that wishes to apply a
-transformation to the text as a whole.</p>
-<p>The other way to buffer the output of a def or any Mako callable
-is by using the built-in <tt class="docutils literal"><span class="pre">capture</span></tt> function. This function
-performs an operation similar to the above buffering operation
-except it is specified by the caller.</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">" results "</span> <span class="o">+</span> <span class="n">capture</span><span class="p">(</span><span class="n">somedef</span><span class="p">)</span> <span class="o">+</span> <span class="s">" more results "</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>Note that the first argument to the <tt class="docutils literal"><span class="pre">capture</span></tt> function is
-<strong>the function itself</strong>, not the result of calling it. This is
-because the <tt class="docutils literal"><span class="pre">capture</span></tt> function takes over the job of actually
-calling the target function, after setting up a buffered
-environment. To send arguments to the function, just send them
-to <tt class="docutils literal"><span class="pre">capture</span></tt> instead:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="n">capture</span><span class="p">(</span><span class="n">somedef</span><span class="p">,</span> <span class="mi">17</span><span class="p">,</span> <span class="s">'hi'</span><span class="p">,</span> <span class="n">use_paging</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>The above call is equivalent to the unbuffered call:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="n">somedef</span><span class="p">(</span><span class="mi">17</span><span class="p">,</span> <span class="s">'hi'</span><span class="p">,</span> <span class="n">use_paging</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-</div>
-<div class="section" id="decorating">
-<h2>Decorating<a class="headerlink" href="#decorating" title="Permalink to this headline">¶</a></h2>
-<p class="versionadded">
-<span class="versionmodified">New in version 0.2.5.</span></p>
-<p>Somewhat like a filter for a <tt class="docutils literal"><span class="pre">%def</span></tt> but more flexible, the <tt class="docutils literal"><span class="pre">decorator</span></tt>
-argument to <tt class="docutils literal"><span class="pre">%def</span></tt> allows the creation of a function that will
-work in a similar manner to a Python decorator. The function can
-control whether or not the function executes. The original
-intent of this function is to allow the creation of custom cache
-logic, but there may be other uses as well.</p>
-<p><tt class="docutils literal"><span class="pre">decorator</span></tt> is intended to be used with a regular Python
-function, such as one defined in a library module. Here we’ll
-illustrate the python function defined in the template for
-simplicities’ sake:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%!</span>
-    <span class="k">def</span> <span class="nf">bar</span><span class="p">(</span><span class="n">fn</span><span class="p">):</span>
-        <span class="k">def</span> <span class="nf">decorate</span><span class="p">(</span><span class="n">context</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
-            <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"BAR"</span><span class="p">)</span>
-            <span class="n">fn</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">)</span>
-            <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"BAR"</span><span class="p">)</span>
-            <span class="k">return</span> <span class="s">''</span>
-        <span class="k">return</span> <span class="n">decorate</span>
-<span class="cp">%></span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"foo()"</span> <span class="na">decorator=</span><span class="s">"bar"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    this is foo</span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-
-<span class="cp">${</span><span class="n">foo</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>The above template will return, with more whitespace than this,
-<tt class="docutils literal"><span class="pre">"BAR</span> <span class="pre">this</span> <span class="pre">is</span> <span class="pre">foo</span> <span class="pre">BAR"</span></tt>. The function is the render callable
-itself (or possibly a wrapper around it), and by default will
-write to the context. To capture its output, use the <a class="reference internal" href="namespaces.html#mako.runtime.capture" title="mako.runtime.capture"><tt class="xref py py-func docutils literal"><span class="pre">capture()</span></tt></a>
-callable in the <tt class="docutils literal"><span class="pre">mako.runtime</span></tt> module (available in templates
-as just <tt class="docutils literal"><span class="pre">runtime</span></tt>):</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%!</span>
-    <span class="k">def</span> <span class="nf">bar</span><span class="p">(</span><span class="n">fn</span><span class="p">):</span>
-        <span class="k">def</span> <span class="nf">decorate</span><span class="p">(</span><span class="n">context</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
-            <span class="k">return</span> <span class="s">"BAR"</span> <span class="o">+</span> <span class="n">runtime</span><span class="o">.</span><span class="n">capture</span><span class="p">(</span><span class="n">context</span><span class="p">,</span> <span class="n">fn</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">)</span> <span class="o">+</span> <span class="s">"BAR"</span>
-        <span class="k">return</span> <span class="n">decorate</span>
-<span class="cp">%></span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"foo()"</span> <span class="na">decorator=</span><span class="s">"bar"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    this is foo</span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-
-<span class="cp">${</span><span class="n">foo</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>The decorator can be used with top-level defs as well as nested
-defs, and blocks too. Note that when calling a top-level def from the
-<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> API, i.e. <tt class="docutils literal"><span class="pre">template.get_def('somedef').render()</span></tt>,
-the decorator has to write the output to the <tt class="docutils literal"><span class="pre">context</span></tt>, i.e.
-as in the first example. The return value gets discarded.</p>
-</div>
-</div>
-
-    </div>
-
-</div>
-
-<div id="docs-bottom-navigation" class="docs-navigation-links">
-        Previous:
-        <a href="inheritance.html" title="previous chapter">Inheritance</a>
-        Next:
-        <a href="unicode.html" title="next chapter">The Unicode Chapter</a>
-
-    <div id="docs-copyright">
-        © Copyright the Mako authors and contributors.
-        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
-        with Mako templates.
-    </div>
-</div>
-
-</div>
-
-<div class="clearfix">
-
-<hr/>
-
-<div class="copyright">Website content copyright © by Michael Bayer.
-    All rights reserved.  Mako and its documentation are licensed
-    under the MIT license.  mike(&)zzzcomputing.com</div>
-
-</div>
-</div>
-</body>
-</html>
diff --git a/lib/mako-0.7.2/doc/genindex.html b/lib/mako-0.7.2/doc/genindex.html
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/genindex.html
+++ /dev/null
@@ -1,914 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
-<head>
-<title>
-    
-    Index
- — 
-    Mako 0.7.2 Documentation
-</title>
-
-    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
-
-    <script type="text/javascript">
-      var DOCUMENTATION_OPTIONS = {
-          URL_ROOT:    '#',
-          VERSION:     '0.7.2',
-          COLLAPSE_MODINDEX: false,
-          FILE_SUFFIX: '.html'
-      };
-    </script>
-        <script type="text/javascript" src="_static/jquery.js"></script>
-        <script type="text/javascript" src="_static/underscore.js"></script>
-        <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="index" title="Index" href="#" />
-    <link rel="search" title="Search" href="search.html" />
-    <link rel="top" title="Mako 0.7.2 Documentation" href="index.html" />
-
-<link rel="stylesheet" href="_static/site.css"></link>
-
-
-</head>
-<body>
-    <div id="wrap">
-    <div class="rightbar">
-    <div class="slogan">
-    Hyperfast and lightweight templating for the Python platform.
-    </div>
-
-
-    </div>
-
-    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
-
-    <hr/>
-
-    
-
-
-
-
-
-
-
-
-
-<div id="docs-container">
-
-
-
-<div id="docs-header">
-    <h1>Mako 0.7.2 Documentation</h1>
-
-    <div id="docs-search">
-    Search:
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </div>
-
-    <div id="docs-version-header">
-        Release: <span class="version-num">0.7.2</span>
-
-    </div>
-
-</div>
-
-<div id="docs-top-navigation">
-    <div id="docs-top-page-control" class="docs-navigation-links">
-        <ul>
-
-        <li>
-            <a href="index.html">Table of Contents</a> |
-            <a href="#">Index</a>
-        </li>
-        </ul>
-    </div>
-
-    <div id="docs-navigation-banner">
-        <a href="index.html">Mako 0.7.2 Documentation</a>
-        » 
-    Index
- 
-
-        <h2>
-            
-    Index
-
-        </h2>
-    </div>
-
-</div>
-
-<div id="docs-body-container">
-
-
-    <div id="docs-body" class="" >
-        
-
-
-
-   <h1 id="index">Index</h1>
-
-    <a href="#A"><strong>A</strong></a>
-    | <a href="#B"><strong>B</strong></a>
-    | <a href="#C"><strong>C</strong></a>
-    | <a href="#D"><strong>D</strong></a>
-    | <a href="#E"><strong>E</strong></a>
-    | <a href="#F"><strong>F</strong></a>
-    | <a href="#G"><strong>G</strong></a>
-    | <a href="#H"><strong>H</strong></a>
-    | <a href="#I"><strong>I</strong></a>
-    | <a href="#K"><strong>K</strong></a>
-    | <a href="#L"><strong>L</strong></a>
-    | <a href="#M"><strong>M</strong></a>
-    | <a href="#N"><strong>N</strong></a>
-    | <a href="#P"><strong>P</strong></a>
-    | <a href="#R"><strong>R</strong></a>
-    | <a href="#S"><strong>S</strong></a>
-    | <a href="#T"><strong>T</strong></a>
-    | <a href="#U"><strong>U</strong></a>
-    | <a href="#W"><strong>W</strong></a>
-
-   <hr />
-
-<h2 id="A">A</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="usage.html#mako.lookup.TemplateCollection.adjust_uri">adjust_uri() (mako.lookup.TemplateCollection method)</a>
-</dt>
-
-    <dd><dl>
-      <dt><a href="usage.html#mako.lookup.TemplateLookup.adjust_uri">(mako.lookup.TemplateLookup method)</a>
-      </dt>
-    </dl></dd>
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-
-<dt>
-        <a href="namespaces.html#mako.runtime.Namespace.attr">attr (mako.runtime.Namespace attribute)</a>
-</dt>
-
-
-  
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="B">B</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="caching.html#mako.ext.beaker_cache.BeakerCacheImpl">BeakerCacheImpl (class in mako.ext.beaker_cache)</a>
-</dt>
-
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="C">C</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="caching.html#mako.cache.Cache">Cache (class in mako.cache)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="namespaces.html#mako.runtime.Namespace.cache">cache (mako.runtime.Namespace attribute)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="caching.html#mako.cache.CacheImpl">CacheImpl (class in mako.cache)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="namespaces.html#mako.runtime.capture">capture() (in module mako.runtime)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="usage.html#mako.template.Template.code">code (mako.template.Template attribute)</a>
-</dt>
-
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-
-<dt>
-        <a href="runtime.html#mako.runtime.Context">Context (class in mako.runtime)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="namespaces.html#mako.runtime.Namespace.context">context (mako.runtime.Namespace attribute)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="runtime.html#mako.runtime.LoopContext.cycle">cycle() (mako.runtime.LoopContext method)</a>
-</dt>
-
-
-  
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="D">D</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="usage.html#mako.template.DefTemplate">DefTemplate (class in mako.template)</a>
-</dt>
-
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="E">E</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="usage.html#RichTraceback.error">error (RichTraceback attribute)</a>
-</dt>
-
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="F">F</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="namespaces.html#mako.runtime.ModuleNamespace.filename">filename (mako.runtime.ModuleNamespace attribute)</a>
-</dt>
-
-    <dd><dl>
-      <dt><a href="namespaces.html#mako.runtime.Namespace.filename">(mako.runtime.Namespace attribute)</a>
-      </dt>
-      <dt><a href="namespaces.html#mako.runtime.TemplateNamespace.filename">(mako.runtime.TemplateNamespace attribute)</a>
-      </dt>
-    </dl></dd>
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-
-<dt>
-        <a href="usage.html#mako.lookup.TemplateCollection.filename_to_uri">filename_to_uri() (mako.lookup.TemplateCollection method)</a>
-</dt>
-
-    <dd><dl>
-      <dt><a href="usage.html#mako.lookup.TemplateLookup.filename_to_uri">(mako.lookup.TemplateLookup method)</a>
-      </dt>
-    </dl></dd>
-
-  
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="G">G</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="caching.html#mako.cache.Cache.get">get() (mako.cache.Cache method)</a>
-</dt>
-
-    <dd><dl>
-      <dt><a href="caching.html#mako.cache.CacheImpl.get">(mako.cache.CacheImpl method)</a>
-      </dt>
-      <dt><a href="runtime.html#mako.runtime.Context.get">(mako.runtime.Context method)</a>
-      </dt>
-    </dl></dd>
-
-  
-
-
-<dt>
-        <a href="namespaces.html#mako.runtime.Namespace.get_cached">get_cached() (mako.runtime.Namespace method)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="usage.html#mako.template.Template.get_def">get_def() (mako.template.Template method)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="namespaces.html#mako.runtime.Namespace.get_namespace">get_namespace() (mako.runtime.Namespace method)</a>
-</dt>
-
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-
-<dt>
-        <a href="caching.html#mako.cache.Cache.get_or_create">get_or_create() (mako.cache.Cache method)</a>
-</dt>
-
-    <dd><dl>
-      <dt><a href="caching.html#mako.cache.CacheImpl.get_or_create">(mako.cache.CacheImpl method)</a>
-      </dt>
-    </dl></dd>
-
-  
-
-
-<dt>
-        <a href="usage.html#mako.lookup.TemplateCollection.get_template">get_template() (mako.lookup.TemplateCollection method)</a>
-</dt>
-
-    <dd><dl>
-      <dt><a href="usage.html#mako.lookup.TemplateLookup.get_template">(mako.lookup.TemplateLookup method)</a>
-      </dt>
-      <dt><a href="namespaces.html#mako.runtime.Namespace.get_template">(mako.runtime.Namespace method)</a>
-      </dt>
-    </dl></dd>
-
-  
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="H">H</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="usage.html#mako.lookup.TemplateCollection.has_template">has_template() (mako.lookup.TemplateCollection method)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="usage.html#mako.exceptions.html_error_template">html_error_template() (in module mako.exceptions)</a>
-</dt>
-
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="I">I</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="caching.html#mako.cache.Cache.id">id (mako.cache.Cache attribute)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="caching.html#mako.cache.Cache.impl">impl (mako.cache.Cache attribute)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="namespaces.html#mako.runtime.Namespace.include_file">include_file() (mako.runtime.Namespace method)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="caching.html#mako.cache.Cache.invalidate">invalidate() (mako.cache.Cache method)</a>
-</dt>
-
-    <dd><dl>
-      <dt><a href="caching.html#mako.cache.CacheImpl.invalidate">(mako.cache.CacheImpl method)</a>
-      </dt>
-    </dl></dd>
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-
-<dt>
-        <a href="caching.html#mako.cache.Cache.invalidate_body">invalidate_body() (mako.cache.Cache method)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="caching.html#mako.cache.Cache.invalidate_closure">invalidate_closure() (mako.cache.Cache method)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="caching.html#mako.cache.Cache.invalidate_def">invalidate_def() (mako.cache.Cache method)</a>
-</dt>
-
-
-  
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="K">K</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="runtime.html#mako.runtime.Context.keys">keys() (mako.runtime.Context method)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="runtime.html#mako.runtime.Context.kwargs">kwargs (mako.runtime.Context attribute)</a>
-</dt>
-
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="L">L</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="usage.html#RichTraceback.lineno">lineno (RichTraceback attribute)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="runtime.html#mako.runtime.Context.locals_">locals_() (mako.runtime.Context method)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="runtime.html#mako.runtime.Context.lookup">lookup (mako.runtime.Context attribute)</a>
-</dt>
-
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-
-<dt>
-        <a href="runtime.html#mako.runtime.LoopContext">LoopContext (class in mako.runtime)</a>
-</dt>
-
-
-  
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="M">M</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="usage.html#RichTraceback.message">message (RichTraceback attribute)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="namespaces.html#mako.runtime.Namespace.module">module (mako.runtime.Namespace attribute)</a>
-</dt>
-
-    <dd><dl>
-      <dt><a href="namespaces.html#mako.runtime.TemplateNamespace.module">(mako.runtime.TemplateNamespace attribute)</a>
-      </dt>
-    </dl></dd>
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-
-<dt>
-        <a href="namespaces.html#mako.runtime.ModuleNamespace">ModuleNamespace (class in mako.runtime)</a>
-</dt>
-
-
-  
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="N">N</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="namespaces.html#mako.runtime.Namespace">Namespace (class in mako.runtime)</a>
-</dt>
-
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="P">P</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="caching.html#mako.cache.CacheImpl.pass_context">pass_context (mako.cache.CacheImpl attribute)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="runtime.html#mako.runtime.Context.pop_caller">pop_caller() (mako.runtime.Context method)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="runtime.html#mako.runtime.Context.push_caller">push_caller() (mako.runtime.Context method)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="caching.html#mako.cache.Cache.put">put() (mako.cache.Cache method)</a>
-</dt>
-
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-
-<dt>
-        <a href="usage.html#mako.lookup.TemplateLookup.put_string">put_string() (mako.lookup.TemplateLookup method)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="usage.html#mako.lookup.TemplateLookup.put_template">put_template() (mako.lookup.TemplateLookup method)</a>
-</dt>
-
-
-  
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="R">R</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="usage.html#RichTraceback.records">records (RichTraceback attribute)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="caching.html#mako.cache.register_plugin">register_plugin() (in module mako.cache)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="usage.html#mako.template.Template.render">render() (mako.template.Template method)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="usage.html#mako.template.Template.render_context">render_context() (mako.template.Template method)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="usage.html#mako.template.Template.render_unicode">render_unicode() (mako.template.Template method)</a>
-</dt>
-
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-
-<dt>
-        <a href="usage.html#RichTraceback.reverse_records">reverse_records (RichTraceback attribute)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="usage.html#RichTraceback.reverse_traceback">reverse_traceback (RichTraceback attribute)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="usage.html#mako.exceptions.RichTraceback">RichTraceback (class in mako.exceptions)</a>
-</dt>
-
-
-  
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="S">S</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="caching.html#mako.cache.Cache.set">set() (mako.cache.Cache method)</a>
-</dt>
-
-    <dd><dl>
-      <dt><a href="caching.html#mako.cache.CacheImpl.set">(mako.cache.CacheImpl method)</a>
-      </dt>
-    </dl></dd>
-
-  
-
-
-<dt>
-        <a href="usage.html#mako.template.Template.source">source (mako.template.Template attribute)</a>
-</dt>
-
-    <dd><dl>
-      <dt><a href="usage.html#RichTraceback.source">(RichTraceback attribute)</a>
-      </dt>
-    </dl></dd>
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-
-<dt>
-        <a href="caching.html#mako.cache.Cache.starttime">starttime (mako.cache.Cache attribute)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="namespaces.html#mako.runtime.supports_caller">supports_caller() (in module mako.runtime)</a>
-</dt>
-
-
-  
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="T">T</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="usage.html#mako.template.Template">Template (class in mako.template)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="namespaces.html#mako.runtime.Namespace.template">template (mako.runtime.Namespace attribute)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="usage.html#mako.lookup.TemplateCollection">TemplateCollection (class in mako.lookup)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="usage.html#mako.lookup.TemplateLookup">TemplateLookup (class in mako.lookup)</a>
-</dt>
-
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-
-<dt>
-        <a href="namespaces.html#mako.runtime.TemplateNamespace">TemplateNamespace (class in mako.runtime)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="usage.html#mako.exceptions.text_error_template">text_error_template() (in module mako.exceptions)</a>
-</dt>
-
-
-  
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="U">U</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="runtime.html#mako.runtime.Undefined">Undefined (class in mako.runtime)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="namespaces.html#mako.runtime.Namespace.uri">uri (mako.runtime.Namespace attribute)</a>
-</dt>
-
-    <dd><dl>
-      <dt><a href="namespaces.html#mako.runtime.TemplateNamespace.uri">(mako.runtime.TemplateNamespace attribute)</a>
-      </dt>
-    </dl></dd>
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-<dt></dt></dl>
-</td></tr></table>
-<h2 id="W">W</h2>
-<table width="100%" class="indextable genindextable"><tr><td width="33%" valign="top">
-<dl>
-    
-
-<dt>
-        <a href="runtime.html#mako.runtime.Context.write">write() (mako.runtime.Context method)</a>
-</dt>
-
-
-  
-
-
-<dt>
-        <a href="runtime.html#mako.runtime.Context.writer">writer() (mako.runtime.Context method)</a>
-</dt>
-
-
-  
-     
-        </dl></td><td width="33%" valign="top"><dl>
-
-<dt></dt></dl>
-</td></tr></table>
-
-
-
-    </div>
-
-</div>
-
-<div id="docs-bottom-navigation" class="docs-navigation-links">
-
-    <div id="docs-copyright">
-        © Copyright the Mako authors and contributors.
-        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
-        with Mako templates.
-    </div>
-</div>
-
-</div>
-
-<div class="clearfix">
-
-<hr/>
-
-<div class="copyright">Website content copyright © by Michael Bayer.
-    All rights reserved.  Mako and its documentation are licensed
-    under the MIT license.  mike(&)zzzcomputing.com</div>
-
-</div>
-</div>
-</body>
-</html>
diff --git a/lib/mako-0.7.2/doc/index.html b/lib/mako-0.7.2/doc/index.html
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/index.html
+++ /dev/null
@@ -1,228 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
-<head>
-<title>
-    Mako 0.7.2 Documentation
-</title>
-
-    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
-
-    <script type="text/javascript">
-      var DOCUMENTATION_OPTIONS = {
-          URL_ROOT:    '#',
-          VERSION:     '0.7.2',
-          COLLAPSE_MODINDEX: false,
-          FILE_SUFFIX: '.html'
-      };
-    </script>
-        <script type="text/javascript" src="_static/jquery.js"></script>
-        <script type="text/javascript" src="_static/underscore.js"></script>
-        <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
-    <link rel="top" title="Mako 0.7.2 Documentation" href="#" />
-        <link rel="next" title="Usage" href="usage.html" />
-
-<link rel="stylesheet" href="_static/site.css"></link>
-
-
-</head>
-<body>
-    <div id="wrap">
-    <div class="rightbar">
-    <div class="slogan">
-    Hyperfast and lightweight templating for the Python platform.
-    </div>
-
-
-    </div>
-
-    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
-
-    <hr/>
-
-    
-
-
-
-
-
-
-
-
-
-<div id="docs-container">
-
-
-
-<div id="docs-header">
-    <h1>Mako 0.7.2 Documentation</h1>
-
-    <div id="docs-search">
-    Search:
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </div>
-
-    <div id="docs-version-header">
-        Release: <span class="version-num">0.7.2</span>
-
-    </div>
-
-</div>
-
-<div id="docs-top-navigation">
-    <div id="docs-top-page-control" class="docs-navigation-links">
-        <ul>
-            <li>Next:
-            <a href="usage.html" title="next chapter">Usage</a>
-            </li>
-
-        <li>
-            <a href="#">Table of Contents</a> |
-            <a href="genindex.html">Index</a>
-            | <a href="_sources/index.txt">view source
-        </li>
-        </ul>
-    </div>
-
-    <div id="docs-navigation-banner">
-        <a href="#">Mako 0.7.2 Documentation</a>
-
-        <h2>
-            
-                Table of Contents
-            
-        </h2>
-    </div>
-
-</div>
-
-<div id="docs-body-container">
-
-
-    <div id="docs-body" class="" >
-        
-<div class="section" id="table-of-contents">
-<h1>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
-<div class="toctree-wrapper compound">
-<ul>
-<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="usage.html#basic-usage">Basic Usage</a></li>
-<li class="toctree-l2"><a class="reference internal" href="usage.html#using-file-based-templates">Using File-Based Templates</a></li>
-<li class="toctree-l2"><a class="reference internal" href="usage.html#using-templatelookup">Using <tt class="docutils literal"><span class="pre">TemplateLookup</span></tt></a></li>
-<li class="toctree-l2"><a class="reference internal" href="usage.html#using-unicode-and-encoding">Using Unicode and Encoding</a></li>
-<li class="toctree-l2"><a class="reference internal" href="usage.html#handling-exceptions">Handling Exceptions</a></li>
-<li class="toctree-l2"><a class="reference internal" href="usage.html#common-framework-integrations">Common Framework Integrations</a></li>
-<li class="toctree-l2"><a class="reference internal" href="usage.html#api-reference">API Reference</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="syntax.html">Syntax</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="syntax.html#expression-substitution">Expression Substitution</a></li>
-<li class="toctree-l2"><a class="reference internal" href="syntax.html#expression-escaping">Expression Escaping</a></li>
-<li class="toctree-l2"><a class="reference internal" href="syntax.html#control-structures">Control Structures</a></li>
-<li class="toctree-l2"><a class="reference internal" href="syntax.html#comments">Comments</a></li>
-<li class="toctree-l2"><a class="reference internal" href="syntax.html#newline-filters">Newline Filters</a></li>
-<li class="toctree-l2"><a class="reference internal" href="syntax.html#python-blocks">Python Blocks</a></li>
-<li class="toctree-l2"><a class="reference internal" href="syntax.html#module-level-blocks">Module-level Blocks</a></li>
-<li class="toctree-l2"><a class="reference internal" href="syntax.html#tags">Tags</a></li>
-<li class="toctree-l2"><a class="reference internal" href="syntax.html#returning-early-from-a-template">Returning Early from a Template</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="defs.html">Defs and Blocks</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="defs.html#using-defs">Using Defs</a></li>
-<li class="toctree-l2"><a class="reference internal" href="defs.html#using-blocks">Using Blocks</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="runtime.html">The Mako Runtime Environment</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="runtime.html#context">Context</a></li>
-<li class="toctree-l2"><a class="reference internal" href="runtime.html#the-loop-context">The Loop Context</a></li>
-<li class="toctree-l2"><a class="reference internal" href="runtime.html#all-the-built-in-names">All the Built-in Names</a></li>
-<li class="toctree-l2"><a class="reference internal" href="runtime.html#api-reference">API Reference</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="namespaces.html">Namespaces</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="namespaces.html#ways-to-call-namespaces">Ways to Call Namespaces</a></li>
-<li class="toctree-l2"><a class="reference internal" href="namespaces.html#namespaces-from-regular-python-modules">Namespaces from Regular Python Modules</a></li>
-<li class="toctree-l2"><a class="reference internal" href="namespaces.html#declaring-defs-in-namespaces">Declaring Defs in Namespaces</a></li>
-<li class="toctree-l2"><a class="reference internal" href="namespaces.html#the-body-method">The <tt class="docutils literal"><span class="pre">body()</span></tt> Method</a></li>
-<li class="toctree-l2"><a class="reference internal" href="namespaces.html#built-in-namespaces">Built-in Namespaces</a></li>
-<li class="toctree-l2"><a class="reference internal" href="namespaces.html#inheritable-namespaces">Inheritable Namespaces</a></li>
-<li class="toctree-l2"><a class="reference internal" href="namespaces.html#api-reference">API Reference</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="inheritance.html">Inheritance</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="inheritance.html#nesting-blocks">Nesting Blocks</a></li>
-<li class="toctree-l2"><a class="reference internal" href="inheritance.html#rendering-a-named-block-multiple-times">Rendering a Named Block Multiple Times</a></li>
-<li class="toctree-l2"><a class="reference internal" href="inheritance.html#but-what-about-defs">But what about Defs?</a></li>
-<li class="toctree-l2"><a class="reference internal" href="inheritance.html#using-the-next-namespace-to-produce-content-wrapping">Using the <tt class="docutils literal"><span class="pre">next</span></tt> Namespace to Produce Content Wrapping</a></li>
-<li class="toctree-l2"><a class="reference internal" href="inheritance.html#using-the-parent-namespace-to-augment-defs">Using the <tt class="docutils literal"><span class="pre">parent</span></tt> Namespace to Augment Defs</a></li>
-<li class="toctree-l2"><a class="reference internal" href="inheritance.html#inheritable-attributes">Inheritable Attributes</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="filtering.html">Filtering and Buffering</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="filtering.html#expression-filtering">Expression Filtering</a></li>
-<li class="toctree-l2"><a class="reference internal" href="filtering.html#filtering-defs-and-blocks">Filtering Defs and Blocks</a></li>
-<li class="toctree-l2"><a class="reference internal" href="filtering.html#buffering">Buffering</a></li>
-<li class="toctree-l2"><a class="reference internal" href="filtering.html#decorating">Decorating</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="unicode.html">The Unicode Chapter</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="unicode.html#specifying-the-encoding-of-a-template-file">Specifying the Encoding of a Template File</a></li>
-<li class="toctree-l2"><a class="reference internal" href="unicode.html#handling-expressions">Handling Expressions</a></li>
-<li class="toctree-l2"><a class="reference internal" href="unicode.html#defining-output-encoding">Defining Output Encoding</a></li>
-<li class="toctree-l2"><a class="reference internal" href="unicode.html#saying-to-heck-with-it-disabling-the-usage-of-unicode-entirely">Saying to Heck with It: Disabling the Usage of Unicode Entirely</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="caching.html">Caching</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="caching.html#cache-arguments">Cache Arguments</a></li>
-<li class="toctree-l2"><a class="reference internal" href="caching.html#programmatic-cache-access">Programmatic Cache Access</a></li>
-<li class="toctree-l2"><a class="reference internal" href="caching.html#cache-plugins">Cache Plugins</a></li>
-<li class="toctree-l2"><a class="reference internal" href="caching.html#api-reference">API Reference</a></li>
-</ul>
-</li>
-</ul>
-</div>
-<div class="section" id="indices-and-tables">
-<h2>Indices and Tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h2>
-<ul class="simple">
-<li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
-<li><a class="reference internal" href="search.html"><em>Search Page</em></a></li>
-</ul>
-</div>
-</div>
-
-    </div>
-
-</div>
-
-<div id="docs-bottom-navigation" class="docs-navigation-links">
-        Next:
-        <a href="usage.html" title="next chapter">Usage</a>
-
-    <div id="docs-copyright">
-        © Copyright the Mako authors and contributors.
-        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
-        with Mako templates.
-    </div>
-</div>
-
-</div>
-
-<div class="clearfix">
-
-<hr/>
-
-<div class="copyright">Website content copyright © by Michael Bayer.
-    All rights reserved.  Mako and its documentation are licensed
-    under the MIT license.  mike(&)zzzcomputing.com</div>
-
-</div>
-</div>
-</body>
-</html>
diff --git a/lib/mako-0.7.2/doc/inheritance.html b/lib/mako-0.7.2/doc/inheritance.html
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/inheritance.html
+++ /dev/null
@@ -1,671 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
-<head>
-<title>
-    
-                Inheritance
-             — 
-    Mako 0.7.2 Documentation
-</title>
-
-    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
-
-    <script type="text/javascript">
-      var DOCUMENTATION_OPTIONS = {
-          URL_ROOT:    '#',
-          VERSION:     '0.7.2',
-          COLLAPSE_MODINDEX: false,
-          FILE_SUFFIX: '.html'
-      };
-    </script>
-        <script type="text/javascript" src="_static/jquery.js"></script>
-        <script type="text/javascript" src="_static/underscore.js"></script>
-        <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
-    <link rel="top" title="Mako 0.7.2 Documentation" href="index.html" />
-        <link rel="next" title="Filtering and Buffering" href="filtering.html" />
-        <link rel="prev" title="Namespaces" href="namespaces.html" />
-
-<link rel="stylesheet" href="_static/site.css"></link>
-
-
-</head>
-<body>
-    <div id="wrap">
-    <div class="rightbar">
-    <div class="slogan">
-    Hyperfast and lightweight templating for the Python platform.
-    </div>
-
-
-    </div>
-
-    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
-
-    <hr/>
-
-    
-
-
-
-
-
-
-
-
-
-<div id="docs-container">
-
-
-
-<div id="docs-header">
-    <h1>Mako 0.7.2 Documentation</h1>
-
-    <div id="docs-search">
-    Search:
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </div>
-
-    <div id="docs-version-header">
-        Release: <span class="version-num">0.7.2</span>
-
-    </div>
-
-</div>
-
-<div id="docs-top-navigation">
-    <div id="docs-top-page-control" class="docs-navigation-links">
-        <ul>
-            <li>Prev:
-            <a href="namespaces.html" title="previous chapter">Namespaces</a>
-            </li>
-            <li>Next:
-            <a href="filtering.html" title="next chapter">Filtering and Buffering</a>
-            </li>
-
-        <li>
-            <a href="index.html">Table of Contents</a> |
-            <a href="genindex.html">Index</a>
-            | <a href="_sources/inheritance.txt">view source
-        </li>
-        </ul>
-    </div>
-
-    <div id="docs-navigation-banner">
-        <a href="index.html">Mako 0.7.2 Documentation</a>
-        » 
-                Inheritance
-             
-
-        <h2>
-            
-                Inheritance
-            
-        </h2>
-    </div>
-
-</div>
-
-<div id="docs-body-container">
-
-    <div id="docs-sidebar">
-    <h3><a href="index.html">Table of Contents</a></h3>
-    <ul>
-<li><a class="reference internal" href="#">Inheritance</a><ul>
-<li><a class="reference internal" href="#nesting-blocks">Nesting Blocks</a></li>
-<li><a class="reference internal" href="#rendering-a-named-block-multiple-times">Rendering a Named Block Multiple Times</a></li>
-<li><a class="reference internal" href="#but-what-about-defs">But what about Defs?</a></li>
-<li><a class="reference internal" href="#using-the-next-namespace-to-produce-content-wrapping">Using the <tt class="docutils literal"><span class="pre">next</span></tt> Namespace to Produce Content Wrapping</a></li>
-<li><a class="reference internal" href="#using-the-parent-namespace-to-augment-defs">Using the <tt class="docutils literal"><span class="pre">parent</span></tt> Namespace to Augment Defs</a></li>
-<li><a class="reference internal" href="#inheritable-attributes">Inheritable Attributes</a></li>
-</ul>
-</li>
-</ul>
-
-
-    <h4>Previous Topic</h4>
-    <p>
-    <a href="namespaces.html" title="previous chapter">Namespaces</a>
-    </p>
-    <h4>Next Topic</h4>
-    <p>
-    <a href="filtering.html" title="next chapter">Filtering and Buffering</a>
-    </p>
-
-    <h4>Quick Search</h4>
-    <p>
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </p>
-
-    </div>
-
-    <div id="docs-body" class="withsidebar" >
-        
-<div class="section" id="inheritance">
-<span id="inheritance-toplevel"></span><h1>Inheritance<a class="headerlink" href="#inheritance" title="Permalink to this headline">¶</a></h1>
-<div class="admonition note">
-<p class="first admonition-title">Note</p>
-<p class="last">Most of the inheritance examples here take advantage of a feature that’s
-new in Mako as of version 0.4.1 called the “block”.  This tag is very similar to
-the “def” tag but is more streamlined for usage with inheritance.  Note that
-all of the examples here which use blocks can also use defs instead.  Contrasting
-usages will be illustrated.</p>
-</div>
-<p>Using template inheritance, two or more templates can organize
-themselves into an <strong>inheritance chain</strong>, where content and
-functions from all involved templates can be intermixed. The
-general paradigm of template inheritance is this: if a template
-<tt class="docutils literal"><span class="pre">A</span></tt> inherits from template <tt class="docutils literal"><span class="pre">B</span></tt>, then template <tt class="docutils literal"><span class="pre">A</span></tt> agrees
-to send the executional control to template <tt class="docutils literal"><span class="pre">B</span></tt> at runtime
-(<tt class="docutils literal"><span class="pre">A</span></tt> is called the <strong>inheriting</strong> template). Template <tt class="docutils literal"><span class="pre">B</span></tt>,
-the <strong>inherited</strong> template, then makes decisions as to what
-resources from <tt class="docutils literal"><span class="pre">A</span></tt> shall be executed.</p>
-<p>In practice, it looks like this. Here’s a hypothetical inheriting
-template, <tt class="docutils literal"><span class="pre">index.html</span></tt>:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## index.html</span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"base.html"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    this is some header content</span>
-<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-
-<span class="x">this is the body content.</span>
-</pre></div>
-</div>
-<p>And <tt class="docutils literal"><span class="pre">base.html</span></tt>, the inherited template:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## base.html</span><span class="x"></span>
-<span class="x"><html></span>
-<span class="x">    <body></span>
-<span class="x">        <div class="header"></span>
-<span class="x">            </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">/></span><span class="x"></span>
-<span class="x">        </div></span>
-
-<span class="x">        </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-
-<span class="x">        <div class="footer"></span>
-<span class="x">            </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"footer"</span><span class="cp">></span><span class="x"></span>
-<span class="x">                this is the footer</span>
-<span class="x">            </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="x">        </div></span>
-<span class="x">    </body></span>
-<span class="x"></html></span>
-</pre></div>
-</div>
-<p>Here is a breakdown of the execution:</p>
-<ol class="arabic">
-<li><p class="first">When <tt class="docutils literal"><span class="pre">index.html</span></tt> is rendered, control immediately passes to
-<tt class="docutils literal"><span class="pre">base.html</span></tt>.</p>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">base.html</span></tt> then renders the top part of an HTML document,
-then invokes the <tt class="docutils literal"><span class="pre"><%block</span> <span class="pre">name="header"></span></tt> block.  It invokes the
-underlying <tt class="docutils literal"><span class="pre">header()</span></tt> function off of a built-in namespace
-called <tt class="docutils literal"><span class="pre">self</span></tt> (this namespace was first introduced in the
-<a class="reference internal" href="namespaces.html"><em>Namespaces chapter</em></a> in <a class="reference internal" href="namespaces.html#namespace-self"><em>self</em></a>). Since
-<tt class="docutils literal"><span class="pre">index.html</span></tt> is the topmost template and also defines a block
-called <tt class="docutils literal"><span class="pre">header</span></tt>, it’s this <tt class="docutils literal"><span class="pre">header</span></tt> block that ultimately gets
-executed – instead of the one that’s present in <tt class="docutils literal"><span class="pre">base.html</span></tt>.</p>
-</li>
-<li><p class="first">Control comes back to <tt class="docutils literal"><span class="pre">base.html</span></tt>. Some more HTML is
-rendered.</p>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">base.html</span></tt> executes <tt class="docutils literal"><span class="pre">self.body()</span></tt>. The <tt class="docutils literal"><span class="pre">body()</span></tt>
-function on all template-based namespaces refers to the main
-body of the template, therefore the main body of
-<tt class="docutils literal"><span class="pre">index.html</span></tt> is rendered.</p>
-</li>
-<li><p class="first">When <tt class="docutils literal"><span class="pre"><%block</span> <span class="pre">name="header"></span></tt> is encountered in <tt class="docutils literal"><span class="pre">index.html</span></tt>
-during the <tt class="docutils literal"><span class="pre">self.body()</span></tt> call, a conditional is checked – does the
-current inherited template, i.e. <tt class="docutils literal"><span class="pre">base.html</span></tt>, also define this block? If yes,
-the <tt class="docutils literal"><span class="pre"><%block></span></tt> is <strong>not</strong> executed here – the inheritance
-mechanism knows that the parent template is responsible for rendering
-this block (and in fact it already has).  In other words a block
-only renders in its <em>basemost scope</em>.</p>
-</li>
-<li><p class="first">Control comes back to <tt class="docutils literal"><span class="pre">base.html</span></tt>. More HTML is rendered,
-then the <tt class="docutils literal"><span class="pre"><%block</span> <span class="pre">name="footer"></span></tt> expression is invoked.</p>
-</li>
-<li><p class="first">The <tt class="docutils literal"><span class="pre">footer</span></tt> block is only defined in <tt class="docutils literal"><span class="pre">base.html</span></tt>, so being
-the topmost definition of <tt class="docutils literal"><span class="pre">footer</span></tt>, it’s the one that
-executes. If <tt class="docutils literal"><span class="pre">index.html</span></tt> also specified <tt class="docutils literal"><span class="pre">footer</span></tt>, then
-its version would <strong>override</strong> that of the base.</p>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">base.html</span></tt> finishes up rendering its HTML and the template
-is complete, producing:</p>
-<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span>
-    <span class="nt"><body></span>
-        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"header"</span><span class="nt">></span>
-            this is some header content
-        <span class="nt"></div></span>
-
-        this is the body content.
-
-        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"footer"</span><span class="nt">></span>
-            this is the footer
-        <span class="nt"></div></span>
-    <span class="nt"></body></span>
-<span class="nt"></html></span>
-</pre></div>
-</div>
-</li>
-</ol>
-<p>...and that is template inheritance in a nutshell. The main idea
-is that the methods that you call upon <tt class="docutils literal"><span class="pre">self</span></tt> always
-correspond to the topmost definition of that method. Very much
-the way <tt class="docutils literal"><span class="pre">self</span></tt> works in a Python class, even though Mako is
-not actually using Python class inheritance to implement this
-functionality. (Mako doesn’t take the “inheritance” metaphor too
-seriously; while useful to setup some commonly recognized
-semantics, a textual template is not very much like an
-object-oriented class construct in practice).</p>
-<div class="section" id="nesting-blocks">
-<h2>Nesting Blocks<a class="headerlink" href="#nesting-blocks" title="Permalink to this headline">¶</a></h2>
-<p>The named blocks defined in an inherited template can also be nested within
-other blocks.  The name given to each block is globally accessible via any inheriting
-template.  We can add a new block <tt class="docutils literal"><span class="pre">title</span></tt> to our <tt class="docutils literal"><span class="pre">header</span></tt> block:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## base.html</span><span class="x"></span>
-<span class="x"><html></span>
-<span class="x">    <body></span>
-<span class="x">        <div class="header"></span>
-<span class="x">            </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
-<span class="x">                <h2></span>
-<span class="x">                    </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"title"</span><span class="cp">/></span><span class="x"></span>
-<span class="x">                </h2></span>
-<span class="x">            </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="x">        </div></span>
-
-<span class="x">        </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-
-<span class="x">        <div class="footer"></span>
-<span class="x">            </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"footer"</span><span class="cp">></span><span class="x"></span>
-<span class="x">                this is the footer</span>
-<span class="x">            </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="x">        </div></span>
-<span class="x">    </body></span>
-<span class="x"></html></span>
-</pre></div>
-</div>
-<p>The inheriting template can name either or both of <tt class="docutils literal"><span class="pre">header</span></tt> and <tt class="docutils literal"><span class="pre">title</span></tt>, separately
-or nested themselves:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## index.html</span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"base.html"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    this is some header content</span>
-<span class="x">    </span><span class="cp">${</span><span class="n">parent</span><span class="o">.</span><span class="n">header</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"title"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    this is the title</span>
-<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-
-<span class="x">this is the body content.</span>
-</pre></div>
-</div>
-<p>Note when we overrode <tt class="docutils literal"><span class="pre">header</span></tt>, we added an extra call <tt class="docutils literal"><span class="pre">${parent.header()}</span></tt> in order to invoke
-the parent’s <tt class="docutils literal"><span class="pre">header</span></tt> block in addition to our own.  That’s described in more detail below,
-in <a class="reference internal" href="#parent-namespace"><em>Using the parent Namespace to Augment Defs</em></a>.</p>
-</div>
-<div class="section" id="rendering-a-named-block-multiple-times">
-<h2>Rendering a Named Block Multiple Times<a class="headerlink" href="#rendering-a-named-block-multiple-times" title="Permalink to this headline">¶</a></h2>
-<p>Recall from the section <a class="reference internal" href="defs.html#blocks"><em>Using Blocks</em></a> that a named block is just like a <tt class="docutils literal"><span class="pre"><%def></span></tt>,
-with some different usage rules.  We can call one of our named sections distinctly, for example
-a section that is used more than once, such as the title of a page:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><html></span>
-<span class="x">    <head></span>
-<span class="x">        <title></span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">title</span><span class="p">()</span><span class="cp">}</span><span class="x"></title></span>
-<span class="x">    </head></span>
-<span class="x">    <body></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
-<span class="x">        <h2></span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"title"</span><span class="cp">/></span><span class="x"></h2></span>
-<span class="x">    </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="x">    </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x">    </body></span>
-<span class="x"></html></span>
-</pre></div>
-</div>
-<p>Where above an inheriting template can define <tt class="docutils literal"><span class="pre"><%block</span> <span class="pre">name="title"></span></tt> just once, and it will be
-used in the base template both in the <tt class="docutils literal"><span class="pre"><title></span></tt> section as well as the <tt class="docutils literal"><span class="pre"><h2></span></tt>.</p>
-</div>
-<div class="section" id="but-what-about-defs">
-<h2>But what about Defs?<a class="headerlink" href="#but-what-about-defs" title="Permalink to this headline">¶</a></h2>
-<p>The previous example used the <tt class="docutils literal"><span class="pre"><%block></span></tt> tag to produce areas of content
-to be overridden.  Before Mako 0.4.1, there wasn’t any such tag – instead
-there was only the <tt class="docutils literal"><span class="pre"><%def></span></tt> tag.   As it turns out, named blocks and defs are
-largely interchangeable.  The def simply doesn’t call itself automatically,
-and has more open-ended naming and scoping rules that are more flexible and similar
-to Python itself, but less suited towards layout.  The first example from
-this chapter using defs would look like:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## index.html</span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"base.html"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"header()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    this is some header content</span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-
-<span class="x">this is the body content.</span>
-</pre></div>
-</div>
-<p>And <tt class="docutils literal"><span class="pre">base.html</span></tt>, the inherited template:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## base.html</span><span class="x"></span>
-<span class="x"><html></span>
-<span class="x">    <body></span>
-<span class="x">        <div class="header"></span>
-<span class="x">            </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">header</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x">        </div></span>
-
-<span class="x">        </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-
-<span class="x">        <div class="footer"></span>
-<span class="x">            </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">footer</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x">        </div></span>
-<span class="x">    </body></span>
-<span class="x"></html></span>
-
-<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"header()"</span><span class="cp">/></span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"footer()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    this is the footer</span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>Above, we illustrate that defs differ from blocks in that their definition
-and invocation are defined in two separate places, instead of at once. You can <em>almost</em> do exactly what a
-block does if you put the two together:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><div class="header"></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"header()"</span><span class="cp">></%</span><span class="nb">def</span><span class="cp">>${</span><span class="bp">self</span><span class="o">.</span><span class="n">header</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x"></div></span>
-</pre></div>
-</div>
-<p>The <tt class="docutils literal"><span class="pre"><%block></span></tt> is obviously more streamlined than the <tt class="docutils literal"><span class="pre"><%def></span></tt> for this kind
-of usage.  In addition,
-the above “inline” approach with <tt class="docutils literal"><span class="pre"><%def></span></tt> does not work with nesting:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><head></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"header()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">        <title></span>
-<span class="x">        ## this won't work !</span>
-<span class="x">        </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"title()"</span><span class="cp">></span><span class="x">default title</span><span class="cp"></%</span><span class="nb">def</span><span class="cp">>${</span><span class="bp">self</span><span class="o">.</span><span class="n">title</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x">        </title></span>
-<span class="x">    </span><span class="cp"></%</span><span class="nb">def</span><span class="cp">>${</span><span class="bp">self</span><span class="o">.</span><span class="n">header</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x"></head></span>
-</pre></div>
-</div>
-<p>Where above, the <tt class="docutils literal"><span class="pre">title()</span></tt> def, because it’s a def within a def, is not part of the
-template’s exported namespace and will not be part of <tt class="docutils literal"><span class="pre">self</span></tt>.  If the inherited template
-did define its own <tt class="docutils literal"><span class="pre">title</span></tt> def at the top level, it would be called, but the “default title”
-above is not present at all on <tt class="docutils literal"><span class="pre">self</span></tt> no matter what.  For this to work as expected
-you’d instead need to say:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><head></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"header()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">        <title></span>
-<span class="x">        </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">title</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x">        </title></span>
-<span class="x">    </span><span class="cp"></%</span><span class="nb">def</span><span class="cp">>${</span><span class="bp">self</span><span class="o">.</span><span class="n">header</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-
-<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"title()"</span><span class="cp">/></span><span class="x"></span>
-<span class="x"></head></span>
-</pre></div>
-</div>
-<p>That is, <tt class="docutils literal"><span class="pre">title</span></tt> is defined outside of any other defs so that it is in the <tt class="docutils literal"><span class="pre">self</span></tt> namespace.
-It works, but the definition needs to be potentially far away from the point of render.</p>
-<p>A named block is always placed in the <tt class="docutils literal"><span class="pre">self</span></tt> namespace, regardless of nesting,
-so this restriction is lifted:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## base.html</span><span class="x"></span>
-<span class="x"><head></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
-<span class="x">        <title></span>
-<span class="x">        </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"title"</span><span class="cp">/></span><span class="x"></span>
-<span class="x">        </title></span>
-<span class="x">    </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="x"></head></span>
-</pre></div>
-</div>
-<p>The above template defines <tt class="docutils literal"><span class="pre">title</span></tt> inside of <tt class="docutils literal"><span class="pre">header</span></tt>, and an inheriting template can define
-one or both in <strong>any</strong> configuration, nested inside each other or not, in order for them to be used:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## index.html</span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"base.html"</span><span class="cp">/></span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"title"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    the title</span>
-<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    the header</span>
-<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>So while the <tt class="docutils literal"><span class="pre"><%block></span></tt> tag lifts the restriction of nested blocks not being available externally,
-in order to achieve this it <em>adds</em> the restriction that all block names in a single template need
-to be globally unique within the template, and additionally that a <tt class="docutils literal"><span class="pre"><%block></span></tt> can’t be defined
-inside of a <tt class="docutils literal"><span class="pre"><%def></span></tt>. It’s a more restricted tag suited towards a more specific use case than <tt class="docutils literal"><span class="pre"><%def></span></tt>.</p>
-</div>
-<div class="section" id="using-the-next-namespace-to-produce-content-wrapping">
-<h2>Using the <tt class="docutils literal"><span class="pre">next</span></tt> Namespace to Produce Content Wrapping<a class="headerlink" href="#using-the-next-namespace-to-produce-content-wrapping" title="Permalink to this headline">¶</a></h2>
-<p>Sometimes you have an inheritance chain that spans more than two
-templates. Or maybe you don’t, but you’d like to build your
-system such that extra inherited templates can be inserted in
-the middle of a chain where they would be smoothly integrated.
-If each template wants to define its layout just within its main
-body, you can’t just call <tt class="docutils literal"><span class="pre">self.body()</span></tt> to get at the
-inheriting template’s body, since that is only the topmost body.
-To get at the body of the <em>next</em> template, you call upon the
-namespace <tt class="docutils literal"><span class="pre">next</span></tt>, which is the namespace of the template
-<strong>immediately following</strong> the current template.</p>
-<p>Lets change the line in <tt class="docutils literal"><span class="pre">base.html</span></tt> which calls upon
-<tt class="docutils literal"><span class="pre">self.body()</span></tt> to instead call upon <tt class="docutils literal"><span class="pre">next.body()</span></tt>:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## base.html</span><span class="x"></span>
-<span class="x"><html></span>
-<span class="x">    <body></span>
-<span class="x">        <div class="header"></span>
-<span class="x">            </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">/></span><span class="x"></span>
-<span class="x">        </div></span>
-
-<span class="x">        </span><span class="cp">${</span><span class="nb">next</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-
-<span class="x">        <div class="footer"></span>
-<span class="x">            </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"footer"</span><span class="cp">></span><span class="x"></span>
-<span class="x">                this is the footer</span>
-<span class="x">            </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="x">        </div></span>
-<span class="x">    </body></span>
-<span class="x"></html></span>
-</pre></div>
-</div>
-<p>Lets also add an intermediate template called <tt class="docutils literal"><span class="pre">layout.html</span></tt>,
-which inherits from <tt class="docutils literal"><span class="pre">base.html</span></tt>:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## layout.html</span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"base.html"</span><span class="cp">/></span><span class="x"></span>
-<span class="x"><ul></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"toolbar"</span><span class="cp">></span><span class="x"></span>
-<span class="x">        <li>selection 1</li></span>
-<span class="x">        <li>selection 2</li></span>
-<span class="x">        <li>selection 3</li></span>
-<span class="x">    </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="x"></ul></span>
-<span class="x"><div class="mainlayout"></span>
-<span class="x">    </span><span class="cp">${</span><span class="nb">next</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x"></div></span>
-</pre></div>
-</div>
-<p>And finally change <tt class="docutils literal"><span class="pre">index.html</span></tt> to inherit from
-<tt class="docutils literal"><span class="pre">layout.html</span></tt> instead:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## index.html</span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"layout.html"</span><span class="cp">/></span>
-
-<span class="cp">## .. rest of template</span><span class="x"></span>
-</pre></div>
-</div>
-<p>In this setup, each call to <tt class="docutils literal"><span class="pre">next.body()</span></tt> will render the body
-of the next template in the inheritance chain (which can be
-written as <tt class="docutils literal"><span class="pre">base.html</span> <span class="pre">-></span> <span class="pre">layout.html</span> <span class="pre">-></span> <span class="pre">index.html</span></tt>). Control
-is still first passed to the bottommost template <tt class="docutils literal"><span class="pre">base.html</span></tt>,
-and <tt class="docutils literal"><span class="pre">self</span></tt> still references the topmost definition of any
-particular def.</p>
-<p>The output we get would be:</p>
-<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span>
-    <span class="nt"><body></span>
-        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"header"</span><span class="nt">></span>
-            this is some header content
-        <span class="nt"></div></span>
-
-        <span class="nt"><ul></span>
-            <span class="nt"><li></span>selection 1<span class="nt"></li></span>
-            <span class="nt"><li></span>selection 2<span class="nt"></li></span>
-            <span class="nt"><li></span>selection 3<span class="nt"></li></span>
-        <span class="nt"></ul></span>
-
-        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"mainlayout"</span><span class="nt">></span>
-        this is the body content.
-        <span class="nt"></div></span>
-
-        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"footer"</span><span class="nt">></span>
-            this is the footer
-        <span class="nt"></div></span>
-    <span class="nt"></body></span>
-<span class="nt"></html></span>
-</pre></div>
-</div>
-<p>So above, we have the <tt class="docutils literal"><span class="pre"><html></span></tt>, <tt class="docutils literal"><span class="pre"><body></span></tt> and
-<tt class="docutils literal"><span class="pre">header</span></tt>/<tt class="docutils literal"><span class="pre">footer</span></tt> layout of <tt class="docutils literal"><span class="pre">base.html</span></tt>, we have the
-<tt class="docutils literal"><span class="pre"><ul></span></tt> and <tt class="docutils literal"><span class="pre">mainlayout</span></tt> section of <tt class="docutils literal"><span class="pre">layout.html</span></tt>, and the
-main body of <tt class="docutils literal"><span class="pre">index.html</span></tt> as well as its overridden <tt class="docutils literal"><span class="pre">header</span></tt>
-def. The <tt class="docutils literal"><span class="pre">layout.html</span></tt> template is inserted into the middle of
-the chain without <tt class="docutils literal"><span class="pre">base.html</span></tt> having to change anything.
-Without the <tt class="docutils literal"><span class="pre">next</span></tt> namespace, only the main body of
-<tt class="docutils literal"><span class="pre">index.html</span></tt> could be used; there would be no way to call
-<tt class="docutils literal"><span class="pre">layout.html</span></tt>‘s body content.</p>
-</div>
-<div class="section" id="using-the-parent-namespace-to-augment-defs">
-<span id="parent-namespace"></span><h2>Using the <tt class="docutils literal"><span class="pre">parent</span></tt> Namespace to Augment Defs<a class="headerlink" href="#using-the-parent-namespace-to-augment-defs" title="Permalink to this headline">¶</a></h2>
-<p>Lets now look at the other inheritance-specific namespace, the
-opposite of <tt class="docutils literal"><span class="pre">next</span></tt> called <tt class="docutils literal"><span class="pre">parent</span></tt>. <tt class="docutils literal"><span class="pre">parent</span></tt> is the
-namespace of the template <strong>immediately preceding</strong> the current
-template. What’s useful about this namespace is that
-defs or blocks can call upon their overridden versions.
-This is not as hard as it sounds and
-is very much like using the <tt class="docutils literal"><span class="pre">super</span></tt> keyword in Python. Lets
-modify <tt class="docutils literal"><span class="pre">index.html</span></tt> to augment the list of selections provided
-by the <tt class="docutils literal"><span class="pre">toolbar</span></tt> function in <tt class="docutils literal"><span class="pre">layout.html</span></tt>:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## index.html</span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"layout.html"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    this is some header content</span>
-<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"toolbar"</span><span class="cp">></span>
-    <span class="cp">## call the parent's toolbar first</span><span class="x"></span>
-<span class="x">    </span><span class="cp">${</span><span class="n">parent</span><span class="o">.</span><span class="n">toolbar</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x">    <li>selection 4</li></span>
-<span class="x">    <li>selection 5</li></span>
-<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-
-<span class="x">this is the body content.</span>
-</pre></div>
-</div>
-<p>Above, we implemented a <tt class="docutils literal"><span class="pre">toolbar()</span></tt> function, which is meant
-to override the definition of <tt class="docutils literal"><span class="pre">toolbar</span></tt> within the inherited
-template <tt class="docutils literal"><span class="pre">layout.html</span></tt>. However, since we want the content
-from that of <tt class="docutils literal"><span class="pre">layout.html</span></tt> as well, we call it via the
-<tt class="docutils literal"><span class="pre">parent</span></tt> namespace whenever we want it’s content, in this case
-before we add our own selections. So the output for the whole
-thing is now:</p>
-<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span>
-    <span class="nt"><body></span>
-        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"header"</span><span class="nt">></span>
-            this is some header content
-        <span class="nt"></div></span>
-
-        <span class="nt"><ul></span>
-            <span class="nt"><li></span>selection 1<span class="nt"></li></span>
-            <span class="nt"><li></span>selection 2<span class="nt"></li></span>
-            <span class="nt"><li></span>selection 3<span class="nt"></li></span>
-            <span class="nt"><li></span>selection 4<span class="nt"></li></span>
-            <span class="nt"><li></span>selection 5<span class="nt"></li></span>
-        <span class="nt"></ul></span>
-
-        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"mainlayout"</span><span class="nt">></span>
-        this is the body content.
-        <span class="nt"></div></span>
-
-        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"footer"</span><span class="nt">></span>
-            this is the footer
-        <span class="nt"></div></span>
-    <span class="nt"></body></span>
-<span class="nt"></html></span>
-</pre></div>
-</div>
-<p>and you’re now a template inheritance ninja!</p>
-</div>
-<div class="section" id="inheritable-attributes">
-<h2>Inheritable Attributes<a class="headerlink" href="#inheritable-attributes" title="Permalink to this headline">¶</a></h2>
-<p>The <a class="reference internal" href="namespaces.html#mako.runtime.Namespace.attr" title="mako.runtime.Namespace.attr"><tt class="xref py py-attr docutils literal"><span class="pre">attr</span></tt></a> accessor of the <a class="reference internal" href="namespaces.html#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> object
-allows access to module level variables declared in a template. By accessing
-<tt class="docutils literal"><span class="pre">self.attr</span></tt>, you can access regular attributes from the
-inheritance chain as declared in <tt class="docutils literal"><span class="pre"><%!</span> <span class="pre">%></span></tt> sections. Such as:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%!</span>
-    <span class="n">class_</span> <span class="o">=</span> <span class="s">"grey"</span>
-<span class="cp">%></span><span class="x"></span>
-
-<span class="x"><div class="</span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">attr</span><span class="o">.</span><span class="n">class_</span><span class="cp">}</span><span class="x">"></span>
-<span class="x">    </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x"></div></span>
-</pre></div>
-</div>
-<p>If an inheriting template overrides <tt class="docutils literal"><span class="pre">class_</span></tt> to be
-<tt class="docutils literal"><span class="pre">"white"</span></tt>, as in:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%!</span>
-    <span class="n">class_</span> <span class="o">=</span> <span class="s">"white"</span>
-<span class="cp">%></span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"parent.html"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="x">This is the body</span>
-</pre></div>
-</div>
-<p>you’ll get output like:</p>
-<div class="highlight-html"><div class="highlight"><pre><span class="nt"><div</span> <span class="na">class=</span><span class="s">"white"</span><span class="nt">></span>
-    This is the body
-<span class="nt"></div></span>
-</pre></div>
-</div>
-</div>
-</div>
-
-    </div>
-
-</div>
-
-<div id="docs-bottom-navigation" class="docs-navigation-links">
-        Previous:
-        <a href="namespaces.html" title="previous chapter">Namespaces</a>
-        Next:
-        <a href="filtering.html" title="next chapter">Filtering and Buffering</a>
-
-    <div id="docs-copyright">
-        © Copyright the Mako authors and contributors.
-        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
-        with Mako templates.
-    </div>
-</div>
-
-</div>
-
-<div class="clearfix">
-
-<hr/>
-
-<div class="copyright">Website content copyright © by Michael Bayer.
-    All rights reserved.  Mako and its documentation are licensed
-    under the MIT license.  mike(&)zzzcomputing.com</div>
-
-</div>
-</div>
-</body>
-</html>
diff --git a/lib/mako-0.7.2/doc/namespaces.html b/lib/mako-0.7.2/doc/namespaces.html
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/namespaces.html
+++ /dev/null
@@ -1,647 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
-<head>
-<title>
-    
-                Namespaces
-             — 
-    Mako 0.7.2 Documentation
-</title>
-
-    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
-
-    <script type="text/javascript">
-      var DOCUMENTATION_OPTIONS = {
-          URL_ROOT:    '#',
-          VERSION:     '0.7.2',
-          COLLAPSE_MODINDEX: false,
-          FILE_SUFFIX: '.html'
-      };
-    </script>
-        <script type="text/javascript" src="_static/jquery.js"></script>
-        <script type="text/javascript" src="_static/underscore.js"></script>
-        <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
-    <link rel="top" title="Mako 0.7.2 Documentation" href="index.html" />
-        <link rel="next" title="Inheritance" href="inheritance.html" />
-        <link rel="prev" title="The Mako Runtime Environment" href="runtime.html" />
-
-<link rel="stylesheet" href="_static/site.css"></link>
-
-
-</head>
-<body>
-    <div id="wrap">
-    <div class="rightbar">
-    <div class="slogan">
-    Hyperfast and lightweight templating for the Python platform.
-    </div>
-
-
-    </div>
-
-    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
-
-    <hr/>
-
-    
-
-
-
-
-
-
-
-
-
-<div id="docs-container">
-
-
-
-<div id="docs-header">
-    <h1>Mako 0.7.2 Documentation</h1>
-
-    <div id="docs-search">
-    Search:
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </div>
-
-    <div id="docs-version-header">
-        Release: <span class="version-num">0.7.2</span>
-
-    </div>
-
-</div>
-
-<div id="docs-top-navigation">
-    <div id="docs-top-page-control" class="docs-navigation-links">
-        <ul>
-            <li>Prev:
-            <a href="runtime.html" title="previous chapter">The Mako Runtime Environment</a>
-            </li>
-            <li>Next:
-            <a href="inheritance.html" title="next chapter">Inheritance</a>
-            </li>
-
-        <li>
-            <a href="index.html">Table of Contents</a> |
-            <a href="genindex.html">Index</a>
-            | <a href="_sources/namespaces.txt">view source
-        </li>
-        </ul>
-    </div>
-
-    <div id="docs-navigation-banner">
-        <a href="index.html">Mako 0.7.2 Documentation</a>
-        » 
-                Namespaces
-             
-
-        <h2>
-            
-                Namespaces
-            
-        </h2>
-    </div>
-
-</div>
-
-<div id="docs-body-container">
-
-    <div id="docs-sidebar">
-    <h3><a href="index.html">Table of Contents</a></h3>
-    <ul>
-<li><a class="reference internal" href="#">Namespaces</a><ul>
-<li><a class="reference internal" href="#ways-to-call-namespaces">Ways to Call Namespaces</a></li>
-<li><a class="reference internal" href="#namespaces-from-regular-python-modules">Namespaces from Regular Python Modules</a></li>
-<li><a class="reference internal" href="#declaring-defs-in-namespaces">Declaring Defs in Namespaces</a></li>
-<li><a class="reference internal" href="#the-body-method">The <tt class="docutils literal"><span class="pre">body()</span></tt> Method</a></li>
-<li><a class="reference internal" href="#built-in-namespaces">Built-in Namespaces</a><ul>
-<li><a class="reference internal" href="#local"><tt class="docutils literal"><span class="pre">local</span></tt></a></li>
-<li><a class="reference internal" href="#self"><tt class="docutils literal"><span class="pre">self</span></tt></a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#inheritable-namespaces">Inheritable Namespaces</a></li>
-<li><a class="reference internal" href="#api-reference">API Reference</a></li>
-</ul>
-</li>
-</ul>
-
-
-    <h4>Previous Topic</h4>
-    <p>
-    <a href="runtime.html" title="previous chapter">The Mako Runtime Environment</a>
-    </p>
-    <h4>Next Topic</h4>
-    <p>
-    <a href="inheritance.html" title="next chapter">Inheritance</a>
-    </p>
-
-    <h4>Quick Search</h4>
-    <p>
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </p>
-
-    </div>
-
-    <div id="docs-body" class="withsidebar" >
-        
-<div class="section" id="namespaces">
-<span id="namespaces-toplevel"></span><h1>Namespaces<a class="headerlink" href="#namespaces" title="Permalink to this headline">¶</a></h1>
-<p>Namespaces are used to organize groups of defs into
-categories, and also to “import” defs from other files.</p>
-<p>If the file <tt class="docutils literal"><span class="pre">components.html</span></tt> defines these two defs:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## components.html</span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"comp1()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    this is comp1</span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"comp2(x)"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    this is comp2, x is </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x"></span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>you can make another file, for example <tt class="docutils literal"><span class="pre">index.html</span></tt>, that
-pulls those two defs into a namespace called <tt class="docutils literal"><span class="pre">comp</span></tt>:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## index.html</span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">namespace</span> <span class="na">name=</span><span class="s">"comp"</span> <span class="na">file=</span><span class="s">"components.html"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="x">Here's comp1:  </span><span class="cp">${</span><span class="n">comp</span><span class="o">.</span><span class="n">comp1</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x">Here's comp2:  </span><span class="cp">${</span><span class="n">comp</span><span class="o">.</span><span class="n">comp2</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>The <tt class="docutils literal"><span class="pre">comp</span></tt> variable above is an instance of
-<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>, a <strong>proxy object</strong> which delivers
-method calls to the underlying template callable using the
-current context.</p>
-<p><tt class="docutils literal"><span class="pre"><%namespace></span></tt> also provides an <tt class="docutils literal"><span class="pre">import</span></tt> attribute which can
-be used to pull the names into the local namespace, removing the
-need to call it via the “<tt class="docutils literal"><span class="pre">.</span></tt>” operator. When <tt class="docutils literal"><span class="pre">import</span></tt> is used, the
-<tt class="docutils literal"><span class="pre">name</span></tt> attribute is optional.</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">namespace</span> <span class="na">file=</span><span class="s">"components.html"</span> <span class="na">import=</span><span class="s">"comp1, comp2"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="x">Heres comp1:  </span><span class="cp">${</span><span class="n">comp1</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x">Heres comp2:  </span><span class="cp">${</span><span class="n">comp2</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p><tt class="docutils literal"><span class="pre">import</span></tt> also supports the “<tt class="docutils literal"><span class="pre">*</span></tt>” operator:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">namespace</span> <span class="na">file=</span><span class="s">"components.html"</span> <span class="na">import=</span><span class="s">"*"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="x">Heres comp1:  </span><span class="cp">${</span><span class="n">comp1</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x">Heres comp2:  </span><span class="cp">${</span><span class="n">comp2</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>The names imported by the <tt class="docutils literal"><span class="pre">import</span></tt> attribute take precedence
-over any names that exist within the current context.</p>
-<div class="admonition note">
-<p class="first admonition-title">Note</p>
-<p class="last">In current versions of Mako, usage of <tt class="docutils literal"><span class="pre">import='*'</span></tt> is
-known to decrease performance of the template. This will be
-fixed in a future release.</p>
-</div>
-<p>The <tt class="docutils literal"><span class="pre">file</span></tt> argument allows expressions – if looking for
-context variables, the <tt class="docutils literal"><span class="pre">context</span></tt> must be named explicitly:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">namespace</span> <span class="na">name=</span><span class="s">"dyn"</span> <span class="na">file=</span><span class="s">"${context['namespace_name']}"</span><span class="cp">/></span><span class="x"></span>
-</pre></div>
-</div>
-<div class="section" id="ways-to-call-namespaces">
-<h2>Ways to Call Namespaces<a class="headerlink" href="#ways-to-call-namespaces" title="Permalink to this headline">¶</a></h2>
-<p>There are essentially four ways to call a function from a
-namespace.</p>
-<p>The “expression” format, as described previously. Namespaces are
-just Python objects with functions on them, and can be used in
-expressions like any other function:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="n">mynamespace</span><span class="o">.</span><span class="n">somefunction</span><span class="p">(</span><span class="s">'some arg1'</span><span class="p">,</span> <span class="s">'some arg2'</span><span class="p">,</span> <span class="n">arg3</span><span class="o">=</span><span class="s">'some arg3'</span><span class="p">,</span> <span class="n">arg4</span><span class="o">=</span><span class="s">'some arg4'</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>Synonymous with the “expression” format is the “custom tag”
-format, when a “closed” tag is used. This format, introduced in
-Mako 0.2.3, allows the usage of a “custom” Mako tag, with the
-function arguments passed in using named attributes:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">mynamespace:somefunction</span> <span class="na">arg1=</span><span class="s">"some arg1"</span> <span class="na">arg2=</span><span class="s">"some arg2"</span> <span class="na">arg3=</span><span class="s">"some arg3"</span> <span class="na">arg4=</span><span class="s">"some arg4"</span><span class="cp">/></span><span class="x"></span>
-</pre></div>
-</div>
-<p>When using tags, the values of the arguments are taken as
-literal strings by default. To embed Python expressions as
-arguments, use the embedded expression format:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">mynamespace:somefunction</span> <span class="na">arg1=</span><span class="s">"${someobject.format()}"</span> <span class="na">arg2=</span><span class="s">"${somedef(5, 12)}"</span><span class="cp">/></span><span class="x"></span>
-</pre></div>
-</div>
-<p>The “custom tag” format is intended mainly for namespace
-functions which recognize body content, which in Mako is known
-as a “def with embedded content”:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">mynamespace:somefunction</span> <span class="na">arg1=</span><span class="s">"some argument"</span> <span class="na">args=</span><span class="s">"x, y"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    Some record: </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x">, </span><span class="cp">${</span><span class="n">y</span><span class="cp">}</span><span class="x"></span>
-<span class="cp"></%</span><span class="nb">mynamespace:somefunction</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>The “classic” way to call defs with embedded content is the <tt class="docutils literal"><span class="pre"><%call></span></tt> tag:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">call</span> <span class="na">expr=</span><span class="s">"mynamespace.somefunction(arg1='some argument')"</span> <span class="na">args=</span><span class="s">"x, y"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    Some record: </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x">, </span><span class="cp">${</span><span class="n">y</span><span class="cp">}</span><span class="x"></span>
-<span class="cp"></%</span><span class="nb">call</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>For information on how to construct defs that embed content from
-the caller, see <a class="reference internal" href="defs.html#defs-with-content"><em>Calling a Def with Embedded Content and/or Other Defs</em></a>.</p>
-</div>
-<div class="section" id="namespaces-from-regular-python-modules">
-<span id="namespaces-python-modules"></span><h2>Namespaces from Regular Python Modules<a class="headerlink" href="#namespaces-from-regular-python-modules" title="Permalink to this headline">¶</a></h2>
-<p>Namespaces can also import regular Python functions from
-modules. These callables need to take at least one argument,
-<tt class="docutils literal"><span class="pre">context</span></tt>, an instance of <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>. A module file
-<tt class="docutils literal"><span class="pre">some/module.py</span></tt> might contain the callable:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">my_tag</span><span class="p">(</span><span class="n">context</span><span class="p">):</span>
-    <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"hello world"</span><span class="p">)</span>
-    <span class="k">return</span> <span class="s">''</span>
-</pre></div>
-</div>
-<p>A template can use this module via:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">namespace</span> <span class="na">name=</span><span class="s">"hw"</span> <span class="na">module=</span><span class="s">"some.module"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="cp">${</span><span class="n">hw</span><span class="o">.</span><span class="n">my_tag</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>Note that the <tt class="docutils literal"><span class="pre">context</span></tt> argument is not needed in the call;
-the <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> tag creates a locally-scoped callable which
-takes care of it. The <tt class="docutils literal"><span class="pre">return</span> <span class="pre">''</span></tt> is so that the def does not
-dump a <tt class="docutils literal"><span class="pre">None</span></tt> into the output stream – the return value of any
-def is rendered after the def completes, in addition to whatever
-was passed to <a class="reference internal" href="runtime.html#mako.runtime.Context.write" title="mako.runtime.Context.write"><tt class="xref py py-meth docutils literal"><span class="pre">Context.write()</span></tt></a> within its body.</p>
-<p>If your def is to be called in an “embedded content” context,
-that is as described in <a class="reference internal" href="defs.html#defs-with-content"><em>Calling a Def with Embedded Content and/or Other Defs</em></a>, you should use
-the <a class="reference internal" href="#mako.runtime.supports_caller" title="mako.runtime.supports_caller"><tt class="xref py py-func docutils literal"><span class="pre">supports_caller()</span></tt></a> decorator, which will ensure that Mako
-will ensure the correct “caller” variable is available when your
-def is called, supporting embedded content:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.runtime</span> <span class="kn">import</span> <span class="n">supports_caller</span>
-
-<span class="nd">@supports_caller</span>
-<span class="k">def</span> <span class="nf">my_tag</span><span class="p">(</span><span class="n">context</span><span class="p">):</span>
-    <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"<div>"</span><span class="p">)</span>
-    <span class="n">context</span><span class="p">[</span><span class="s">'caller'</span><span class="p">]</span><span class="o">.</span><span class="n">body</span><span class="p">()</span>
-    <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"</div>"</span><span class="p">)</span>
-    <span class="k">return</span> <span class="s">''</span>
-</pre></div>
-</div>
-<p>Capturing of output is available as well, using the
-outside-of-templates version of the <a class="reference internal" href="#mako.runtime.capture" title="mako.runtime.capture"><tt class="xref py py-func docutils literal"><span class="pre">capture()</span></tt></a> function,
-which accepts the “context” as its first argument:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.runtime</span> <span class="kn">import</span> <span class="n">supports_caller</span><span class="p">,</span> <span class="n">capture</span>
-
-<span class="nd">@supports_caller</span>
-<span class="k">def</span> <span class="nf">my_tag</span><span class="p">(</span><span class="n">context</span><span class="p">):</span>
-    <span class="k">return</span> <span class="s">"<div></span><span class="si">%s</span><span class="s"></div>"</span> <span class="o">%</span> \
-            <span class="n">capture</span><span class="p">(</span><span class="n">context</span><span class="p">,</span> <span class="n">context</span><span class="p">[</span><span class="s">'caller'</span><span class="p">]</span><span class="o">.</span><span class="n">body</span><span class="p">,</span> <span class="n">x</span><span class="o">=</span><span class="s">"foo"</span><span class="p">,</span> <span class="n">y</span><span class="o">=</span><span class="s">"bar"</span><span class="p">)</span>
-</pre></div>
-</div>
-</div>
-<div class="section" id="declaring-defs-in-namespaces">
-<h2>Declaring Defs in Namespaces<a class="headerlink" href="#declaring-defs-in-namespaces" title="Permalink to this headline">¶</a></h2>
-<p>The <tt class="docutils literal"><span class="pre"><%namespace></span></tt> tag supports the definition of <tt class="docutils literal"><span class="pre"><%def></span></tt>s
-directly inside the tag. These defs become part of the namespace
-like any other function, and will override the definitions
-pulled in from a remote template or module:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## define a namespace</span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">namespace</span> <span class="na">name=</span><span class="s">"stuff"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"comp1()"</span><span class="cp">></span><span class="x"></span>
-<span class="x">        comp1</span>
-<span class="x">    </span><span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-<span class="cp"></%</span><span class="nb">namespace</span><span class="cp">></span>
-
-<span class="cp">## then call it</span><span class="x"></span>
-<span class="cp">${</span><span class="n">stuff</span><span class="o">.</span><span class="n">comp1</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-</div>
-<div class="section" id="the-body-method">
-<span id="namespaces-body"></span><h2>The <tt class="docutils literal"><span class="pre">body()</span></tt> Method<a class="headerlink" href="#the-body-method" title="Permalink to this headline">¶</a></h2>
-<p>Every namespace that is generated from a template contains a
-method called <tt class="docutils literal"><span class="pre">body()</span></tt>. This method corresponds to the main
-body of the template, and plays its most important roles when
-using inheritance relationships as well as
-def-calls-with-content.</p>
-<p>Since the <tt class="docutils literal"><span class="pre">body()</span></tt> method is available from a namespace just
-like all the other defs defined in a template, what happens if
-you send arguments to it? By default, the <tt class="docutils literal"><span class="pre">body()</span></tt> method
-accepts no positional arguments, and for usefulness in
-inheritance scenarios will by default dump all keyword arguments
-into a dictionary called <tt class="docutils literal"><span class="pre">pageargs</span></tt>. But if you actually want
-to get at the keyword arguments, Mako recommends you define your
-own argument signature explicitly. You do this via using the
-<tt class="docutils literal"><span class="pre"><%page></span></tt> tag:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">args=</span><span class="s">"x, y, someval=8, scope='foo', **kwargs"</span><span class="cp">/></span><span class="x"></span>
-</pre></div>
-</div>
-<p>A template which defines the above signature requires that the
-variables <tt class="docutils literal"><span class="pre">x</span></tt> and <tt class="docutils literal"><span class="pre">y</span></tt> are defined, defines default values
-for <tt class="docutils literal"><span class="pre">someval</span></tt> and <tt class="docutils literal"><span class="pre">scope</span></tt>, and sets up <tt class="docutils literal"><span class="pre">**kwargs</span></tt> to
-receive all other keyword arguments. If <tt class="docutils literal"><span class="pre">**kwargs</span></tt> or similar
-is not present, the argument <tt class="docutils literal"><span class="pre">**pageargs</span></tt> gets tacked on by
-Mako. When the template is called as a top-level template (i.e.
-via <a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a>) or via the <tt class="docutils literal"><span class="pre"><%include></span></tt> tag, the
-values for these arguments will be pulled from the <tt class="docutils literal"><span class="pre">Context</span></tt>.
-In all other cases, i.e. via calling the <tt class="docutils literal"><span class="pre">body()</span></tt> method, the
-arguments are taken as ordinary arguments from the method call.
-So above, the body might be called as:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">body</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="n">y</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">someval</span><span class="o">=</span><span class="mi">15</span><span class="p">,</span> <span class="n">delta</span><span class="o">=</span><span class="mi">7</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>The <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object also supplies a <a class="reference internal" href="runtime.html#mako.runtime.Context.kwargs" title="mako.runtime.Context.kwargs"><tt class="xref py py-attr docutils literal"><span class="pre">kwargs</span></tt></a> accessor, for
-cases when you’d like to pass along whatever is in the context to
-a <tt class="docutils literal"><span class="pre">body()</span></tt> callable:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="nb">next</span><span class="o">.</span><span class="n">body</span><span class="p">(</span><span class="o">**</span><span class="n">context</span><span class="o">.</span><span class="n">kwargs</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>The usefulness of calls like the above become more apparent when
-one works with inheriting templates. For more information on
-this, as well as the meanings of the names <tt class="docutils literal"><span class="pre">self</span></tt> and
-<tt class="docutils literal"><span class="pre">next</span></tt>, see <a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</p>
-</div>
-<div class="section" id="built-in-namespaces">
-<span id="namespaces-builtin"></span><h2>Built-in Namespaces<a class="headerlink" href="#built-in-namespaces" title="Permalink to this headline">¶</a></h2>
-<p>The namespace is so great that Mako gives your template one (or
-two) for free. The names of these namespaces are <tt class="docutils literal"><span class="pre">local</span></tt> and
-<tt class="docutils literal"><span class="pre">self</span></tt>. Other built-in namespaces include <tt class="docutils literal"><span class="pre">parent</span></tt> and
-<tt class="docutils literal"><span class="pre">next</span></tt>, which are optional and are described in
-<a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</p>
-<div class="section" id="local">
-<span id="namespace-local"></span><h3><tt class="docutils literal"><span class="pre">local</span></tt><a class="headerlink" href="#local" title="Permalink to this headline">¶</a></h3>
-<p>The <tt class="docutils literal"><span class="pre">local</span></tt> namespace is basically the namespace for the
-currently executing template. This means that all of the top
-level defs defined in your template, as well as your template’s
-<tt class="docutils literal"><span class="pre">body()</span></tt> function, are also available off of the <tt class="docutils literal"><span class="pre">local</span></tt>
-namespace.</p>
-<p>The <tt class="docutils literal"><span class="pre">local</span></tt> namespace is also where properties like <tt class="docutils literal"><span class="pre">uri</span></tt>,
-<tt class="docutils literal"><span class="pre">filename</span></tt>, and <tt class="docutils literal"><span class="pre">module</span></tt> and the <tt class="docutils literal"><span class="pre">get_namespace</span></tt> method
-can be particularly useful.</p>
-</div>
-<div class="section" id="self">
-<span id="namespace-self"></span><h3><tt class="docutils literal"><span class="pre">self</span></tt><a class="headerlink" href="#self" title="Permalink to this headline">¶</a></h3>
-<p>The <tt class="docutils literal"><span class="pre">self</span></tt> namespace, in the case of a template that does not
-use inheritance, is synonymous with <tt class="docutils literal"><span class="pre">local</span></tt>. If inheritance is
-used, then <tt class="docutils literal"><span class="pre">self</span></tt> references the topmost template in the
-inheritance chain, where it is most useful for providing the
-ultimate form of various “method” calls which may have been
-overridden at various points in an inheritance chain. See
-<a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</p>
-</div>
-</div>
-<div class="section" id="inheritable-namespaces">
-<h2>Inheritable Namespaces<a class="headerlink" href="#inheritable-namespaces" title="Permalink to this headline">¶</a></h2>
-<p>The <tt class="docutils literal"><span class="pre"><%namespace></span></tt> tag includes an optional attribute
-<tt class="docutils literal"><span class="pre">inheritable="True"</span></tt>, which will cause the namespace to be
-attached to the <tt class="docutils literal"><span class="pre">self</span></tt> namespace. Since <tt class="docutils literal"><span class="pre">self</span></tt> is globally
-available throughout an inheritance chain (described in the next
-section), all the templates in an inheritance chain can get at
-the namespace imported in a super-template via <tt class="docutils literal"><span class="pre">self</span></tt>.</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## base.html</span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">namespace</span> <span class="na">name=</span><span class="s">"foo"</span> <span class="na">file=</span><span class="s">"foo.html"</span> <span class="na">inheritable=</span><span class="s">"True"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="cp">${</span><span class="nb">next</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span>
-
-<span class="cp">## somefile.html</span><span class="x"></span>
-<span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"base.html"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">foo</span><span class="o">.</span><span class="n">bar</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>This allows a super-template to load a whole bunch of namespaces
-that its inheriting templates can get to, without them having to
-explicitly load those namespaces themselves.</p>
-<p>The <tt class="docutils literal"><span class="pre">import="*"</span></tt> part of the <tt class="docutils literal"><span class="pre"><%namespace></span></tt> tag doesn’t yet
-interact with the <tt class="docutils literal"><span class="pre">inheritable</span></tt> flag, so currently you have to
-use the explicit namespace name off of <tt class="docutils literal"><span class="pre">self</span></tt>, followed by the
-desired function name. But more on this in a future release.</p>
-</div>
-<div class="section" id="api-reference">
-<h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h2>
-<dl class="class">
-<dt id="mako.runtime.Namespace">
-<em class="property">class </em><tt class="descclassname">mako.runtime.</tt><tt class="descname">Namespace</tt><big>(</big><em>name</em>, <em>context</em>, <em>callables=None</em>, <em>inherits=None</em>, <em>populate_self=True</em>, <em>calling_uri=None</em><big>)</big><a class="headerlink" href="#mako.runtime.Namespace" title="Permalink to this definition">¶</a></dt>
-<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
-<p>Provides access to collections of rendering methods, which
-can be local, from other templates, or from imported modules.</p>
-<p>To access a particular rendering method referenced by a
-<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>, use plain attribute access:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="n">some_namespace</span><span class="o">.</span><span class="n">foo</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p><a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> also contains several built-in attributes
-described here.</p>
-<dl class="attribute">
-<dt id="mako.runtime.Namespace.attr">
-<tt class="descname">attr</tt><a class="headerlink" href="#mako.runtime.Namespace.attr" title="Permalink to this definition">¶</a></dt>
-<dd><p>Access module level attributes by name.</p>
-<p>This accessor allows templates to supply “scalar”
-attributes which are particularly handy in inheritance
-relationships. See the example in
-<a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="mako.runtime.Namespace.cache">
-<tt class="descname">cache</tt><a class="headerlink" href="#mako.runtime.Namespace.cache" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return the <a class="reference internal" href="caching.html#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> object referenced
-by this <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> object’s
-<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="mako.runtime.Namespace.context">
-<tt class="descname">context</tt><em class="property"> = None</em><a class="headerlink" href="#mako.runtime.Namespace.context" title="Permalink to this definition">¶</a></dt>
-<dd><p>The <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object for this <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>.</p>
-<p>Namespaces are often created with copies of contexts that
-contain slightly different data, particularly in inheritance
-scenarios. Using the <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> off of a <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> one
-can traverse an entire chain of templates that inherit from
-one-another.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="mako.runtime.Namespace.filename">
-<tt class="descname">filename</tt><em class="property"> = None</em><a class="headerlink" href="#mako.runtime.Namespace.filename" title="Permalink to this definition">¶</a></dt>
-<dd><p>The path of the filesystem file used for this
-<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>‘s module or template.</p>
-<p>If this is a pure module-based
-<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>, this evaluates to <tt class="docutils literal"><span class="pre">module.__file__</span></tt>. If a
-template-based namespace, it evaluates to the original
-template file location.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.runtime.Namespace.get_cached">
-<tt class="descname">get_cached</tt><big>(</big><em>key</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mako.runtime.Namespace.get_cached" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return a value from the <a class="reference internal" href="caching.html#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> referenced by this
-<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> object’s <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>.</p>
-<p>The advantage to this method versus direct access to the
-<a class="reference internal" href="caching.html#mako.cache.Cache" title="mako.cache.Cache"><tt class="xref py py-class docutils literal"><span class="pre">Cache</span></tt></a> is that the configuration parameters
-declared in <tt class="docutils literal"><span class="pre"><%page></span></tt> take effect here, thereby calling
-up the same configured backend as that configured
-by <tt class="docutils literal"><span class="pre"><%page></span></tt>.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.runtime.Namespace.get_namespace">
-<tt class="descname">get_namespace</tt><big>(</big><em>uri</em><big>)</big><a class="headerlink" href="#mako.runtime.Namespace.get_namespace" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return a <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> corresponding to the given <tt class="docutils literal"><span class="pre">uri</span></tt>.</p>
-<p>If the given <tt class="docutils literal"><span class="pre">uri</span></tt> is a relative URI (i.e. it does not
-contain a leading slash <tt class="docutils literal"><span class="pre">/</span></tt>), the <tt class="docutils literal"><span class="pre">uri</span></tt> is adjusted to
-be relative to the <tt class="docutils literal"><span class="pre">uri</span></tt> of the namespace itself. This
-method is therefore mostly useful off of the built-in
-<tt class="docutils literal"><span class="pre">local</span></tt> namespace, described in <a class="reference internal" href="#namespace-local"><em>local</em></a>.</p>
-<p>In
-most cases, a template wouldn’t need this function, and
-should instead use the <tt class="docutils literal"><span class="pre"><%namespace></span></tt> tag to load
-namespaces. However, since all <tt class="docutils literal"><span class="pre"><%namespace></span></tt> tags are
-evaluated before the body of a template ever runs,
-this method can be used to locate namespaces using
-expressions that were generated within the body code of
-the template, or to conditionally use a particular
-namespace.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.runtime.Namespace.get_template">
-<tt class="descname">get_template</tt><big>(</big><em>uri</em><big>)</big><a class="headerlink" href="#mako.runtime.Namespace.get_template" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return a <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> from the given <tt class="docutils literal"><span class="pre">uri</span></tt>.</p>
-<p>The <tt class="docutils literal"><span class="pre">uri</span></tt> resolution is relative to the <tt class="docutils literal"><span class="pre">uri</span></tt> of this <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>
-object’s <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.runtime.Namespace.include_file">
-<tt class="descname">include_file</tt><big>(</big><em>uri</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mako.runtime.Namespace.include_file" title="Permalink to this definition">¶</a></dt>
-<dd><p>Include a file at the given <tt class="docutils literal"><span class="pre">uri</span></tt>.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="mako.runtime.Namespace.module">
-<tt class="descname">module</tt><em class="property"> = None</em><a class="headerlink" href="#mako.runtime.Namespace.module" title="Permalink to this definition">¶</a></dt>
-<dd><p>The Python module referenced by this <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>.</p>
-<p>If the namespace references a <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>, then
-this module is the equivalent of <tt class="docutils literal"><span class="pre">template.module</span></tt>,
-i.e. the generated module for the template.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="mako.runtime.Namespace.template">
-<tt class="descname">template</tt><em class="property"> = None</em><a class="headerlink" href="#mako.runtime.Namespace.template" title="Permalink to this definition">¶</a></dt>
-<dd><p>The <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object referenced by this
-<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>, if any.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="mako.runtime.Namespace.uri">
-<tt class="descname">uri</tt><em class="property"> = None</em><a class="headerlink" href="#mako.runtime.Namespace.uri" title="Permalink to this definition">¶</a></dt>
-<dd><p>The URI for this <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>‘s template.</p>
-<p>I.e. whatever was sent to <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup.get_template" title="mako.lookup.TemplateLookup.get_template"><tt class="xref py py-meth docutils literal"><span class="pre">TemplateLookup.get_template()</span></tt></a>.</p>
-<p>This is the equivalent of <tt class="xref py py-attr docutils literal"><span class="pre">Template.uri</span></tt>.</p>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="class">
-<dt id="mako.runtime.TemplateNamespace">
-<em class="property">class </em><tt class="descclassname">mako.runtime.</tt><tt class="descname">TemplateNamespace</tt><big>(</big><em>name</em>, <em>context</em>, <em>template=None</em>, <em>templateuri=None</em>, <em>callables=None</em>, <em>inherits=None</em>, <em>populate_self=True</em>, <em>calling_uri=None</em><big>)</big><a class="headerlink" href="#mako.runtime.TemplateNamespace" title="Permalink to this definition">¶</a></dt>
-<dd><p>Bases: <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">mako.runtime.Namespace</span></tt></a></p>
-<p>A <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> specific to a <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> instance.</p>
-<dl class="attribute">
-<dt id="mako.runtime.TemplateNamespace.filename">
-<tt class="descname">filename</tt><a class="headerlink" href="#mako.runtime.TemplateNamespace.filename" title="Permalink to this definition">¶</a></dt>
-<dd><p>The path of the filesystem file used for this
-<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>‘s module or template.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="mako.runtime.TemplateNamespace.module">
-<tt class="descname">module</tt><a class="headerlink" href="#mako.runtime.TemplateNamespace.module" title="Permalink to this definition">¶</a></dt>
-<dd><p>The Python module referenced by this <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>.</p>
-<p>If the namespace references a <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>, then
-this module is the equivalent of <tt class="docutils literal"><span class="pre">template.module</span></tt>,
-i.e. the generated module for the template.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="mako.runtime.TemplateNamespace.uri">
-<tt class="descname">uri</tt><a class="headerlink" href="#mako.runtime.TemplateNamespace.uri" title="Permalink to this definition">¶</a></dt>
-<dd><p>The URI for this <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>‘s template.</p>
-<p>I.e. whatever was sent to <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup.get_template" title="mako.lookup.TemplateLookup.get_template"><tt class="xref py py-meth docutils literal"><span class="pre">TemplateLookup.get_template()</span></tt></a>.</p>
-<p>This is the equivalent of <tt class="xref py py-attr docutils literal"><span class="pre">Template.uri</span></tt>.</p>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="class">
-<dt id="mako.runtime.ModuleNamespace">
-<em class="property">class </em><tt class="descclassname">mako.runtime.</tt><tt class="descname">ModuleNamespace</tt><big>(</big><em>name</em>, <em>context</em>, <em>module</em>, <em>callables=None</em>, <em>inherits=None</em>, <em>populate_self=True</em>, <em>calling_uri=None</em><big>)</big><a class="headerlink" href="#mako.runtime.ModuleNamespace" title="Permalink to this definition">¶</a></dt>
-<dd><p>Bases: <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">mako.runtime.Namespace</span></tt></a></p>
-<p>A <a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a> specific to a Python module instance.</p>
-<dl class="attribute">
-<dt id="mako.runtime.ModuleNamespace.filename">
-<tt class="descname">filename</tt><a class="headerlink" href="#mako.runtime.ModuleNamespace.filename" title="Permalink to this definition">¶</a></dt>
-<dd><p>The path of the filesystem file used for this
-<a class="reference internal" href="#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>‘s module or template.</p>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="function">
-<dt id="mako.runtime.supports_caller">
-<tt class="descclassname">mako.runtime.</tt><tt class="descname">supports_caller</tt><big>(</big><em>func</em><big>)</big><a class="headerlink" href="#mako.runtime.supports_caller" title="Permalink to this definition">¶</a></dt>
-<dd><p>Apply a caller_stack compatibility decorator to a plain
-Python function.</p>
-<p>See the example in <a class="reference internal" href="#namespaces-python-modules"><em>Namespaces from Regular Python Modules</em></a>.</p>
-</dd></dl>
-
-<dl class="function">
-<dt id="mako.runtime.capture">
-<tt class="descclassname">mako.runtime.</tt><tt class="descname">capture</tt><big>(</big><em>context</em>, <em>callable_</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mako.runtime.capture" title="Permalink to this definition">¶</a></dt>
-<dd><p>Execute the given template def, capturing the output into
-a buffer.</p>
-<p>See the example in <a class="reference internal" href="#namespaces-python-modules"><em>Namespaces from Regular Python Modules</em></a>.</p>
-</dd></dl>
-
-</div>
-</div>
-
-    </div>
-
-</div>
-
-<div id="docs-bottom-navigation" class="docs-navigation-links">
-        Previous:
-        <a href="runtime.html" title="previous chapter">The Mako Runtime Environment</a>
-        Next:
-        <a href="inheritance.html" title="next chapter">Inheritance</a>
-
-    <div id="docs-copyright">
-        © Copyright the Mako authors and contributors.
-        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
-        with Mako templates.
-    </div>
-</div>
-
-</div>
-
-<div class="clearfix">
-
-<hr/>
-
-<div class="copyright">Website content copyright © by Michael Bayer.
-    All rights reserved.  Mako and its documentation are licensed
-    under the MIT license.  mike(&)zzzcomputing.com</div>
-
-</div>
-</div>
-</body>
-</html>
diff --git a/lib/mako-0.7.2/doc/runtime.html b/lib/mako-0.7.2/doc/runtime.html
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/runtime.html
+++ /dev/null
@@ -1,708 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
-<head>
-<title>
-    
-                The Mako Runtime Environment
-             — 
-    Mako 0.7.2 Documentation
-</title>
-
-    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
-
-    <script type="text/javascript">
-      var DOCUMENTATION_OPTIONS = {
-          URL_ROOT:    '#',
-          VERSION:     '0.7.2',
-          COLLAPSE_MODINDEX: false,
-          FILE_SUFFIX: '.html'
-      };
-    </script>
-        <script type="text/javascript" src="_static/jquery.js"></script>
-        <script type="text/javascript" src="_static/underscore.js"></script>
-        <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
-    <link rel="top" title="Mako 0.7.2 Documentation" href="index.html" />
-        <link rel="next" title="Namespaces" href="namespaces.html" />
-        <link rel="prev" title="Defs and Blocks" href="defs.html" />
-
-<link rel="stylesheet" href="_static/site.css"></link>
-
-
-</head>
-<body>
-    <div id="wrap">
-    <div class="rightbar">
-    <div class="slogan">
-    Hyperfast and lightweight templating for the Python platform.
-    </div>
-
-
-    </div>
-
-    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
-
-    <hr/>
-
-    
-
-
-
-
-
-
-
-
-
-<div id="docs-container">
-
-
-
-<div id="docs-header">
-    <h1>Mako 0.7.2 Documentation</h1>
-
-    <div id="docs-search">
-    Search:
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </div>
-
-    <div id="docs-version-header">
-        Release: <span class="version-num">0.7.2</span>
-
-    </div>
-
-</div>
-
-<div id="docs-top-navigation">
-    <div id="docs-top-page-control" class="docs-navigation-links">
-        <ul>
-            <li>Prev:
-            <a href="defs.html" title="previous chapter">Defs and Blocks</a>
-            </li>
-            <li>Next:
-            <a href="namespaces.html" title="next chapter">Namespaces</a>
-            </li>
-
-        <li>
-            <a href="index.html">Table of Contents</a> |
-            <a href="genindex.html">Index</a>
-            | <a href="_sources/runtime.txt">view source
-        </li>
-        </ul>
-    </div>
-
-    <div id="docs-navigation-banner">
-        <a href="index.html">Mako 0.7.2 Documentation</a>
-        » 
-                The Mako Runtime Environment
-             
-
-        <h2>
-            
-                The Mako Runtime Environment
-            
-        </h2>
-    </div>
-
-</div>
-
-<div id="docs-body-container">
-
-    <div id="docs-sidebar">
-    <h3><a href="index.html">Table of Contents</a></h3>
-    <ul>
-<li><a class="reference internal" href="#">The Mako Runtime Environment</a><ul>
-<li><a class="reference internal" href="#context">Context</a><ul>
-<li><a class="reference internal" href="#the-buffer">The Buffer</a></li>
-<li><a class="reference internal" href="#context-variables">Context Variables</a></li>
-<li><a class="reference internal" href="#context-methods-and-accessors">Context Methods and Accessors</a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#the-loop-context">The Loop Context</a><ul>
-<li><a class="reference internal" href="#iterations">Iterations</a></li>
-<li><a class="reference internal" href="#cycling">Cycling</a></li>
-<li><a class="reference internal" href="#parent-loops">Parent Loops</a></li>
-<li><a class="reference internal" href="#migrating-legacy-templates-that-use-the-word-loop">Migrating Legacy Templates that Use the Word “loop”</a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#all-the-built-in-names">All the Built-in Names</a><ul>
-<li><a class="reference internal" href="#reserved-names">Reserved Names</a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#api-reference">API Reference</a></li>
-</ul>
-</li>
-</ul>
-
-
-    <h4>Previous Topic</h4>
-    <p>
-    <a href="defs.html" title="previous chapter">Defs and Blocks</a>
-    </p>
-    <h4>Next Topic</h4>
-    <p>
-    <a href="namespaces.html" title="next chapter">Namespaces</a>
-    </p>
-
-    <h4>Quick Search</h4>
-    <p>
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </p>
-
-    </div>
-
-    <div id="docs-body" class="withsidebar" >
-        
-<div class="section" id="the-mako-runtime-environment">
-<span id="runtime-toplevel"></span><h1>The Mako Runtime Environment<a class="headerlink" href="#the-mako-runtime-environment" title="Permalink to this headline">¶</a></h1>
-<p>This section describes a little bit about the objects and
-built-in functions that are available in templates.</p>
-<div class="section" id="context">
-<span id="id1"></span><h2>Context<a class="headerlink" href="#context" title="Permalink to this headline">¶</a></h2>
-<p>The <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> is the central object that is created when
-a template is first executed, and is responsible for handling
-all communication with the outside world.  Within the template
-environment, it is available via the <a class="reference internal" href="#reserved-names"><em>reserved name</em></a>
-<tt class="docutils literal"><span class="pre">context</span></tt>.  The <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> includes two
-major components, one of which is the output buffer, which is a
-file-like object such as Python’s <tt class="docutils literal"><span class="pre">StringIO</span></tt> or similar, and
-the other a dictionary of variables that can be freely
-referenced within a template; this dictionary is a combination
-of the arguments sent to the <a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> function and
-some built-in variables provided by Mako’s runtime environment.</p>
-<div class="section" id="the-buffer">
-<h3>The Buffer<a class="headerlink" href="#the-buffer" title="Permalink to this headline">¶</a></h3>
-<p>The buffer is stored within the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>, and writing
-to it is achieved by calling the <a class="reference internal" href="#mako.runtime.Context.write" title="mako.runtime.Context.write"><tt class="xref py py-meth docutils literal"><span class="pre">write()</span></tt></a> method
-– in a template this looks like <tt class="docutils literal"><span class="pre">context.write('some</span> <span class="pre">string')</span></tt>.
-You usually don’t need to care about this, as all text within a template, as
-well as all expressions provided by <tt class="docutils literal"><span class="pre">${}</span></tt>, automatically send
-everything to this method. The cases you might want to be aware
-of its existence are if you are dealing with various
-filtering/buffering scenarios, which are described in
-<a class="reference internal" href="filtering.html"><em>Filtering and Buffering</em></a>, or if you want to programmatically
-send content to the output stream, such as within a <tt class="docutils literal"><span class="pre"><%</span> <span class="pre">%></span></tt>
-block.</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span>
-    <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"some programmatic text"</span><span class="p">)</span>
-<span class="cp">%></span><span class="x"></span>
-</pre></div>
-</div>
-<p>The actual buffer may or may not be the original buffer sent to
-the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object, as various filtering/caching
-scenarios may “push” a new buffer onto the context’s underlying
-buffer stack. For this reason, just stick with
-<tt class="docutils literal"><span class="pre">context.write()</span></tt> and content will always go to the topmost
-buffer.</p>
-</div>
-<div class="section" id="context-variables">
-<span id="context-vars"></span><h3>Context Variables<a class="headerlink" href="#context-variables" title="Permalink to this headline">¶</a></h3>
-<p>When your template is compiled into a Python module, the body
-content is enclosed within a Python function called
-<tt class="docutils literal"><span class="pre">render_body</span></tt>. Other top-level defs defined in the template are
-defined within their own function bodies which are named after
-the def’s name with the prefix <tt class="docutils literal"><span class="pre">render_</span></tt> (i.e. <tt class="docutils literal"><span class="pre">render_mydef</span></tt>).
-One of the first things that happens within these functions is
-that all variable names that are referenced within the function
-which are not defined in some other way (i.e. such as via
-assignment, module level imports, etc.) are pulled from the
-<a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object’s dictionary of variables. This is how you’re
-able to freely reference variable names in a template which
-automatically correspond to what was passed into the current
-<a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
-<ul>
-<li><p class="first"><strong>What happens if I reference a variable name that is not in
-the current context?</strong> - The value you get back is a special
-value called <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt>, or if the <tt class="docutils literal"><span class="pre">strict_undefined=True</span></tt> flag
-is used a <tt class="docutils literal"><span class="pre">NameError</span></tt> is raised. <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> is just a simple global
-variable with the class <a class="reference internal" href="#mako.runtime.Undefined" title="mako.runtime.Undefined"><tt class="xref py py-class docutils literal"><span class="pre">mako.runtime.Undefined</span></tt></a>. The
-<tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> object throws an error when you call <tt class="docutils literal"><span class="pre">str()</span></tt> on
-it, which is what happens if you try to use it in an
-expression.</p>
-</li>
-<li><p class="first"><strong>UNDEFINED makes it hard for me to find what name is missing</strong> - An alternative
-is to specify the option <tt class="docutils literal"><span class="pre">strict_undefined=True</span></tt>
-to the <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> or <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>.  This will cause
-any non-present variables to raise an immediate <tt class="docutils literal"><span class="pre">NameError</span></tt>
-which includes the name of the variable in its message
-when <a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> is called – <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> is not used.</p>
-<p class="versionadded">
-<span class="versionmodified">New in version 0.3.6.</span></p>
-</li>
-<li><p class="first"><strong>Why not just return None?</strong> Using <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt>, or
-raising a <tt class="docutils literal"><span class="pre">NameError</span></tt> is more
-explicit and allows differentiation between a value of <tt class="docutils literal"><span class="pre">None</span></tt>
-that was explicitly passed to the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> and a value that
-wasn’t present at all.</p>
-</li>
-<li><p class="first"><strong>Why raise an exception when you call str() on it ? Why not
-just return a blank string?</strong> - Mako tries to stick to the
-Python philosophy of “explicit is better than implicit”. In
-this case, it’s decided that the template author should be made
-to specifically handle a missing value rather than
-experiencing what may be a silent failure. Since <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt>
-is a singleton object just like Python’s <tt class="docutils literal"><span class="pre">True</span></tt> or <tt class="docutils literal"><span class="pre">False</span></tt>,
-you can use the <tt class="docutils literal"><span class="pre">is</span></tt> operator to check for it:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">%</span> <span class="k">if</span> <span class="n">someval</span> <span class="ow">is</span> <span class="n">UNDEFINED</span><span class="p">:</span><span class="x"></span>
-<span class="x">    someval is: no value</span>
-<span class="cp">%</span> <span class="k">else</span><span class="p">:</span><span class="x"></span>
-<span class="x">    someval is: </span><span class="cp">${</span><span class="n">someval</span><span class="cp">}</span>
-<span class="cp">%</span><span class="k"> endif</span><span class="x"></span>
-</pre></div>
-</div>
-</li>
-</ul>
-<p>Another facet of the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> is that its dictionary of
-variables is <strong>immutable</strong>. Whatever is set when
-<a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> is called is what stays. Of course, since
-its Python, you can hack around this and change values in the
-context’s internal dictionary, but this will probably will not
-work as well as you’d think. The reason for this is that Mako in
-many cases creates copies of the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object, which
-get sent to various elements of the template and inheriting
-templates used in an execution. So changing the value in your
-local <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> will not necessarily make that value
-available in other parts of the template’s execution. Examples
-of where Mako creates copies of the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> include
-within top-level def calls from the main body of the template
-(the context is used to propagate locally assigned variables
-into the scope of defs; since in the template’s body they appear
-as inlined functions, Mako tries to make them act that way), and
-within an inheritance chain (each template in an inheritance
-chain has a different notion of <tt class="docutils literal"><span class="pre">parent</span></tt> and <tt class="docutils literal"><span class="pre">next</span></tt>, which
-are all stored in unique <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> instances).</p>
-<ul>
-<li><p class="first"><strong>So what if I want to set values that are global to everyone
-within a template request?</strong> - All you have to do is provide a
-dictionary to your <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> when the template first
-runs, and everyone can just get/set variables from that. Lets
-say its called <tt class="docutils literal"><span class="pre">attributes</span></tt>.</p>
-<p>Running the template looks like:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">output</span> <span class="o">=</span> <span class="n">template</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="n">attributes</span><span class="o">=</span><span class="p">{})</span>
-</pre></div>
-</div>
-<p>Within a template, just reference the dictionary:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span>
-    <span class="n">attributes</span><span class="p">[</span><span class="s">'foo'</span><span class="p">]</span> <span class="o">=</span> <span class="s">'bar'</span>
-<span class="cp">%></span><span class="x"></span>
-<span class="x">'foo' attribute is: </span><span class="cp">${</span><span class="n">attributes</span><span class="p">[</span><span class="s">'foo'</span><span class="p">]</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-</li>
-<li><p class="first"><strong>Why can’t “attributes” be a built-in feature of the
-Context?</strong> - This is an area where Mako is trying to make as
-few decisions about your application as it possibly can.
-Perhaps you don’t want your templates to use this technique of
-assigning and sharing data, or perhaps you have a different
-notion of the names and kinds of data structures that should
-be passed around. Once again Mako would rather ask the user to
-be explicit.</p>
-</li>
-</ul>
-</div>
-<div class="section" id="context-methods-and-accessors">
-<h3>Context Methods and Accessors<a class="headerlink" href="#context-methods-and-accessors" title="Permalink to this headline">¶</a></h3>
-<p>Significant members of <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> include:</p>
-<ul>
-<li><p class="first"><tt class="docutils literal"><span class="pre">context[key]</span></tt> / <tt class="docutils literal"><span class="pre">context.get(key,</span> <span class="pre">default=None)</span></tt> -
-dictionary-like accessors for the context. Normally, any
-variable you use in your template is automatically pulled from
-the context if it isn’t defined somewhere already. Use the
-dictionary accessor and/or <tt class="docutils literal"><span class="pre">get</span></tt> method when you want a
-variable that <em>is</em> already defined somewhere else, such as in
-the local arguments sent to a <tt class="docutils literal"><span class="pre">%def</span></tt> call. If a key is not
-present, like a dictionary it raises <tt class="docutils literal"><span class="pre">KeyError</span></tt>.</p>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">keys()</span></tt> - all the names defined within this context.</p>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">kwargs</span></tt> - this returns a <strong>copy</strong> of the context’s
-dictionary of variables. This is useful when you want to
-propagate the variables in the current context to a function
-as keyword arguments, i.e.:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="nb">next</span><span class="o">.</span><span class="n">body</span><span class="p">(</span><span class="o">**</span><span class="n">context</span><span class="o">.</span><span class="n">kwargs</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">write(text)</span></tt> - write some text to the current output
-stream.</p>
-</li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">lookup</span></tt> - returns the <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> instance that is
-used for all file-lookups within the current execution (even
-though individual <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> instances can conceivably have
-different instances of a <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>, only the
-<a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> of the originally-called <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> gets
-used in a particular execution).</p>
-</li>
-</ul>
-</div>
-</div>
-<div class="section" id="the-loop-context">
-<span id="loop-context"></span><h2>The Loop Context<a class="headerlink" href="#the-loop-context" title="Permalink to this headline">¶</a></h2>
-<p>Within <tt class="docutils literal"><span class="pre">%</span> <span class="pre">for</span></tt> blocks, the <a class="reference internal" href="#reserved-names"><em>reserved name</em></a> <tt class="docutils literal"><span class="pre">loop</span></tt>
-is available.  <tt class="docutils literal"><span class="pre">loop</span></tt> tracks the progress of
-the <tt class="docutils literal"><span class="pre">for</span></tt> loop and makes it easy to use the iteration state to control
-template behavior:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><ul></span>
-<span class="cp">%</span> <span class="k">for</span> <span class="n">a</span> <span class="ow">in</span> <span class="p">(</span><span class="s">"one"</span><span class="p">,</span> <span class="s">"two"</span><span class="p">,</span> <span class="s">"three"</span><span class="p">):</span><span class="x"></span>
-<span class="x">    <li>Item </span><span class="cp">${</span><span class="n">loop</span><span class="o">.</span><span class="n">index</span><span class="cp">}</span><span class="x">: </span><span class="cp">${</span><span class="n">a</span><span class="cp">}</span><span class="x"></li></span>
-<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
-<span class="x"></ul></span>
-</pre></div>
-</div>
-<p class="versionadded">
-<span class="versionmodified">New in version 0.7.</span></p>
-<div class="section" id="iterations">
-<h3>Iterations<a class="headerlink" href="#iterations" title="Permalink to this headline">¶</a></h3>
-<p>Regardless of the type of iterable you’re looping over, <tt class="docutils literal"><span class="pre">loop</span></tt> always tracks
-the 0-indexed iteration count (available at <tt class="docutils literal"><span class="pre">loop.index</span></tt>), its parity
-(through the <tt class="docutils literal"><span class="pre">loop.even</span></tt> and <tt class="docutils literal"><span class="pre">loop.odd</span></tt> bools), and <tt class="docutils literal"><span class="pre">loop.first</span></tt>, a bool
-indicating whether the loop is on its first iteration.  If your iterable
-provides a <tt class="docutils literal"><span class="pre">__len__</span></tt> method, <tt class="docutils literal"><span class="pre">loop</span></tt> also provides access to
-a count of iterations remaining at <tt class="docutils literal"><span class="pre">loop.reverse_index</span></tt> and <tt class="docutils literal"><span class="pre">loop.last</span></tt>,
-a bool indicating whether the loop is on its last iteration; accessing these
-without <tt class="docutils literal"><span class="pre">__len__</span></tt> will raise a <tt class="docutils literal"><span class="pre">TypeError</span></tt>.</p>
-</div>
-<div class="section" id="cycling">
-<h3>Cycling<a class="headerlink" href="#cycling" title="Permalink to this headline">¶</a></h3>
-<p>Cycling is available regardless of whether the iterable you’re using provides
-a <tt class="docutils literal"><span class="pre">__len__</span></tt> method.  Prior to Mako 0.7, you might have generated a simple
-zebra striped list using <tt class="docutils literal"><span class="pre">enumerate</span></tt>:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><ul></span>
-<span class="cp">%</span> <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">item</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">((</span><span class="s">'spam'</span><span class="p">,</span> <span class="s">'ham'</span><span class="p">,</span> <span class="s">'eggs'</span><span class="p">)):</span><span class="x"></span>
-<span class="x">  <li class="</span><span class="cp">${</span><span class="s">'odd'</span> <span class="k">if</span> <span class="n">i</span> <span class="o">%</span> <span class="mi">2</span> <span class="k">else</span> <span class="s">'even'</span><span class="cp">}</span><span class="x">"></span><span class="cp">${</span><span class="n">item</span><span class="cp">}</span><span class="x"></li></span>
-<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
-<span class="x"></ul></span>
-</pre></div>
-</div>
-<p>With <tt class="docutils literal"><span class="pre">loop.cycle</span></tt>, you get the same results with cleaner code and less prep work:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><ul></span>
-<span class="cp">%</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="p">(</span><span class="s">'spam'</span><span class="p">,</span> <span class="s">'ham'</span><span class="p">,</span> <span class="s">'eggs'</span><span class="p">):</span><span class="x"></span>
-<span class="x">  <li class="</span><span class="cp">${</span><span class="n">loop</span><span class="o">.</span><span class="n">cycle</span><span class="p">(</span><span class="s">'even'</span><span class="p">,</span> <span class="s">'odd'</span><span class="p">)</span><span class="cp">}</span><span class="x">"></span><span class="cp">${</span><span class="n">item</span><span class="cp">}</span><span class="x"></li></span>
-<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
-<span class="x"></ul></span>
-</pre></div>
-</div>
-<p>Both approaches produce output like the following:</p>
-<div class="highlight-html"><div class="highlight"><pre><span class="nt"><ul></span>
-  <span class="nt"><li</span> <span class="na">class=</span><span class="s">"even"</span><span class="nt">></span>spam<span class="nt"></li></span>
-  <span class="nt"><li</span> <span class="na">class=</span><span class="s">"odd"</span><span class="nt">></span>ham<span class="nt"></li></span>
-  <span class="nt"><li</span> <span class="na">class=</span><span class="s">"even"</span><span class="nt">></span>eggs<span class="nt"></li></span>
-<span class="nt"></ul></span>
-</pre></div>
-</div>
-</div>
-<div class="section" id="parent-loops">
-<h3>Parent Loops<a class="headerlink" href="#parent-loops" title="Permalink to this headline">¶</a></h3>
-<p>Loop contexts can also be transparently nested, and the Mako runtime will do
-the right thing and manage the scope for you.  You can access the parent loop
-context through <tt class="docutils literal"><span class="pre">loop.parent</span></tt>.</p>
-<p>This allows you to reach all the way back up through the loop stack by
-chaining <tt class="docutils literal"><span class="pre">parent</span></tt> attribute accesses, i.e. <tt class="docutils literal"><span class="pre">loop.parent.parent....</span></tt> as
-long as the stack depth isn’t exceeded.  For example, you can use the parent
-loop to make a checkered table:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><table></span>
-<span class="cp">%</span> <span class="k">for</span> <span class="n">consonant</span> <span class="ow">in</span> <span class="s">'pbj'</span><span class="p">:</span><span class="x"></span>
-<span class="x">  <tr></span>
-  <span class="cp">%</span> <span class="k">for</span> <span class="n">vowel</span> <span class="ow">in</span> <span class="s">'iou'</span><span class="p">:</span><span class="x"></span>
-<span class="x">    <td class="</span><span class="cp">${</span><span class="s">'black'</span> <span class="k">if</span> <span class="p">(</span><span class="n">loop</span><span class="o">.</span><span class="n">parent</span><span class="o">.</span><span class="n">even</span> <span class="o">==</span> <span class="n">loop</span><span class="o">.</span><span class="n">even</span><span class="p">)</span> <span class="k">else</span> <span class="s">'red'</span><span class="cp">}</span><span class="x">"></span>
-<span class="x">      </span><span class="cp">${</span><span class="n">consonant</span> <span class="o">+</span> <span class="n">vowel</span><span class="cp">}</span><span class="x">t</span>
-<span class="x">    </td></span>
-  <span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
-<span class="x">  </tr></span>
-<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
-<span class="x"></table></span>
-</pre></div>
-</div>
-<div class="highlight-html"><div class="highlight"><pre><span class="nt"><table></span>
-  <span class="nt"><tr></span>
-    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"black"</span><span class="nt">></span>
-      pit
-    <span class="nt"></td></span>
-    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"red"</span><span class="nt">></span>
-      pot
-    <span class="nt"></td></span>
-    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"black"</span><span class="nt">></span>
-      put
-    <span class="nt"></td></span>
-  <span class="nt"></tr></span>
-  <span class="nt"><tr></span>
-    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"red"</span><span class="nt">></span>
-      bit
-    <span class="nt"></td></span>
-    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"black"</span><span class="nt">></span>
-      bot
-    <span class="nt"></td></span>
-    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"red"</span><span class="nt">></span>
-      but
-    <span class="nt"></td></span>
-  <span class="nt"></tr></span>
-  <span class="nt"><tr></span>
-    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"black"</span><span class="nt">></span>
-      jit
-    <span class="nt"></td></span>
-    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"red"</span><span class="nt">></span>
-      jot
-    <span class="nt"></td></span>
-    <span class="nt"><td</span> <span class="na">class=</span><span class="s">"black"</span><span class="nt">></span>
-      jut
-    <span class="nt"></td></span>
-  <span class="nt"></tr></span>
-<span class="nt"></table></span>
-</pre></div>
-</div>
-</div>
-<div class="section" id="migrating-legacy-templates-that-use-the-word-loop">
-<span id="migrating-loop"></span><h3>Migrating Legacy Templates that Use the Word “loop”<a class="headerlink" href="#migrating-legacy-templates-that-use-the-word-loop" title="Permalink to this headline">¶</a></h3>
-<p class="versionchanged">
-<span class="versionmodified">Changed in version 0.7: </span>The <tt class="docutils literal"><span class="pre">loop</span></tt> name is now <a class="reference internal" href="#reserved-names"><em>reserved</em></a> in Mako,
-which means a template that refers to a variable named <tt class="docutils literal"><span class="pre">loop</span></tt>
-won’t function correctly when used in Mako 0.7.</p>
-<p>To ease the transition for such systems, the feature can be disabled across the board for
-all templates, then re-enabled on a per-template basis for those templates which wish
-to make use of the new system.</p>
-<p>First, the <tt class="docutils literal"><span class="pre">enable_loop=False</span></tt> flag is passed to either the <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>
-or <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object in use:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">lookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/docs'</span><span class="p">],</span> <span class="n">enable_loop</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
-</pre></div>
-</div>
-<p>or:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">template</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"some template"</span><span class="p">,</span> <span class="n">enable_loop</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
-</pre></div>
-</div>
-<p>An individual template can make usage of the feature when <tt class="docutils literal"><span class="pre">enable_loop</span></tt> is set to
-<tt class="docutils literal"><span class="pre">False</span></tt> by switching it back on within the <tt class="docutils literal"><span class="pre"><%page></span></tt> tag:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">enable_loop=</span><span class="s">"True"</span><span class="cp">/></span>
-
-<span class="cp">%</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">collection</span><span class="p">:</span><span class="x"></span>
-<span class="x">    </span><span class="cp">${</span><span class="n">i</span><span class="cp">}</span><span class="x"> </span><span class="cp">${</span><span class="n">loop</span><span class="o">.</span><span class="n">index</span><span class="cp">}</span>
-<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
-</pre></div>
-</div>
-<p>Using the above scheme, it’s safe to pass the name <tt class="docutils literal"><span class="pre">loop</span></tt> to the <a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">Template.render()</span></tt></a>
-method as well as to freely make usage of a variable named <tt class="docutils literal"><span class="pre">loop</span></tt> within a template, provided
-the <tt class="docutils literal"><span class="pre"><%page></span></tt> tag doesn’t override it.  New templates that want to use the <tt class="docutils literal"><span class="pre">loop</span></tt> context
-can then set up <tt class="docutils literal"><span class="pre"><%page</span> <span class="pre">enable_loop="True"/></span></tt> to use the new feature without affecting
-old templates.</p>
-</div>
-</div>
-<div class="section" id="all-the-built-in-names">
-<h2>All the Built-in Names<a class="headerlink" href="#all-the-built-in-names" title="Permalink to this headline">¶</a></h2>
-<p>A one-stop shop for all the names Mako defines. Most of these
-names are instances of <a class="reference internal" href="namespaces.html#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">Namespace</span></tt></a>, which are described
-in the next section, <a class="reference internal" href="namespaces.html"><em>Namespaces</em></a>. Also, most of
-these names other than <tt class="docutils literal"><span class="pre">context</span></tt>, <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt>, and <tt class="docutils literal"><span class="pre">loop</span></tt> are
-also present <em>within</em> the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> itself.   The names
-<tt class="docutils literal"><span class="pre">context</span></tt>, <tt class="docutils literal"><span class="pre">loop</span></tt> and <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> themselves can’t be passed
-to the context and can’t be substituted – see the section <a class="reference internal" href="#reserved-names"><em>Reserved Names</em></a>.</p>
-<ul class="simple">
-<li><tt class="docutils literal"><span class="pre">context</span></tt> - this is the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object, introduced
-at <a class="reference internal" href="#context"><em>Context</em></a>.</li>
-<li><tt class="docutils literal"><span class="pre">local</span></tt> - the namespace of the current template, described
-in <a class="reference internal" href="namespaces.html#namespaces-builtin"><em>Built-in Namespaces</em></a>.</li>
-<li><tt class="docutils literal"><span class="pre">self</span></tt> - the namespace of the topmost template in an
-inheritance chain (if any, otherwise the same as <tt class="docutils literal"><span class="pre">local</span></tt>),
-mostly described in <a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</li>
-<li><tt class="docutils literal"><span class="pre">parent</span></tt> - the namespace of the parent template in an
-inheritance chain (otherwise undefined); see
-<a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</li>
-<li><tt class="docutils literal"><span class="pre">next</span></tt> - the namespace of the next template in an
-inheritance chain (otherwise undefined); see
-<a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</li>
-<li><tt class="docutils literal"><span class="pre">caller</span></tt> - a “mini” namespace created when using the
-<tt class="docutils literal"><span class="pre"><%call></span></tt> tag to define a “def call with content”; described
-in <a class="reference internal" href="defs.html#defs-with-content"><em>Calling a Def with Embedded Content and/or Other Defs</em></a>.</li>
-<li><tt class="docutils literal"><span class="pre">loop</span></tt> - this provides access to <a class="reference internal" href="#mako.runtime.LoopContext" title="mako.runtime.LoopContext"><tt class="xref py py-class docutils literal"><span class="pre">LoopContext</span></tt></a> objects when
-they are requested within <tt class="docutils literal"><span class="pre">%</span> <span class="pre">for</span></tt> loops, introduced at <a class="reference internal" href="#loop-context"><em>The Loop Context</em></a>.</li>
-<li><tt class="docutils literal"><span class="pre">capture</span></tt> - a function that calls a given def and captures
-its resulting content into a string, which is returned. Usage
-is described in <a class="reference internal" href="filtering.html"><em>Filtering and Buffering</em></a>.</li>
-<li><tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> - a global singleton that is applied to all
-otherwise uninitialized template variables that were not
-located within the <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> when rendering began,
-unless the <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> flag <tt class="docutils literal"><span class="pre">strict_undefined</span></tt>
-is set to <tt class="docutils literal"><span class="pre">True</span></tt>. <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> is
-an instance of <a class="reference internal" href="#mako.runtime.Undefined" title="mako.runtime.Undefined"><tt class="xref py py-class docutils literal"><span class="pre">Undefined</span></tt></a>, and raises an
-exception when its <tt class="docutils literal"><span class="pre">__str__()</span></tt> method is called.</li>
-<li><tt class="docutils literal"><span class="pre">pageargs</span></tt> - this is a dictionary which is present in a
-template which does not define any <tt class="docutils literal"><span class="pre">**kwargs</span></tt> section in its
-<tt class="docutils literal"><span class="pre"><%page></span></tt> tag. All keyword arguments sent to the <tt class="docutils literal"><span class="pre">body()</span></tt>
-function of a template (when used via namespaces) go here by
-default unless otherwise defined as a page argument. If this
-makes no sense, it shouldn’t; read the section
-<a class="reference internal" href="namespaces.html#namespaces-body"><em>The body() Method</em></a>.</li>
-</ul>
-<div class="section" id="reserved-names">
-<span id="id2"></span><h3>Reserved Names<a class="headerlink" href="#reserved-names" title="Permalink to this headline">¶</a></h3>
-<p>Mako has a few names that are considered to be “reserved” and can’t be used
-as variable names.</p>
-<p class="versionchanged">
-<span class="versionmodified">Changed in version 0.7: </span>Mako raises an error if these words are found passed to the template
-as context arguments, whereas in previous versions they’d be silently
-ignored or lead to other error messages.</p>
-<ul class="simple">
-<li><tt class="docutils literal"><span class="pre">context</span></tt> - see <a class="reference internal" href="#context"><em>Context</em></a>.</li>
-<li><tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> - see <a class="reference internal" href="#context-vars"><em>Context Variables</em></a>.</li>
-<li><tt class="docutils literal"><span class="pre">loop</span></tt> - see <a class="reference internal" href="#loop-context"><em>The Loop Context</em></a>.  Note this can be disabled for legacy templates
-via the <tt class="docutils literal"><span class="pre">enable_loop=False</span></tt> argument; see <a class="reference internal" href="#migrating-loop"><em>Migrating Legacy Templates that Use the Word “loop”</em></a>.</li>
-</ul>
-</div>
-</div>
-<div class="section" id="api-reference">
-<h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h2>
-<dl class="class">
-<dt id="mako.runtime.Context">
-<em class="property">class </em><tt class="descclassname">mako.runtime.</tt><tt class="descname">Context</tt><big>(</big><em>buffer</em>, <em>**data</em><big>)</big><a class="headerlink" href="#mako.runtime.Context" title="Permalink to this definition">¶</a></dt>
-<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
-<p>Provides runtime namespace, output buffer, and various
-callstacks for templates.</p>
-<p>See <a class="reference internal" href="#"><em>The Mako Runtime Environment</em></a> for detail on the usage of
-<a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
-<dl class="method">
-<dt id="mako.runtime.Context.get">
-<tt class="descname">get</tt><big>(</big><em>key</em>, <em>default=None</em><big>)</big><a class="headerlink" href="#mako.runtime.Context.get" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return a value from this <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.runtime.Context.keys">
-<tt class="descname">keys</tt><big>(</big><big>)</big><a class="headerlink" href="#mako.runtime.Context.keys" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return a list of all names established in this <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="mako.runtime.Context.kwargs">
-<tt class="descname">kwargs</tt><a class="headerlink" href="#mako.runtime.Context.kwargs" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return the dictionary of keyword arguments associated with this
-<a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.runtime.Context.locals_">
-<tt class="descname">locals_</tt><big>(</big><em>d</em><big>)</big><a class="headerlink" href="#mako.runtime.Context.locals_" title="Permalink to this definition">¶</a></dt>
-<dd><p>Create a new <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> with a copy of this
-<a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>‘s current state, updated with the given dictionary.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="mako.runtime.Context.lookup">
-<tt class="descname">lookup</tt><a class="headerlink" href="#mako.runtime.Context.lookup" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return the <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> associated
-with this <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.runtime.Context.pop_caller">
-<tt class="descname">pop_caller</tt><big>(</big><big>)</big><a class="headerlink" href="#mako.runtime.Context.pop_caller" title="Permalink to this definition">¶</a></dt>
-<dd><p>Pop a <tt class="docutils literal"><span class="pre">caller</span></tt> callable onto the callstack for this
-<a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.runtime.Context.push_caller">
-<tt class="descname">push_caller</tt><big>(</big><em>caller</em><big>)</big><a class="headerlink" href="#mako.runtime.Context.push_caller" title="Permalink to this definition">¶</a></dt>
-<dd><p>Push a <tt class="docutils literal"><span class="pre">caller</span></tt> callable onto the callstack for
-this <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.runtime.Context.write">
-<tt class="descname">write</tt><big>(</big><em>string</em><big>)</big><a class="headerlink" href="#mako.runtime.Context.write" title="Permalink to this definition">¶</a></dt>
-<dd><p>Write a string to this <a class="reference internal" href="#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object’s
-underlying output buffer.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.runtime.Context.writer">
-<tt class="descname">writer</tt><big>(</big><big>)</big><a class="headerlink" href="#mako.runtime.Context.writer" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return the current writer function.</p>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="class">
-<dt id="mako.runtime.LoopContext">
-<em class="property">class </em><tt class="descclassname">mako.runtime.</tt><tt class="descname">LoopContext</tt><big>(</big><em>iterable</em><big>)</big><a class="headerlink" href="#mako.runtime.LoopContext" title="Permalink to this definition">¶</a></dt>
-<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
-<p>A magic loop variable.
-Automatically accessible in any <tt class="docutils literal"><span class="pre">%</span> <span class="pre">for</span></tt> block.</p>
-<p>See the section <a class="reference internal" href="#loop-context"><em>The Loop Context</em></a> for usage
-notes.</p>
-<dl class="docutils">
-<dt><tt class="xref py py-attr docutils literal"><span class="pre">parent</span></tt> -> <a class="reference internal" href="#mako.runtime.LoopContext" title="mako.runtime.LoopContext"><tt class="xref py py-class docutils literal"><span class="pre">LoopContext</span></tt></a> or <tt class="docutils literal"><span class="pre">None</span></tt></dt>
-<dd>The parent loop, if one exists.</dd>
-<dt><tt class="xref py py-attr docutils literal"><span class="pre">index</span></tt> -> <cite>int</cite></dt>
-<dd>The 0-based iteration count.</dd>
-<dt><tt class="xref py py-attr docutils literal"><span class="pre">reverse_index</span></tt> -> <cite>int</cite></dt>
-<dd>The number of iterations remaining.</dd>
-<dt><tt class="xref py py-attr docutils literal"><span class="pre">first</span></tt> -> <cite>bool</cite></dt>
-<dd><tt class="docutils literal"><span class="pre">True</span></tt> on the first iteration, <tt class="docutils literal"><span class="pre">False</span></tt> otherwise.</dd>
-<dt><tt class="xref py py-attr docutils literal"><span class="pre">last</span></tt> -> <cite>bool</cite></dt>
-<dd><tt class="docutils literal"><span class="pre">True</span></tt> on the last iteration, <tt class="docutils literal"><span class="pre">False</span></tt> otherwise.</dd>
-<dt><tt class="xref py py-attr docutils literal"><span class="pre">even</span></tt> -> <cite>bool</cite></dt>
-<dd><tt class="docutils literal"><span class="pre">True</span></tt> when <tt class="docutils literal"><span class="pre">index</span></tt> is even.</dd>
-<dt><tt class="xref py py-attr docutils literal"><span class="pre">odd</span></tt> -> <cite>bool</cite></dt>
-<dd><tt class="docutils literal"><span class="pre">True</span></tt> when <tt class="docutils literal"><span class="pre">index</span></tt> is odd.</dd>
-</dl>
-<dl class="method">
-<dt id="mako.runtime.LoopContext.cycle">
-<tt class="descname">cycle</tt><big>(</big><em>*values</em><big>)</big><a class="headerlink" href="#mako.runtime.LoopContext.cycle" title="Permalink to this definition">¶</a></dt>
-<dd><p>Cycle through values as the loop progresses.</p>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="class">
-<dt id="mako.runtime.Undefined">
-<em class="property">class </em><tt class="descclassname">mako.runtime.</tt><tt class="descname">Undefined</tt><a class="headerlink" href="#mako.runtime.Undefined" title="Permalink to this definition">¶</a></dt>
-<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
-<p>Represents an undefined value in a template.</p>
-<p>All template modules have a constant value
-<tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> present which is an instance of this
-object.</p>
-</dd></dl>
-
-</div>
-</div>
-
-    </div>
-
-</div>
-
-<div id="docs-bottom-navigation" class="docs-navigation-links">
-        Previous:
-        <a href="defs.html" title="previous chapter">Defs and Blocks</a>
-        Next:
-        <a href="namespaces.html" title="next chapter">Namespaces</a>
-
-    <div id="docs-copyright">
-        © Copyright the Mako authors and contributors.
-        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
-        with Mako templates.
-    </div>
-</div>
-
-</div>
-
-<div class="clearfix">
-
-<hr/>
-
-<div class="copyright">Website content copyright © by Michael Bayer.
-    All rights reserved.  Mako and its documentation are licensed
-    under the MIT license.  mike(&)zzzcomputing.com</div>
-
-</div>
-</div>
-</body>
-</html>
diff --git a/lib/mako-0.7.2/doc/search.html b/lib/mako-0.7.2/doc/search.html
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/search.html
+++ /dev/null
@@ -1,160 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
-<head>
-<title>
-    
-    Search
- — 
-    Mako 0.7.2 Documentation
-</title>
-
-    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
-
-    <script type="text/javascript">
-      var DOCUMENTATION_OPTIONS = {
-          URL_ROOT:    '#',
-          VERSION:     '0.7.2',
-          COLLAPSE_MODINDEX: false,
-          FILE_SUFFIX: '.html'
-      };
-    </script>
-        <script type="text/javascript" src="_static/jquery.js"></script>
-        <script type="text/javascript" src="_static/underscore.js"></script>
-        <script type="text/javascript" src="_static/doctools.js"></script>
-        <script type="text/javascript" src="_static/searchtools.js"></script>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="#" />
-    <link rel="top" title="Mako 0.7.2 Documentation" href="index.html" />
-
-<link rel="stylesheet" href="_static/site.css"></link>
-
-
-</head>
-<body>
-    <div id="wrap">
-    <div class="rightbar">
-    <div class="slogan">
-    Hyperfast and lightweight templating for the Python platform.
-    </div>
-
-
-    </div>
-
-    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
-
-    <hr/>
-
-    
-
-
-
-
-
-
-
-
-
-<div id="docs-container">
-
-
-
-<div id="docs-header">
-    <h1>Mako 0.7.2 Documentation</h1>
-
-    <div id="docs-search">
-    Search:
-    <form class="search" action="#" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </div>
-
-    <div id="docs-version-header">
-        Release: <span class="version-num">0.7.2</span>
-
-    </div>
-
-</div>
-
-<div id="docs-top-navigation">
-    <div id="docs-top-page-control" class="docs-navigation-links">
-        <ul>
-
-        <li>
-            <a href="index.html">Table of Contents</a> |
-            <a href="genindex.html">Index</a>
-        </li>
-        </ul>
-    </div>
-
-    <div id="docs-navigation-banner">
-        <a href="index.html">Mako 0.7.2 Documentation</a>
-        » 
-    Search
- 
-
-        <h2>
-            
-    Search
-
-        </h2>
-    </div>
-
-</div>
-
-<div id="docs-body-container">
-
-
-    <div id="docs-body" class="" >
-        
-
-
-
-
-
-<div id="searchform">
-<h3>Enter Search Terms:</h3>
-<form class="search" action="#" method="get">
-  <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-  <input type="hidden" name="check_keywords" value="yes" />
-  <input type="hidden" name="area" value="default" />
-</form>
-</div>
-
-<div id="search-results"></div>
-
-
-
-    </div>
-
-</div>
-
-<div id="docs-bottom-navigation" class="docs-navigation-links">
-
-    <div id="docs-copyright">
-        © Copyright the Mako authors and contributors.
-        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
-        with Mako templates.
-    </div>
-</div>
-
-</div>
-
-<div class="clearfix">
-
-    
-<hr/>
-
-<div class="copyright">Website content copyright © by Michael Bayer.
-    All rights reserved.  Mako and its documentation are licensed
-    under the MIT license.  mike(&)zzzcomputing.com</div>
-
-    <script type="text/javascript" src="searchindex.js"></script>
-
-</div>
-</div>
-</body>
-</html>
diff --git a/lib/mako-0.7.2/doc/searchindex.js b/lib/mako-0.7.2/doc/searchindex.js
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/searchindex.js
+++ /dev/null
@@ -1,1 +0,0 @@
-Search.setIndex({objects:{RichTraceback:{records:[8,0,1,""],reverse_traceback:[8,0,1,""],source:[8,0,1,""],lineno:[8,0,1,""],reverse_records:[8,0,1,""],error:[8,0,1,""],message:[8,0,1,""]},"mako.exceptions":{text_error_template:[8,3,1,""],RichTraceback:[8,2,1,""],html_error_template:[8,3,1,""]},"mako.lookup.TemplateLookup":{put_template:[8,1,1,""],get_template:[8,1,1,""],put_string:[8,1,1,""],adjust_uri:[8,1,1,""],filename_to_uri:[8,1,1,""]},"mako.runtime.Context":{write:[9,1,1,""],get:[9,1,1,""],keys:[9,1,1,""],push_caller:[9,1,1,""],writer:[9,1,1,""],pop_caller:[9,1,1,""],locals_:[9,1,1,""],lookup:[9,0,1,""],kwargs:[9,0,1,""]},"mako.lookup.TemplateCollection":{get_template:[8,1,1,""],adjust_uri:[8,1,1,""],has_template:[8,1,1,""],filename_to_uri:[8,1,1,""]},"mako.runtime.ModuleNamespace":{filename:[3,0,1,""]},"mako.cache.CacheImpl":{invalidate:[6,1,1,""],get_or_create:[6,1,1,""],pass_context:[6,0,1,""],set:[6,1,1,""],get:[6,1,1,""]},"mako.runtime.LoopContext":{cycle:[9,1,1,""]},"mako.cache":{register_plugin:[6,3,1,""],CacheImpl:[6,2,1,""],Cache:[6,2,1,""]},"mako.runtime.Namespace":{include_file:[3,1,1,""],template:[3,0,1,""],get_cached:[3,1,1,""],get_namespace:[3,1,1,""],cache:[3,0,1,""],uri:[3,0,1,""],module:[3,0,1,""],filename:[3,0,1,""],context:[3,0,1,""],get_template:[3,1,1,""],attr:[3,0,1,""]},"mako.lookup":{TemplateLookup:[8,2,1,""],TemplateCollection:[8,2,1,""]},"mako.runtime.TemplateNamespace":{uri:[3,0,1,""],module:[3,0,1,""],filename:[3,0,1,""]},"mako.runtime":{capture:[3,3,1,""],Undefined:[9,2,1,""],Namespace:[3,2,1,""],ModuleNamespace:[3,2,1,""],supports_caller:[3,3,1,""],Context:[9,2,1,""],LoopContext:[9,2,1,""],TemplateNamespace:[3,2,1,""]},"mako.ext.beaker_cache":{BeakerCacheImpl:[6,2,1,""]},"mako.cache.Cache":{invalidate:[6,1,1,""],set:[6,1,1,""],invalidate_body:[6,1,1,""],get:[6,1,1,""],invalidate_closure:[6,1,1,""],invalidate_def:[6,1,1,""],starttime:[6,0,1,""],put:[6,1,1,""],get_or_create:[6,1,1,""],id:[6,0,1,""],impl:[6,0,1,""]},"mako.template.Template":{render_context:[8,1,1,""],code:[8,0,1,""],render:[8,1,1,""],source:[8,0,1,""],render_unicode:[8,1,1,""],get_def:[8,1,1,""]},"mako.template":{DefTemplate:[8,2,1,""],Template:[8,2,1,""]}},terms:{interchang:4,four:[3,5],prefix:[6,9],dirnam:8,"_my_cache_work":6,typeerror:9,swap:6,under:[8,6,7],everi:[3,5],long_term:6,jack:8,voix:7,appar:[2,3],vast:7,pagearg:[0,9,3,7],get_templ:[8,6,3,7],buildtabl:0,cache_kei:6,direct:[0,8,6,3,5],batch:2,outputpath:8,second:[0,6,2],even:[5,9,7,4],"new":[0,8,9,6,4],ever:[3,7],metadata:5,widget:0,behavior:[8,2,9],here:[2,7,4,5,6,3,8,9],met:0,path:[8,6,3],interpret:[0,8,7],tagfilt:2,portabl:0,txt:[8,7,5],describ:[0,2,3,4,5,7,8,9],would:[0,2,4,6,7,8,9],call:[0,1,2,3,4,5,6,7,8,9],recommend:3,type:[0,5,6,7,8,9],until:8,relat:[8,6,7],notic:0,pkg_resourc:6,must:[0,8,6,3,7],join:7,setup:[8,6,4],work:[0,2,7,4,6,3,8,9],root:8,overrid:[7,4,6,3,8,9],give:[0,3],indic:[1,9,5],somefil:3,do_something_speci:6,want:[0,2,7,4,5,3,6,9],end:[5,2,4],quot:7,ordinari:3,output_encod:[8,7],how:[0,5,6,3,8,9],cheetah:7,updat:[8,9],module_filenam:8,recogn:[3,4],lai:0,after:[8,6,2,3,9],befor:[2,7,4,5,6,3,8],attempt:7,third:6,recompil:[8,6],maintain:[8,6],environ:[8,1,2,9,5],exclus:8,order:[8,6,5,7,4],origin:[2,7,6,3,8,9],somedata:0,over:[2,3,9],fall:6,becaus:[0,2,7,4],demarc:0,affect:9,flexibl:[5,2,4],myfil:5,streamlin:4,fix:[8,6,3],"__class__":8,better:[6,9],persist:6,easier:6,them:[0,2,4,3,8,9],thei:[0,2,4,5,7,8,9],safe:[9,7],default_filt:[8,2,7],jinja2:[0,5],html_error_templ:8,getvalu:[8,2],myghti:7,timeout:6,each:[0,4,5,6,7,8,9],side:[0,2,5],mean:[0,2,7,5,6,3,8,9],enorm:0,cacheimpl:[8,6],extract:8,expression_filt:2,unbound:8,goe:5,newli:6,content:[0,1,2,4,5,6,3,8,9],sane:0,mypackag:2,multilin:5,bottommost:4,free:3,standard:[6,7],argument:[0,1,2,3,5,6,7,8,9],traceback:8,moment:8,filter:[0,1,2,5,7,8,9],heck:[8,1,7],isn:9,text_error_templ:8,onto:[9,5],user:[8,6,9,7,5],rang:[0,5],render:[0,1,2,3,4,5,6,7,8,9],restrict:[0,4],unlik:7,alreadi:[8,9,4],wrapper:2,wasn:[9,4],agre:4,primari:8,lister:0,top:[0,2,4,3,6,9],sometim:[5,4],stack:[8,2,9],cache_region:6,too:[2,4],similarli:[0,7],john:0,consol:7,conson:9,namespac:[0,1,2,4,5,6,3,8,9],tool:6,setuptool:[8,6],somewhat:[0,2],some_namespac:3,myfilt:2,target:[0,2],keyword:[0,7,4,5,3,8,9],provid:[0,2,4,5,6,3,8,9],expr:[0,3],project:8,matter:4,minut:6,thu:8,mini:9,fashion:6,close:[0,8,3,5],runner:8,modern:6,htmlentityreplac:8,raw:[8,7],manner:2,templatelookup:[1,2,7,6,3,8,9],minu:6,latter:7,shall:4,usernam:[0,5],object:[0,2,3,4,5,6,7,8,9],regular:[0,1,2,3,4,5,7,8],phase:8,invalidate_closur:6,simplic:2,paradigm:4,don:[0,6,9,7,4],doc:[0,8,9,7,5],flow:5,doe:[0,7,4,5,3,9],declar:[0,1,2,4,5,3,8],tracelin:8,notion:9,opposit:4,"__str__":9,syntax:[0,1,2,8,5],get_resourc:5,involv:4,absolut:[0,7],layout:[0,8,4],acquir:[6,7],configur:[8,6,3,4],stop:[9,5],report:8,bar:[0,2,5,3,8,9],emb:[3,7,5],reload:8,short_term:6,black:9,elimin:7,result:[0,8,2,9,5],respons:[6,9,4],basemost:4,awar:[8,9,7],databas:0,urllib:2,implicit:[6,9],simplest:5,pybabel:8,awai:4,approach:[9,7,4],attribut:[0,1,2,4,5,6,3,8,9],preprocessor:8,easi:[2,9],howev:[0,6,3,7,4],against:[8,5],facet:9,logic:2,col:0,dogpil:6,guid:8,assum:[8,7],templatenamespac:3,three:[9,5],been:[8,6,2,3,7],accumul:5,much:[0,5,7,4],basic:[0,1,7,5,3,8],"__len__":9,quickli:7,disable_unicod:[8,2,7],ani:[0,2,3,4,5,6,7,8,9],multithread:6,lift:4,ident:8,servic:[6,7,5],properti:[8,3],calcul:8,printabl:7,kwarg:[8,6,9,3],somekei:6,sever:3,mako:[0,1,2,3,4,5,6,7,8,9],quand:7,perform:[8,2,3,7],make:[0,2,3,4,5,6,7,8,9],transpar:9,push_cal:9,complet:[8,3,4],rais:[0,8,9,7],caller_stack:[3,7],scenario:[0,8,9,3],get_cach:3,hypothet:4,inherit:[0,1,4,5,6,3,8,9],thi:[0,2,3,4,5,6,7,8,9],endif:[0,9,5],programm:7,everyth:9,pagecontrol:0,left:[8,2],identifi:[8,6],just:[0,2,3,4,5,7,8,9],invalidate_bodi:6,unbuff:2,yet:[6,3],languag:[0,7,5],previous:[8,3],enable_loop:[8,9],pygmentplugin:8,ham:9,ell:7,had:7,input_encod:[8,7],board:9,els:[8,6,9,5],gave:8,opt:[8,6],applic:[8,2,9,5],mayb:4,background:7,specif:[0,2,4,5,6,3,8,9],arbitrari:[6,5],manual:8,babelplugin:8,underli:[0,2,4,5,6,3,8,9],right:[0,2,9,7,5],old:9,deal:[9,7,5],excerpt:8,maxim:[6,7],percentag:8,intern:[8,6,2,7,9],subclass:[0,8,6],track:9,condit:[0,5,4],foo:[0,2,7,5,3,8,9],plu:8,bold:2,relationship:3,post:[0,8],"super":[6,3,7,4],plug:6,slightli:[3,7],surround:5,produc:[0,1,2,4,5,7,8,9],rudiment:[8,6],encod:[8,1,2,7],down:[6,7],lieu:8,wrap:[0,1,5,4],storag:7,accordingli:8,wai:[0,1,2,3,4,5,6,7,8,9],support:[0,7,5,6,3,8],transform:2,why:9,avail:[0,2,3,4,5,6,7,8,9],overhead:7,head:[0,8,4],form:[0,3,5],offer:[7,5],forc:8,get_def:[0,8,2],taken:[8,6,3],"true":[0,2,7,5,6,3,8,9],attr:[3,4],tell:5,emit:5,trim:[2,5],featur:[5,9,4],classic:[3,5],petit:7,"abstract":8,exist:[0,7,5,6,3,8,9],check:[8,5,9,7,4],when:[0,2,3,4,5,6,7,8,9],entrypoint:6,intend:[2,3],stringio:[8,9,7],intent:2,consid:[8,9],receiv:[0,2,3,5],faster:7,cache_en:[8,6],htdoc:8,ignor:[9,5],time:[0,1,2,4,6,8],push:9,serious:4,backward:6,concept:[0,8,5],chain:[5,9,3,4],skip:8,consum:[6,5],signific:[9,5],subcompon:0,row:0,decid:[9,5],middl:[5,2,4],depend:[8,5],mainlayout:[0,4],intermedi:4,decis:[9,7,4],sourc:[8,7,5],string:[2,7,5,6,3,8,9],word:[8,9,4],level:[0,1,2,3,4,5,6,7,8,9],did:4,iter:[0,9],item:[0,9,5],mycomp:6,quick:[0,5],lever:7,div:[0,8,3,4],dir:[8,6],slower:7,sign:5,namepacenam:0,appear:[2,9,5],current:[0,4,5,3,8,9],deriv:[6,2,7],gener:[0,2,3,4,5,6,7,8,9],address:[8,6],along:[6,3],toolbar:[5,4],bot:9,behav:0,commonli:[6,7,4],semant:[0,4],regardless:[0,9,4],extra:[5,4],modul:[0,1,2,3,4,5,6,7,8,9],prefer:7,render_bodi:[8,2,7,9],fake:5,marker:5,instal:6,callstack:9,memori:[8,6,5],sake:2,perl:5,live:6,handler:8,scope:[0,4,5,3,6,9],prep:9,chapter:[0,1,2,4,7,8],afford:8,accept:[2,7,5,6,3,8],render_:9,myexpress:2,mylookup:[8,7],fly:7,graphic:7,uniqu:[6,9,4],whatev:[8,9,3,7],purpos:[8,7],stream:[8,9,3,7,5],backslash:5,occur:[0,8,6],alwai:[0,9,7,4],differenti:9,multipl:[0,1,6,7,4],get:[2,7,4,5,6,3,8,9],modulenam:6,write:[2,7,5,6,3,8,9],pure:[3,7,5],cache_xyz:6,somevalu:6,map:8,product:8,usabl:0,mai:[2,7,5,6,3,8,9],data:[0,7,6,3,8,9],goal:2,practic:4,explicit:[0,7,5,3,6,9],format_except:8,inform:[8,3,7,5],"switch":9,preced:[8,5,3,7,4],combin:9,callabl:[0,2,5,6,3,8,9],extractor:8,still:[0,7,4],mainli:3,dynam:5,entiti:2,conjunct:8,group:[6,3],platform:8,jit:9,push_buff:2,main:[0,2,7,4,3,8,9],non:[8,9,7,5],recal:4,francoi:8,contriv:8,supersed:6,initi:0,underneath:6,therebi:3,now:[5,9,7,4],pop_fram:7,term:6,name:[0,1,2,3,4,5,6,7,8,9],drop:5,separ:[0,6,2,4],"__str":7,compil:[8,6,9,5],replac:[8,6,2,7],individu:[0,8,9,6],arg3:3,arg4:3,continu:[8,7,5],zebra:9,happen:[9,3,7],accomplish:[8,6],space:[0,6,5],intermix:4,correct:3,earlier:[6,7],migrat:[8,9],"byte":[8,7],care:[6,9,3,7],thing:[0,5,9,7,4],place:[0,8,5,6,4],think:9,first:[2,7,4,5,3,6,9],oper:[0,2,7,5,3,8,9],suspend:5,directli:[0,2,5,6,3,8],onc:[0,5,9,4],arrai:2,yourself:[8,7],walkthrough:0,textual:[8,2,4],custom:[0,2,7,5,6,3,8],open:[5,7,4],size:8,given:[0,2,4,6,3,8,9],silent:9,convent:0,caught:8,checker:9,necessarili:9,white:4,conveni:6,programat:8,copi:[9,3],specifi:[1,2,4,6,7,8,9],enclos:[0,9],mostli:[8,6,9,3],than:[2,4,5,7,6,9],serv:[8,7],"__m_local":7,were:[9,3,7],posit:3,seri:[8,6,7],pre:8,sai:[0,1,4,7,8,9],put_str:8,anywher:[0,5],deliv:[2,3],notimplementederror:8,techniqu:9,pop_cal:9,note:[0,2,7,4,6,3,8,9],take:[0,2,7,4,5,3],blunt:6,sure:5,trace:8,normal:[0,2,5,7,8,9],buffer:[1,2,7,5,3,8,9],subdef:0,synonym:[6,3],later:[6,5],highlight:8,templatenam:8,runtim:[1,2,4,5,6,3,8,9],preambl:8,shop:9,imaginez:7,delta:3,permiss:8,hack:9,xml:[8,2,5],onli:[0,2,4,5,6,7,8,9],explicitli:[8,9,3,7],state:[0,9,7],dict:7,overwritten:6,variou:[2,7,5,3,8,9],distinctli:4,dyn:3,tailor:0,requir:[0,6,3,7,5],where:[0,2,3,4,5,6,7,8,9],summari:5,wonder:5,nestabl:0,enumer:9,between:[0,9],"import":[0,2,7,5,6,3,8,9],across:[6,9],parent:[0,1,4,6,3,8,9],comp:3,cycl:9,my_dogpile_region:6,uncondition:7,come:[0,4,5,6,7,8],cache_url:[8,6],region:6,mani:[9,5],pow:5,pot:9,inspir:5,pop:[6,2,9],colon:[6,5],encoding_error:[8,7],ultim:[3,4],dessin:7,markedli:7,resolut:[8,3],those:[0,5,6,3,8,9],"case":[0,2,3,4,5,6,7,8,9],mouton:7,invok:[0,8,5,4],cannot:[0,8,7],invoc:4,advantag:[8,3,7,4],stdout:8,threadsaf:6,destin:8,shutil:8,ascii:7,"__init__":6,develop:7,author:9,same:[0,7,5,6,3,8,9],binari:7,epoch:6,html:[0,2,3,4,5,6,7,8],document:[8,6,5,7,4],breakdown:4,finish:4,utf8:[2,7],nest:[0,1,2,4,6,9],capabl:[8,6],vowel:9,improv:[8,7,5],extern:[0,6,4],moder:8,facad:6,without:[6,9,3,4],model:0,roughli:5,execut:[0,2,4,5,3,6,9],rest:[6,5,4],aspect:[7,5],speed:[2,7],versu:[8,3],except:[0,1,2,5,6,8,9],littl:[0,8,9],treatment:7,role:3,earli:[1,5],ream:7,around:[8,2,9],read:[9,7,5],moi:7,world:[0,7,5,3,8,9],use_pag:2,serve_templ:8,integ:[0,6,7],server:[8,6,5],either:[4,5,6,7,8,9],output:[0,1,2,3,4,5,7,8,9],manag:[6,9],somefunct:3,definit:[0,2,3,4],disait:7,inject:8,refer:[0,1,2,3,4,5,6,7,8,9],some_templ:8,power:5,garbag:6,pass_context:6,starttim:6,found:[0,9,5],"__name__":[8,6],"throw":[6,9],central:[0,2,9,5],act:[8,9],mytempl:[8,6,7],routin:8,overrod:4,strip:2,your:[0,2,4,5,3,9],msgstr:8,fast:8,her:7,area:[0,5,9,7,4],aren:[0,7],start:[0,6],compliant:7,interfac:6,lot:5,strictli:7,programmat:[0,1,2,7,6,9],tupl:8,regard:7,jut:9,illus:7,pull:[0,8,9,3],possibl:[0,6,2,9],"default":[0,2,3,4,5,6,7,8,9],unusu:8,embed:[0,8,9,3,5],creat:[0,7,5,6,3,8,9],multibyt:8,certain:[8,2,7],somedef:[0,6,2,3,5],intro:0,decreas:3,file:[0,1,3,4,5,6,7,8,9],again:[0,9],gettext:8,field:8,valid:5,you:[0,2,3,4,5,6,7,8,9],symbol:5,reduc:2,directori:[8,6,2,7,9],descript:8,mimic:8,potenti:4,escap:[0,1,2,7,5],represent:[8,5],all:[0,1,2,3,4,5,6,7,8,9],illustr:[8,2,4],scalar:3,abil:[8,6,7,5],follow:[0,4,5,3,8,9],program:[7,5],objnam:6,introduc:[0,5,9,3,4],sound:[5,4],"pla\u00eet":7,liter:[8,3,7],fals:[8,6,9],util:8,mechan:[6,5,4],failur:9,veri:[0,8,6,4],condition:3,list:[0,2,4,5,6,7,8,9],adjust:[8,3,5],small:8,pbj:9,aptli:8,design:2,nsname:5,pass:[0,7,4,5,6,3,8,9],further:5,what:[0,1,3,4,5,7,8,9],sub:[0,5],section:[0,4,6,3,8,9],advanc:8,abl:9,brief:8,version:[0,2,7,4,5,3,9],deepli:0,method:[0,1,2,3,4,5,6,7,8,9],contrast:[0,7,4],full:[8,5],themselv:[0,4,5,3,6,9],shouldn:9,inher:2,modifi:[0,8,7,4],valu:[0,2,7,5,6,3,8,9],search:[8,1],memcach:6,prior:[2,7,9],real:[8,5],render_mydef:9,via:[0,7,4,6,3,8,9],transit:9,ask:9,href:0,pythagorean:5,establish:[8,9],select:[7,4],mylib:5,distinct:8,regist:6,two:[0,2,3,4,5,6,7,8,9],push_fram:7,minor:8,more:[0,2,3,4,5,6,7,8,9],desir:[8,3,7],flag:[2,7,5,6,3,8,9],stick:[0,9,7,5],particular:[8,6,9,3,4],known:[0,3],cach:[0,1,2,5,6,3,8,9],none:[8,6,2,3,9],remain:[0,9],learn:7,def:[0,1,2,3,4,5,6,7,8,9],someobject:3,userbas:7,share:[0,9],templat:[0,1,2,3,4,5,6,7,8,9],sharp:0,wsgiutil:8,cours:9,newlin:[1,5],rather:9,anoth:[0,7,5,3,8,9],render_unicod:[8,7],simpl:[0,8,9,6,5],css:8,regener:8,resourc:[8,4],referenc:[0,9,3],variant:5,catalog:8,associ:[6,9],"short":6,footer:[5,4],confus:7,caus:[8,2,3,9],egg:9,help:[8,6,7],singleton:9,through:[8,9,7],paramet:[8,6,3,7],style:[0,7],might:[9,3,5],wouldn:[3,5],good:6,"return":[0,1,2,3,5,6,7,8,9],timestamp:6,framework:[8,1],ninja:4,achiev:[0,9,4],fulli:[8,2],unicod:[8,1,2,7],locals_:9,hard:[5,9,7,4],idea:[5,4],procedur:6,realli:7,expect:[0,5,7,4],beyond:[0,6],orient:[0,4],sometempl:6,lineno:8,print:[0,8,7],proxi:3,ast:7,guess:7,reason:[9,7],base:[1,2,4,5,6,3,8,9],put:[6,9,4],basi:[6,9],thrown:[8,6],thread:6,perhap:[0,9,5],assign:[0,8,9,5],major:[9,7],number:[0,8,9,6,5],done:[8,7],defnam:[0,5],blank:9,miss:[8,2,9],differ:[0,4,6,3,8,9],interact:[3,7],least:[8,3],calling_uri:3,statement:[0,8,5],natur:2,scheme:[0,8,9,7],store:[8,6,2,7,9],option:[7,5,6,3,8,9],modulenamespac:3,part:[6,9,3,4],pars:[8,7,5],kind:[2,4,5,6,7,8,9],whenev:[8,7,4],remot:[0,3],remov:[3,7],str:[8,2,7,9],arrang:5,toward:[0,4],grei:4,cleaner:9,mytmpl:8,get_namespac:3,comp2:3,packag:[6,5],comp1:3,expir:6,deftempl:[0,8],jour:7,built:[0,1,2,3,4,5,7,8,9],equival:[0,2,7,5,3,6],self:[0,4,5,6,3,8,9],undeclar:8,also:[0,2,3,4,5,6,7,8,9],build:[0,4],distribut:8,filesystem:[8,6,3],reach:[8,9],disgard:7,most:[0,7,4,5,6,3,8,9],plai:[3,7],jsp:5,ext:[8,6],fastencodingbuff:7,wsgi:8,particularli:3,find:[8,9,5],mydef:0,coerc:7,pretti:[7,5],writer:9,hit:[2,7],"__file__":3,express:[0,1,2,3,4,5,7,8,9],nativ:7,common:[8,1,7],set:[2,7,5,6,3,8,9],genshi:5,dump:[3,7],see:[0,7,5,6,3,8,9],dumb:7,arg:[0,2,5,6,3,8],reserv:9,whatsoev:7,someth:[0,2,7],topmost:[5,9,3,4],won:[8,9,4],altern:[8,9,7],signatur:[0,3],syntact:5,numer:5,popul:6,both:[0,2,4,7,8,9],last:[8,9],put_templ:8,alor:7,context:[0,1,2,3,5,6,7,8,9],whole:[0,2,3,4],load:[8,3,5],simpli:[2,4],bell:7,arbitrarili:0,header:[0,8,5,6,4],uniniti:9,param:5,suppli:[3,5],frobnizzl:5,throughout:3,backend:[6,3],empti:[2,7],accessor:[6,9,3,4],strategi:6,error_handl:8,imag:[8,7],great:[3,7],understand:7,func:3,xa9:7,look:[0,7,4,6,3,8,9],get_or_cr:6,straight:[8,7],histor:6,"while":[0,8,5,2,4],abov:[0,2,3,4,5,6,7,8,9],error:[0,8,9,7],anonym:[0,6,5],everyon:9,loop:[0,1,8,9,5],pylon:8,propag:[8,9,5],richtraceback:8,vou:7,itself:[0,2,3,4,5,6,7,8,9],decor:[1,2,3],minim:6,decod:[2,7],conflict:6,x80:7,wherea:[0,9,7,5],has_templ:8,stripe:9,pop_buff:2,typic:[8,6],recent:8,travers:3,task:6,older:0,cachemanag:6,entri:[8,6],somev:[9,3],elem:5,picki:7,endfor:[0,9,5],construct:[0,7,4,5,6,3,8],burden:7,sidebar:0,adjust_uri:8,msgid:8,theorem:5,input:[0,2,7],subsequ:6,format:[0,8,3,7,5],game:7,bit:[0,8,9],characterist:5,creation_funct:6,semi:6,whitespac:[0,2,5],resolv:8,collect:[8,6,9,3,7],"boolean":8,popular:8,encount:4,often:3,creation:[0,8,2,6],some:[0,2,3,4,5,6,7,8,9],back:[8,9,7,4],global:[0,6,9,3,4],understood:6,sampl:8,mirror:8,surpris:7,modulepath:6,though:[6,9,7,4],pep:7,per:[6,9,7,5],namespace_nam:3,substitut:[8,1,2,9,5],larg:4,slash:[3,5],leftmost:2,cgi:[2,7],buffer_filt:8,previou:[0,8,9,4],run:[8,9,3,7],namespacenam:[0,5],reverse_traceback:8,step:[0,8,7],loopcontext:9,from:[0,1,2,3,4,5,6,7,8,9],mynamespac:[3,5],exc_info:8,block:[0,1,2,4,5,6,9],within:[0,2,3,4,5,6,7,8,9],toplevelnotfound:8,ensur:[6,3,7],chang:[6,9,4],run_wsgi:8,span:[0,4],reverse_index:9,spam:9,bodi:[0,1,4,5,6,3,8,9],stylesheet:8,"long":[9,5],beaker_cach:6,includ:[0,5,6,3,8,9],suit:4,myfunc:5,properli:7,templatelookupexcept:8,link:8,translat:8,newer:[0,8],atom:8,line:[8,5,7,4],info:8,concaten:2,utf:[8,2,7],consist:5,caller:[0,2,3,9],my_tag:3,myescap:2,similar:[0,2,3,4,5,7,8,9],impl:6,constant:9,doesn:[0,9,3,4],repres:[0,5,6,7,8,9],modulename_cal:8,titl:[0,5,4],invalid:6,codec:[8,7],accountdata:0,draw:2,clean:[8,6],nightmar:7,bytestring_passthrough:8,xb4le:7,cache_typ:[8,6,5],depth:9,far:[8,5,7,4],hello:[0,8,3,7,5],code:[0,2,7,5,3,8,9],templatetext:[2,7],send:[2,7,4,3,8,9],sens:9,sent:[2,9,3,5],tri:[0,8,9],magic:[9,7],"try":[8,2,9,7,5],dealt:8,pleas:5,impli:8,cfg:8,odd:9,append:8,compat:[8,6,3],index:[1,4,5,3,8,9],compar:[8,7],xa9veil:7,access:[0,1,4,5,6,3,8,9],can:[0,2,3,4,5,6,7,8,9],len:5,closur:0,let:[0,8,9,4],becom:[8,3,7],sinc:[0,9,3,7,4],filesystem_check:8,convert:[8,6,7],convers:7,conceiv:9,ctx:8,implement:[0,8,6,4],appli:[0,2,7,5,3,8,9],approxim:8,mystuff:0,api:[1,2,6,3,8,9],immut:9,register_plugin:6,metaphor:4,commun:[0,9],next:[0,1,2,3,4,5,6,7,8,9],implic:7,few:9,trail:2,beakercacheimpl:6,account:0,retriev:6,augment:[0,1,4],obvious:4,control:[0,1,2,4,5,8,9],accountnam:0,process:[6,7,5],lock:6,slim:6,tag:[0,1,2,4,5,6,3,8,9],layoutdata:0,nari:7,instead:[0,2,7,4,3,8],templatecollect:8,overridden:[0,6,3,4],class_:4,tack:3,philosophi:9,callable_:[8,3],essenti:[6,3,7],correspond:[8,6,9,3,4],element:[0,8,9,7,5],issu:[0,8,7],allow:[0,2,3,4,5,6,7,8,9],elif:5,move:8,comma:[0,2],bunch:3,outer:0,chosen:6,myproj:8,bye:0,handl:[0,1,5,6,7,8,9],handi:3,"r\u00e9veill\u00e9":7,relativeto:8,somewher:[8,9,7],anyth:[0,7,4],nameerror:[8,9],mode:7,disregard:8,pygment:8,intellig:7,filehandl:7,our:[0,8,6,4],special:[8,6,2,9,5],out:[0,4,5,6,7,8],variabl:[0,4,5,3,8,9],contigu:5,categori:3,rel:[8,3],red:9,insid:[0,4,5,6,3,8],call_my_object:7,standalon:8,dictionari:[8,6,9,3],releas:[6,3,5],indent:5,xc3:7,could:4,lexer:[8,7,5],keep:0,outsid:[0,9,3,7,4],strict:8,system:[0,8,9,6,4],messag:[8,9],attach:3,"final":[2,7,4],cache_dir:[8,6],accompani:8,exactli:[0,4],filename_to_uri:8,structur:[1,9,5],charact:[8,7,5],simplecacheimpl:6,have:[0,2,3,4,5,6,7,8,9],tabl:[0,1,9],need:[0,7,4,6,3,8,9],turn:[2,7,4],babel:8,outward:8,builtin:7,best:5,which:[0,2,3,4,5,6,7,8,9],singl:[0,2,4,5,6,7,8],unless:[9,7],who:7,segment:7,"class":[0,7,4,6,3,8,9],url:[8,6,2,5],gather:7,request:[8,6,9],uri:[8,3,5],pipe:2,determin:[6,7],"_cach":6,fact:[0,7,4],render_context:8,dbm:6,text:[0,2,5,6,7,8,9],cache_timeout:[0,6],anywai:8,locat:[8,9,3,7],should:[8,6,9,3],suppos:[0,6],local:[0,2,5,6,3,8,9],meant:4,familiar:[0,5],bean:8,cache_:6,increas:8,cstringio:[8,7],enabl:[8,6,9,5],organ:[3,4],current_sect:5,stuff:[3,5],integr:[8,1,4],contain:[0,7,5,6,3,8],view:8,reverse_record:8,legaci:[8,9],collection_s:8,pinard:8,flip:0,bytestr:8,mako_modul:8,polymorph:5,correctli:9,pattern:8,written:[8,5,4],progress:9,neither:6,email:5,jot:9,kei:[8,6,9,3,7],module_directori:[8,6],tempfil:8,job:2,entir:[0,1,2,3,5,7,8],joe:5,cache_arg:[8,6],addit:[0,2,4,5,6,3,8],plugin:[6,1],etc:[0,8,9,6,5],instanc:[8,9,3,5],freeli:9,comment:[8,1,7,5],guidelin:6,mako_cach:6,respect:5,addition:[8,7,4],compon:[6,9,3],include_fil:3,treat:7,immedi:[8,5,9,7,4],upcom:6,togeth:4,present:[0,7,4,6,3,8,9],determinist:2,therefor:[8,5,3,4],plain:[0,8,3,7,5],contextu:0,defin:[0,1,2,3,4,5,6,7,8,9],helper:8,almost:[5,4],incom:7,revis:8,parti:6,began:9,member:[8,9,5],python:[0,1,2,3,4,5,7,8,9],denot:5,iou:9,upon:[0,8,2,6,4],effect:[0,6,2,3],distutil:8,markupsaf:[2,7],off:[0,6,2,3,4],mention:7,well:[0,2,3,4,5,6,7,8,9],exampl:[0,2,4,5,6,3,8,9],command:8,choos:7,undefin:[0,8,9,5],usual:[8,6,2,9,5],module_writ:8,less:[9,7,4],heavili:7,web:8,point:[0,7,4,5,6,3,8],add:[0,8,2,4],lookup:[8,6,9,7],dest:8,arguabl:7,cache_impl:[8,6],five:[6,5],know:[7,4],xe2:7,mkstemp:8,insert:4,like:[0,2,3,4,5,6,7,8,9],success:8,page:[0,1,2,4,5,6,3,8,9],unreach:0,exceed:9,revers:8,captur:[8,2,3,9],pariti:9,"export":[0,5,4],smoothli:4,proper:8,librari:[0,8,2,6,7],tmp:[8,2],lead:[2,3,9],usag:[0,1,2,3,4,6,7,8,9],nutshel:4,although:5,stage:8,beaker:[8,6],about:[8,1,5,9,4],actual:[0,2,4,5,6,3,8,9],column:0,htmlentitydef:2,discard:2,x99a:7,disabl:[1,2,6,7,8,9],own:[0,2,3,4,5,6,7,8,9],populate_self:3,automat:[0,2,4,5,6,8,9],"dr\u00f4le":7,leverag:5,quote_plu:2,inner:0,arg1:3,arg2:3,"function":[0,2,3,4,5,6,7,8,9],keyerror:9,invalidate_def:6,eas:[2,9],inlin:[5,9,4],buf:[8,2],wherev:7,count:[0,8,9],made:[6,9],whether:[2,9,5],wish:[6,2,9],displai:8,record:[8,3,5],below:[0,7,4],otherwis:[8,9,7,5],evalu:[0,3,5],"int":9,dure:[8,4],filenam:[8,6,3],twist:0,pit:9,probabl:[0,8,9,6],mutual:8,percent:5,detail:[0,4,5,7,8,9],other:[0,2,3,4,5,6,7,8,9],bool:9,futur:[3,5],varieti:[6,5],post_pros:0,supports_cal:3,templateuri:3,some_condit:0,stai:[6,9],experienc:9,strict_undefin:[8,9],rule:[0,7,4],portion:0},objtypes:{"0":"py:attribute","1":"py:method","2":"py:class","3":"py:function"},titles:["Defs and Blocks","Table of Contents","Filtering and Buffering","Namespaces","Inheritance","Syntax","Caching","The Unicode Chapter","Usage","The Mako Runtime Environment"],objnames:{"0":["py","attribute","Python attribute"],"1":["py","method","Python method"],"2":["py","class","Python class"],"3":["py","function","Python function"]},filenames:["defs","index","filtering","namespaces","inheritance","syntax","caching","unicode","usage","runtime"]})
\ No newline at end of file
diff --git a/lib/mako-0.7.2/doc/syntax.html b/lib/mako-0.7.2/doc/syntax.html
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/syntax.html
+++ /dev/null
@@ -1,594 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
-<head>
-<title>
-    
-                Syntax
-             — 
-    Mako 0.7.2 Documentation
-</title>
-
-    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
-
-    <script type="text/javascript">
-      var DOCUMENTATION_OPTIONS = {
-          URL_ROOT:    '#',
-          VERSION:     '0.7.2',
-          COLLAPSE_MODINDEX: false,
-          FILE_SUFFIX: '.html'
-      };
-    </script>
-        <script type="text/javascript" src="_static/jquery.js"></script>
-        <script type="text/javascript" src="_static/underscore.js"></script>
-        <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
-    <link rel="top" title="Mako 0.7.2 Documentation" href="index.html" />
-        <link rel="next" title="Defs and Blocks" href="defs.html" />
-        <link rel="prev" title="Usage" href="usage.html" />
-
-<link rel="stylesheet" href="_static/site.css"></link>
-
-
-</head>
-<body>
-    <div id="wrap">
-    <div class="rightbar">
-    <div class="slogan">
-    Hyperfast and lightweight templating for the Python platform.
-    </div>
-
-
-    </div>
-
-    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
-
-    <hr/>
-
-    
-
-
-
-
-
-
-
-
-
-<div id="docs-container">
-
-
-
-<div id="docs-header">
-    <h1>Mako 0.7.2 Documentation</h1>
-
-    <div id="docs-search">
-    Search:
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </div>
-
-    <div id="docs-version-header">
-        Release: <span class="version-num">0.7.2</span>
-
-    </div>
-
-</div>
-
-<div id="docs-top-navigation">
-    <div id="docs-top-page-control" class="docs-navigation-links">
-        <ul>
-            <li>Prev:
-            <a href="usage.html" title="previous chapter">Usage</a>
-            </li>
-            <li>Next:
-            <a href="defs.html" title="next chapter">Defs and Blocks</a>
-            </li>
-
-        <li>
-            <a href="index.html">Table of Contents</a> |
-            <a href="genindex.html">Index</a>
-            | <a href="_sources/syntax.txt">view source
-        </li>
-        </ul>
-    </div>
-
-    <div id="docs-navigation-banner">
-        <a href="index.html">Mako 0.7.2 Documentation</a>
-        » 
-                Syntax
-             
-
-        <h2>
-            
-                Syntax
-            
-        </h2>
-    </div>
-
-</div>
-
-<div id="docs-body-container">
-
-    <div id="docs-sidebar">
-    <h3><a href="index.html">Table of Contents</a></h3>
-    <ul>
-<li><a class="reference internal" href="#">Syntax</a><ul>
-<li><a class="reference internal" href="#expression-substitution">Expression Substitution</a></li>
-<li><a class="reference internal" href="#expression-escaping">Expression Escaping</a></li>
-<li><a class="reference internal" href="#control-structures">Control Structures</a><ul>
-<li><a class="reference internal" href="#the-loop-context">The Loop Context</a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#comments">Comments</a></li>
-<li><a class="reference internal" href="#newline-filters">Newline Filters</a></li>
-<li><a class="reference internal" href="#python-blocks">Python Blocks</a></li>
-<li><a class="reference internal" href="#module-level-blocks">Module-level Blocks</a></li>
-<li><a class="reference internal" href="#tags">Tags</a><ul>
-<li><a class="reference internal" href="#page"><tt class="docutils literal"><span class="pre"><%page></span></tt></a></li>
-<li><a class="reference internal" href="#include"><tt class="docutils literal"><span class="pre"><%include></span></tt></a></li>
-<li><a class="reference internal" href="#def"><tt class="docutils literal"><span class="pre"><%def></span></tt></a></li>
-<li><a class="reference internal" href="#block"><tt class="docutils literal"><span class="pre"><%block></span></tt></a></li>
-<li><a class="reference internal" href="#namespace"><tt class="docutils literal"><span class="pre"><%namespace></span></tt></a></li>
-<li><a class="reference internal" href="#inherit"><tt class="docutils literal"><span class="pre"><%inherit></span></tt></a></li>
-<li><a class="reference internal" href="#nsname-defname"><tt class="docutils literal"><span class="pre"><%</span></tt>nsname<tt class="docutils literal"><span class="pre">:</span></tt>defname<tt class="docutils literal"><span class="pre">></span></tt></a></li>
-<li><a class="reference internal" href="#call"><tt class="docutils literal"><span class="pre"><%call></span></tt></a></li>
-<li><a class="reference internal" href="#doc"><tt class="docutils literal"><span class="pre"><%doc></span></tt></a></li>
-<li><a class="reference internal" href="#text"><tt class="docutils literal"><span class="pre"><%text></span></tt></a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#returning-early-from-a-template">Returning Early from a Template</a></li>
-</ul>
-</li>
-</ul>
-
-
-    <h4>Previous Topic</h4>
-    <p>
-    <a href="usage.html" title="previous chapter">Usage</a>
-    </p>
-    <h4>Next Topic</h4>
-    <p>
-    <a href="defs.html" title="next chapter">Defs and Blocks</a>
-    </p>
-
-    <h4>Quick Search</h4>
-    <p>
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </p>
-
-    </div>
-
-    <div id="docs-body" class="withsidebar" >
-        
-<div class="section" id="syntax">
-<span id="syntax-toplevel"></span><h1>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h1>
-<p>A Mako template is parsed from a text stream containing any kind
-of content, XML, HTML, email text, etc. The template can further
-contain Mako-specific directives which represent variable and/or
-expression substitutions, control structures (i.e. conditionals
-and loops), server-side comments, full blocks of Python code, as
-well as various tags that offer additional functionality. All of
-these constructs compile into real Python code. This means that
-you can leverage the full power of Python in almost every aspect
-of a Mako template.</p>
-<div class="section" id="expression-substitution">
-<h2>Expression Substitution<a class="headerlink" href="#expression-substitution" title="Permalink to this headline">¶</a></h2>
-<p>The simplest expression is just a variable substitution. The
-syntax for this is the <tt class="docutils literal"><span class="pre">${}</span></tt> construct, which is inspired by
-Perl, Genshi, JSP EL, and others:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x">this is x: </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>Above, the string representation of <tt class="docutils literal"><span class="pre">x</span></tt> is applied to the
-template’s output stream. If you’re wondering where <tt class="docutils literal"><span class="pre">x</span></tt> comes
-from, it’s usually from the <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> supplied to the
-template’s rendering function. If <tt class="docutils literal"><span class="pre">x</span></tt> was not supplied to the
-template and was not otherwise assigned locally, it evaluates to
-a special value <tt class="docutils literal"><span class="pre">UNDEFINED</span></tt>. More on that later.</p>
-<p>The contents within the <tt class="docutils literal"><span class="pre">${}</span></tt> tag are evaluated by Python
-directly, so full expressions are OK:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x">pythagorean theorem:  </span><span class="cp">${</span><span class="nb">pow</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span> <span class="o">+</span> <span class="nb">pow</span><span class="p">(</span><span class="n">y</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>The results of the expression are evaluated into a string result
-in all cases before being rendered to the output stream, such as
-the above example where the expression produces a numeric
-result.</p>
-</div>
-<div class="section" id="expression-escaping">
-<h2>Expression Escaping<a class="headerlink" href="#expression-escaping" title="Permalink to this headline">¶</a></h2>
-<p>Mako includes a number of built-in escaping mechanisms,
-including HTML, URI and XML escaping, as well as a “trim”
-function. These escapes can be added to an expression
-substitution using the <tt class="docutils literal"><span class="pre">|</span></tt> operator:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">"this is some text"</span> <span class="o">|</span> <span class="n">u</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>The above expression applies URL escaping to the expression, and
-produces <tt class="docutils literal"><span class="pre">this+is+some+text</span></tt>. The <tt class="docutils literal"><span class="pre">u</span></tt> name indicates URL
-escaping, whereas <tt class="docutils literal"><span class="pre">h</span></tt> represents HTML escaping, <tt class="docutils literal"><span class="pre">x</span></tt>
-represents XML escaping, and <tt class="docutils literal"><span class="pre">trim</span></tt> applies a trim function.</p>
-<p>Read more about built-in filtering functions, including how to
-make your own filter functions, in <a class="reference internal" href="filtering.html"><em>Filtering and Buffering</em></a>.</p>
-</div>
-<div class="section" id="control-structures">
-<h2>Control Structures<a class="headerlink" href="#control-structures" title="Permalink to this headline">¶</a></h2>
-<p>A control structure refers to all those things that control the
-flow of a program – conditionals (i.e. <tt class="docutils literal"><span class="pre">if</span></tt>/<tt class="docutils literal"><span class="pre">else</span></tt>), loops (like
-<tt class="docutils literal"><span class="pre">while</span></tt> and <tt class="docutils literal"><span class="pre">for</span></tt>), as well as things like <tt class="docutils literal"><span class="pre">try</span></tt>/<tt class="docutils literal"><span class="pre">except</span></tt>. In Mako,
-control structures are written using the <tt class="docutils literal"><span class="pre">%</span></tt> marker followed
-by a regular Python control expression, and are “closed” by
-using another <tt class="docutils literal"><span class="pre">%</span></tt> marker with the tag “<tt class="docutils literal"><span class="pre">end<name></span></tt>”, where
-“<tt class="docutils literal"><span class="pre"><name></span></tt>” is the keyword of the expression:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">%</span> <span class="k">if</span> <span class="n">x</span><span class="o">==</span><span class="mi">5</span><span class="p">:</span><span class="x"></span>
-<span class="x">    this is some output</span>
-<span class="cp">%</span><span class="k"> endif</span><span class="x"></span>
-</pre></div>
-</div>
-<p>The <tt class="docutils literal"><span class="pre">%</span></tt> can appear anywhere on the line as long as no text
-precedes it; indentation is not significant. The full range of
-Python “colon” expressions are allowed here, including
-<tt class="docutils literal"><span class="pre">if</span></tt>/<tt class="docutils literal"><span class="pre">elif</span></tt>/<tt class="docutils literal"><span class="pre">else</span></tt>, <tt class="docutils literal"><span class="pre">while</span></tt>, <tt class="docutils literal"><span class="pre">for</span></tt>, and even <tt class="docutils literal"><span class="pre">def</span></tt>, although
-Mako has a built-in tag for defs which is more full-featured.</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">%</span> <span class="k">for</span> <span class="n">a</span> <span class="ow">in</span> <span class="p">[</span><span class="s">'one'</span><span class="p">,</span> <span class="s">'two'</span><span class="p">,</span> <span class="s">'three'</span><span class="p">,</span> <span class="s">'four'</span><span class="p">,</span> <span class="s">'five'</span><span class="p">]:</span><span class="x"></span>
-    <span class="cp">%</span> <span class="k">if</span> <span class="n">a</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s">'t'</span><span class="p">:</span><span class="x"></span>
-<span class="x">    its two or three</span>
-    <span class="cp">%</span> <span class="k">elif</span> <span class="n">a</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s">'f'</span><span class="p">:</span><span class="x"></span>
-<span class="x">    four/five</span>
-    <span class="cp">%</span> <span class="k">else</span><span class="p">:</span><span class="x"></span>
-<span class="x">    one</span>
-    <span class="cp">%</span><span class="k"> endif</span><span class="x"></span>
-<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
-</pre></div>
-</div>
-<p>The <tt class="docutils literal"><span class="pre">%</span></tt> sign can also be “escaped”, if you actually want to
-emit a percent sign as the first non whitespace character on a
-line, by escaping it as in <tt class="docutils literal"><span class="pre">%%</span></tt>:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x">%% some text</span>
-
-<span class="x">    %% some more text</span>
-</pre></div>
-</div>
-<div class="section" id="the-loop-context">
-<h3>The Loop Context<a class="headerlink" href="#the-loop-context" title="Permalink to this headline">¶</a></h3>
-<p>The <strong>loop context</strong> provides additional information about a loop
-while inside of a <tt class="docutils literal"><span class="pre">%</span> <span class="pre">for</span></tt> structure:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><ul></span>
-<span class="cp">%</span> <span class="k">for</span> <span class="n">a</span> <span class="ow">in</span> <span class="p">(</span><span class="s">"one"</span><span class="p">,</span> <span class="s">"two"</span><span class="p">,</span> <span class="s">"three"</span><span class="p">):</span><span class="x"></span>
-<span class="x">    <li>Item </span><span class="cp">${</span><span class="n">loop</span><span class="o">.</span><span class="n">index</span><span class="cp">}</span><span class="x">: </span><span class="cp">${</span><span class="n">a</span><span class="cp">}</span><span class="x"></li></span>
-<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
-<span class="x"></ul></span>
-</pre></div>
-</div>
-<p>See <a class="reference internal" href="runtime.html#loop-context"><em>The Loop Context</em></a> for more information on this feature.</p>
-<p class="versionadded">
-<span class="versionmodified">New in version 0.7.</span></p>
-</div>
-</div>
-<div class="section" id="comments">
-<h2>Comments<a class="headerlink" href="#comments" title="Permalink to this headline">¶</a></h2>
-<p>Comments come in two varieties. The single line comment uses
-<tt class="docutils literal"><span class="pre">##</span></tt> as the first non-space characters on a line:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## this is a comment.</span><span class="x"></span>
-<span class="x">...text ...</span>
-</pre></div>
-</div>
-<p>A multiline version exists using <tt class="docutils literal"><span class="pre"><%doc></span> <span class="pre">...text...</span> <span class="pre"></%doc></span></tt>:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%doc></span>
-<span class="cp">    these are comments</span>
-<span class="cp">    more comments</span>
-<span class="cp"></%doc></span><span class="x"></span>
-</pre></div>
-</div>
-</div>
-<div class="section" id="newline-filters">
-<h2>Newline Filters<a class="headerlink" href="#newline-filters" title="Permalink to this headline">¶</a></h2>
-<p>The backslash (“<tt class="docutils literal"><span class="pre">\</span></tt>”) character, placed at the end of any
-line, will consume the newline character before continuing to
-the next line:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x">here is a line that goes onto </span><span class="o">\</span>
-<span class="x">another line.</span>
-</pre></div>
-</div>
-<p>The above text evaluates to:</p>
-<div class="highlight-text"><div class="highlight"><pre>here is a line that goes onto another line.
-</pre></div>
-</div>
-</div>
-<div class="section" id="python-blocks">
-<h2>Python Blocks<a class="headerlink" href="#python-blocks" title="Permalink to this headline">¶</a></h2>
-<p>Any arbitrary block of python can be dropped in using the <tt class="docutils literal"><span class="pre"><%</span>
-<span class="pre">%></span></tt> tags:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x">this is a template</span>
-<span class="cp"><%</span>
-    <span class="n">x</span> <span class="o">=</span> <span class="n">db</span><span class="o">.</span><span class="n">get_resource</span><span class="p">(</span><span class="s">'foo'</span><span class="p">)</span>
-    <span class="n">y</span> <span class="o">=</span> <span class="p">[</span><span class="n">z</span><span class="o">.</span><span class="n">element</span> <span class="k">for</span> <span class="n">z</span> <span class="ow">in</span> <span class="n">x</span> <span class="k">if</span> <span class="n">x</span><span class="o">.</span><span class="n">frobnizzle</span><span class="o">==</span><span class="mi">5</span><span class="p">]</span>
-<span class="cp">%></span>
-<span class="cp">%</span> <span class="k">for</span> <span class="n">elem</span> <span class="ow">in</span> <span class="n">y</span><span class="p">:</span><span class="x"></span>
-<span class="x">    element: </span><span class="cp">${</span><span class="n">elem</span><span class="cp">}</span>
-<span class="cp">%</span><span class="k"> endfor</span><span class="x"></span>
-</pre></div>
-</div>
-<p>Within <tt class="docutils literal"><span class="pre"><%</span> <span class="pre">%></span></tt>, you’re writing a regular block of Python code.
-While the code can appear with an arbitrary level of preceding
-whitespace, it has to be consistently formatted with itself.
-Mako’s compiler will adjust the block of Python to be consistent
-with the surrounding generated Python code.</p>
-</div>
-<div class="section" id="module-level-blocks">
-<h2>Module-level Blocks<a class="headerlink" href="#module-level-blocks" title="Permalink to this headline">¶</a></h2>
-<p>A variant on <tt class="docutils literal"><span class="pre"><%</span> <span class="pre">%></span></tt> is the module-level code block, denoted
-by <tt class="docutils literal"><span class="pre"><%!</span> <span class="pre">%></span></tt>. Code within these tags is executed at the module
-level of the template, and not within the rendering function of
-the template. Therefore, this code does not have access to the
-template’s context and is only executed when the template is
-loaded into memory (which can be only once per application, or
-more, depending on the runtime environment). Use the <tt class="docutils literal"><span class="pre"><%!</span> <span class="pre">%></span></tt>
-tags to declare your template’s imports, as well as any
-pure-Python functions you might want to declare:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%!</span>
-    <span class="kn">import</span> <span class="nn">mylib</span>
-    <span class="kn">import</span> <span class="nn">re</span>
-
-    <span class="k">def</span> <span class="nf">filter</span><span class="p">(</span><span class="n">text</span><span class="p">):</span>
-        <span class="k">return</span> <span class="n">re</span><span class="o">.</span><span class="n">sub</span><span class="p">(</span><span class="s">r'^@'</span><span class="p">,</span> <span class="s">''</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span>
-<span class="cp">%></span><span class="x"></span>
-</pre></div>
-</div>
-<p>Any number of <tt class="docutils literal"><span class="pre"><%!</span> <span class="pre">%></span></tt> blocks can be declared anywhere in a
-template; they will be rendered in the resulting module
-in a single contiguous block above all render callables,
-in the order in which they appear in the source template.</p>
-</div>
-<div class="section" id="tags">
-<h2>Tags<a class="headerlink" href="#tags" title="Permalink to this headline">¶</a></h2>
-<p>The rest of what Mako offers takes place in the form of tags.
-All tags use the same syntax, which is similar to an XML tag
-except that the first character of the tag name is a <tt class="docutils literal"><span class="pre">%</span></tt>
-character. The tag is closed either by a contained slash
-character, or an explicit closing tag:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">include</span> <span class="na">file=</span><span class="s">"foo.txt"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"foo"</span> <span class="na">buffered=</span><span class="s">"True"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    this is a def</span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>All tags have a set of attributes which are defined for each
-tag. Some of these attributes are required. Also, many
-attributes support <strong>evaluation</strong>, meaning you can embed an
-expression (using <tt class="docutils literal"><span class="pre">${}</span></tt>) inside the attribute text:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">include</span> <span class="na">file=</span><span class="s">"/foo/bar/${myfile}.txt"</span><span class="cp">/></span><span class="x"></span>
-</pre></div>
-</div>
-<p>Whether or not an attribute accepts runtime evaluation depends
-on the type of tag and how that tag is compiled into the
-template. The best way to find out if you can stick an
-expression in is to try it! The lexer will tell you if it’s not
-valid.</p>
-<p>Heres a quick summary of all the tags:</p>
-<div class="section" id="page">
-<h3><tt class="docutils literal"><span class="pre"><%page></span></tt><a class="headerlink" href="#page" title="Permalink to this headline">¶</a></h3>
-<p>This tag defines general characteristics of the template,
-including caching arguments, and optional lists of arguments
-which the template expects when invoked.</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">args=</span><span class="s">"x, y, z='default'"</span><span class="cp">/></span><span class="x"></span>
-</pre></div>
-</div>
-<p>Or a page tag that defines caching characteristics:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">page</span> <span class="na">cached=</span><span class="s">"True"</span> <span class="na">cache_type=</span><span class="s">"memory"</span><span class="cp">/></span><span class="x"></span>
-</pre></div>
-</div>
-<p>Currently, only one <tt class="docutils literal"><span class="pre"><%page></span></tt> tag gets used per template, the
-rest get ignored. While this will be improved in a future
-release, for now make sure you have only one <tt class="docutils literal"><span class="pre"><%page></span></tt> tag
-defined in your template, else you may not get the results you
-want. The details of what <tt class="docutils literal"><span class="pre"><%page></span></tt> is used for are described
-further in <a class="reference internal" href="namespaces.html#namespaces-body"><em>The body() Method</em></a> as well as <a class="reference internal" href="caching.html"><em>Caching</em></a>.</p>
-</div>
-<div class="section" id="include">
-<h3><tt class="docutils literal"><span class="pre"><%include></span></tt><a class="headerlink" href="#include" title="Permalink to this headline">¶</a></h3>
-<p>A tag that is familiar from other template languages, <tt class="docutils literal"><span class="pre">%include</span></tt>
-is a regular joe that just accepts a file argument and calls in
-the rendered result of that file:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">include</span> <span class="na">file=</span><span class="s">"header.html"</span><span class="cp">/></span><span class="x"></span>
-
-<span class="x">    hello world</span>
-
-<span class="cp"><%</span><span class="nb">include</span> <span class="na">file=</span><span class="s">"footer.html"</span><span class="cp">/></span><span class="x"></span>
-</pre></div>
-</div>
-<p>Include also accepts arguments which are available as <tt class="docutils literal"><span class="pre"><%page></span></tt> arguments in the receiving template:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">include</span> <span class="na">file=</span><span class="s">"toolbar.html"</span> <span class="na">args=</span><span class="s">"current_section='members', username='ed'"</span><span class="cp">/></span><span class="x"></span>
-</pre></div>
-</div>
-</div>
-<div class="section" id="def">
-<h3><tt class="docutils literal"><span class="pre"><%def></span></tt><a class="headerlink" href="#def" title="Permalink to this headline">¶</a></h3>
-<p>The <tt class="docutils literal"><span class="pre">%def</span></tt> tag defines a Python function which contains a set
-of content, that can be called at some other point in the
-template. The basic idea is simple:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"myfunc(x)"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    this is myfunc, x is </span><span class="cp">${</span><span class="n">x</span><span class="cp">}</span><span class="x"></span>
-<span class="cp"></%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-
-<span class="cp">${</span><span class="n">myfunc</span><span class="p">(</span><span class="mi">7</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>The <tt class="docutils literal"><span class="pre">%def</span></tt> tag is a lot more powerful than a plain Python <tt class="docutils literal"><span class="pre">def</span></tt>, as
-the Mako compiler provides many extra services with <tt class="docutils literal"><span class="pre">%def</span></tt> that
-you wouldn’t normally have, such as the ability to export defs
-as template “methods”, automatic propagation of the current
-<a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>, buffering/filtering/caching flags, and def calls
-with content, which enable packages of defs to be sent as
-arguments to other def calls (not as hard as it sounds). Get the
-full deal on what <tt class="docutils literal"><span class="pre">%def</span></tt> can do in <a class="reference internal" href="defs.html"><em>Defs and Blocks</em></a>.</p>
-</div>
-<div class="section" id="block">
-<h3><tt class="docutils literal"><span class="pre"><%block></span></tt><a class="headerlink" href="#block" title="Permalink to this headline">¶</a></h3>
-<p><tt class="docutils literal"><span class="pre">%block</span></tt> is a tag that is close to a <tt class="docutils literal"><span class="pre">%def</span></tt>,
-except executes itself immediately in its base-most scope,
-and can also be anonymous (i.e. with no name):</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">block</span> <span class="na">filter=</span><span class="s">"h"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    some <html> stuff.</span>
-<span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>Inspired by Jinja2 blocks, named blocks offer a syntactically pleasing way
-to do inheritance:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><html></span>
-<span class="x">    <body></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"header"</span><span class="cp">></span><span class="x"></span>
-<span class="x">        <h2></span><span class="cp"><%</span><span class="nb">block</span> <span class="na">name=</span><span class="s">"title"</span><span class="cp">/></span><span class="x"></h2></span>
-<span class="x">    </span><span class="cp"></%</span><span class="nb">block</span><span class="cp">></span><span class="x"></span>
-<span class="x">    </span><span class="cp">${</span><span class="bp">self</span><span class="o">.</span><span class="n">body</span><span class="p">()</span><span class="cp">}</span><span class="x"></span>
-<span class="x">    </body></span>
-<span class="x"></html></span>
-</pre></div>
-</div>
-<p>Blocks are introduced in <a class="reference internal" href="defs.html#blocks"><em>Using Blocks</em></a> and further described in <a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</p>
-<p class="versionadded">
-<span class="versionmodified">New in version 0.4.1.</span></p>
-</div>
-<div class="section" id="namespace">
-<h3><tt class="docutils literal"><span class="pre"><%namespace></span></tt><a class="headerlink" href="#namespace" title="Permalink to this headline">¶</a></h3>
-<p><tt class="docutils literal"><span class="pre">%namespace</span></tt> is Mako’s equivalent of Python’s <tt class="docutils literal"><span class="pre">import</span></tt>
-statement. It allows access to all the rendering functions and
-metadata of other template files, plain Python modules, as well
-as locally defined “packages” of functions.</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">namespace</span> <span class="na">file=</span><span class="s">"functions.html"</span> <span class="na">import=</span><span class="s">"*"</span><span class="cp">/></span><span class="x"></span>
-</pre></div>
-</div>
-<p>The underlying object generated by <tt class="docutils literal"><span class="pre">%namespace</span></tt>, an instance of
-<a class="reference internal" href="namespaces.html#mako.runtime.Namespace" title="mako.runtime.Namespace"><tt class="xref py py-class docutils literal"><span class="pre">mako.runtime.Namespace</span></tt></a>, is a central construct used in
-templates to reference template-specific information such as the
-current URI, inheritance structures, and other things that are
-not as hard as they sound right here. Namespaces are described
-in <a class="reference internal" href="namespaces.html"><em>Namespaces</em></a>.</p>
-</div>
-<div class="section" id="inherit">
-<h3><tt class="docutils literal"><span class="pre"><%inherit></span></tt><a class="headerlink" href="#inherit" title="Permalink to this headline">¶</a></h3>
-<p>Inherit allows templates to arrange themselves in <strong>inheritance
-chains</strong>. This is a concept familiar in many other template
-languages.</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">inherit</span> <span class="na">file=</span><span class="s">"base.html"</span><span class="cp">/></span><span class="x"></span>
-</pre></div>
-</div>
-<p>When using the <tt class="docutils literal"><span class="pre">%inherit</span></tt> tag, control is passed to the topmost
-inherited template first, which then decides how to handle
-calling areas of content from its inheriting templates. Mako
-offers a lot of flexibility in this area, including dynamic
-inheritance, content wrapping, and polymorphic method calls.
-Check it out in <a class="reference internal" href="inheritance.html"><em>Inheritance</em></a>.</p>
-</div>
-<div class="section" id="nsname-defname">
-<h3><tt class="docutils literal"><span class="pre"><%</span></tt>nsname<tt class="docutils literal"><span class="pre">:</span></tt>defname<tt class="docutils literal"><span class="pre">></span></tt><a class="headerlink" href="#nsname-defname" title="Permalink to this headline">¶</a></h3>
-<p>Any user-defined “tag” can be created against
-a namespace by using a tag with a name of the form
-<tt class="docutils literal"><span class="pre"><%<namespacename>:<defname>></span></tt>. The closed and open formats of such a
-tag are equivalent to an inline expression and the <tt class="docutils literal"><span class="pre"><%call></span></tt>
-tag, respectively.</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">mynamespace:somedef</span> <span class="na">param=</span><span class="s">"some value"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    this is the body</span>
-<span class="cp"></%</span><span class="nb">mynamespace:somedef</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-<p>To create custom tags which accept a body, see
-<a class="reference internal" href="defs.html#defs-with-content"><em>Calling a Def with Embedded Content and/or Other Defs</em></a>.</p>
-<p class="versionadded">
-<span class="versionmodified">New in version 0.2.3.</span></p>
-</div>
-<div class="section" id="call">
-<h3><tt class="docutils literal"><span class="pre"><%call></span></tt><a class="headerlink" href="#call" title="Permalink to this headline">¶</a></h3>
-<p>The call tag is the “classic” form of a user-defined tag, and is
-roughly equivalent to the <tt class="docutils literal"><span class="pre"><%namespacename:defname></span></tt> syntax
-described above. This tag is also described in <a class="reference internal" href="defs.html#defs-with-content"><em>Calling a Def with Embedded Content and/or Other Defs</em></a>.</p>
-</div>
-<div class="section" id="doc">
-<h3><tt class="docutils literal"><span class="pre"><%doc></span></tt><a class="headerlink" href="#doc" title="Permalink to this headline">¶</a></h3>
-<p>The <tt class="docutils literal"><span class="pre">%doc</span></tt> tag handles multiline comments:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%doc></span>
-<span class="cp">    these are comments</span>
-<span class="cp">    more comments</span>
-<span class="cp"></%doc></span><span class="x"></span>
-</pre></div>
-</div>
-<p>Also the <tt class="docutils literal"><span class="pre">##</span></tt> symbol as the first non-space characters on a line can be used for single line comments.</p>
-</div>
-<div class="section" id="text">
-<h3><tt class="docutils literal"><span class="pre"><%text></span></tt><a class="headerlink" href="#text" title="Permalink to this headline">¶</a></h3>
-<p>This tag suspends the Mako lexer’s normal parsing of Mako
-template directives, and returns its entire body contents as
-plain text. It is used pretty much to write documentation about
-Mako:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span><span class="nb">text</span> <span class="na">filter=</span><span class="s">"h"</span><span class="cp">></span><span class="x"></span>
-<span class="x">    heres some fake mako </span><span class="cp">${</span><span class="n">syntax</span><span class="cp">}</span><span class="x"></span>
-<span class="x">    </span><span class="cp"><%</span><span class="nb">def</span> <span class="na">name=</span><span class="s">"x()"</span><span class="cp">>${</span><span class="n">x</span><span class="cp">}</%</span><span class="nb">def</span><span class="cp">></span><span class="x"></span>
-<span class="cp"></%</span><span class="nb">text</span><span class="cp">></span><span class="x"></span>
-</pre></div>
-</div>
-</div>
-</div>
-<div class="section" id="returning-early-from-a-template">
-<h2>Returning Early from a Template<a class="headerlink" href="#returning-early-from-a-template" title="Permalink to this headline">¶</a></h2>
-<p>Sometimes you want to stop processing a template or <tt class="docutils literal"><span class="pre"><%def></span></tt>
-method in the middle and just use the text you’ve accumulated so
-far. You can use a <tt class="docutils literal"><span class="pre">return</span></tt> statement inside a Python
-block to do that.</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">%</span> <span class="k">if</span> <span class="ow">not</span> <span class="nb">len</span><span class="p">(</span><span class="n">records</span><span class="p">):</span><span class="x"></span>
-<span class="x">    No records found.</span>
-<span class="x">    </span><span class="cp"><%</span> <span class="k">return</span> <span class="cp">%></span>
-<span class="cp">%</span><span class="k"> endif</span><span class="x"></span>
-</pre></div>
-</div>
-<p>Or perhaps:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp"><%</span>
-    <span class="k">if</span> <span class="ow">not</span> <span class="nb">len</span><span class="p">(</span><span class="n">records</span><span class="p">):</span>
-        <span class="k">return</span>
-<span class="cp">%></span><span class="x"></span>
-</pre></div>
-</div>
-</div>
-</div>
-
-    </div>
-
-</div>
-
-<div id="docs-bottom-navigation" class="docs-navigation-links">
-        Previous:
-        <a href="usage.html" title="previous chapter">Usage</a>
-        Next:
-        <a href="defs.html" title="next chapter">Defs and Blocks</a>
-
-    <div id="docs-copyright">
-        © Copyright the Mako authors and contributors.
-        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
-        with Mako templates.
-    </div>
-</div>
-
-</div>
-
-<div class="clearfix">
-
-<hr/>
-
-<div class="copyright">Website content copyright © by Michael Bayer.
-    All rights reserved.  Mako and its documentation are licensed
-    under the MIT license.  mike(&)zzzcomputing.com</div>
-
-</div>
-</div>
-</body>
-</html>
diff --git a/lib/mako-0.7.2/doc/unicode.html b/lib/mako-0.7.2/doc/unicode.html
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/unicode.html
+++ /dev/null
@@ -1,474 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
-<head>
-<title>
-    
-                The Unicode Chapter
-             — 
-    Mako 0.7.2 Documentation
-</title>
-
-    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
-
-    <script type="text/javascript">
-      var DOCUMENTATION_OPTIONS = {
-          URL_ROOT:    '#',
-          VERSION:     '0.7.2',
-          COLLAPSE_MODINDEX: false,
-          FILE_SUFFIX: '.html'
-      };
-    </script>
-        <script type="text/javascript" src="_static/jquery.js"></script>
-        <script type="text/javascript" src="_static/underscore.js"></script>
-        <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
-    <link rel="top" title="Mako 0.7.2 Documentation" href="index.html" />
-        <link rel="next" title="Caching" href="caching.html" />
-        <link rel="prev" title="Filtering and Buffering" href="filtering.html" />
-
-<link rel="stylesheet" href="_static/site.css"></link>
-
-
-</head>
-<body>
-    <div id="wrap">
-    <div class="rightbar">
-    <div class="slogan">
-    Hyperfast and lightweight templating for the Python platform.
-    </div>
-
-
-    </div>
-
-    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
-
-    <hr/>
-
-    
-
-
-
-
-
-
-
-
-
-<div id="docs-container">
-
-
-
-<div id="docs-header">
-    <h1>Mako 0.7.2 Documentation</h1>
-
-    <div id="docs-search">
-    Search:
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </div>
-
-    <div id="docs-version-header">
-        Release: <span class="version-num">0.7.2</span>
-
-    </div>
-
-</div>
-
-<div id="docs-top-navigation">
-    <div id="docs-top-page-control" class="docs-navigation-links">
-        <ul>
-            <li>Prev:
-            <a href="filtering.html" title="previous chapter">Filtering and Buffering</a>
-            </li>
-            <li>Next:
-            <a href="caching.html" title="next chapter">Caching</a>
-            </li>
-
-        <li>
-            <a href="index.html">Table of Contents</a> |
-            <a href="genindex.html">Index</a>
-            | <a href="_sources/unicode.txt">view source
-        </li>
-        </ul>
-    </div>
-
-    <div id="docs-navigation-banner">
-        <a href="index.html">Mako 0.7.2 Documentation</a>
-        » 
-                The Unicode Chapter
-             
-
-        <h2>
-            
-                The Unicode Chapter
-            
-        </h2>
-    </div>
-
-</div>
-
-<div id="docs-body-container">
-
-    <div id="docs-sidebar">
-    <h3><a href="index.html">Table of Contents</a></h3>
-    <ul>
-<li><a class="reference internal" href="#">The Unicode Chapter</a><ul>
-<li><a class="reference internal" href="#specifying-the-encoding-of-a-template-file">Specifying the Encoding of a Template File</a></li>
-<li><a class="reference internal" href="#handling-expressions">Handling Expressions</a></li>
-<li><a class="reference internal" href="#defining-output-encoding">Defining Output Encoding</a><ul>
-<li><a class="reference internal" href="#buffer-selection">Buffer Selection</a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#saying-to-heck-with-it-disabling-the-usage-of-unicode-entirely">Saying to Heck with It: Disabling the Usage of Unicode Entirely</a><ul>
-<li><a class="reference internal" href="#rules-for-using-disable-unicode-true">Rules for using <tt class="docutils literal"><span class="pre">disable_unicode=True</span></tt></a></li>
-</ul>
-</li>
-</ul>
-</li>
-</ul>
-
-
-    <h4>Previous Topic</h4>
-    <p>
-    <a href="filtering.html" title="previous chapter">Filtering and Buffering</a>
-    </p>
-    <h4>Next Topic</h4>
-    <p>
-    <a href="caching.html" title="next chapter">Caching</a>
-    </p>
-
-    <h4>Quick Search</h4>
-    <p>
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </p>
-
-    </div>
-
-    <div id="docs-body" class="withsidebar" >
-        
-<div class="section" id="the-unicode-chapter">
-<span id="unicode-toplevel"></span><h1>The Unicode Chapter<a class="headerlink" href="#the-unicode-chapter" title="Permalink to this headline">¶</a></h1>
-<p>The Python language supports two ways of representing what we
-know as “strings”, i.e. series of characters. In Python 2, the
-two types are <tt class="docutils literal"><span class="pre">string</span></tt> and <tt class="docutils literal"><span class="pre">unicode</span></tt>, and in Python 3 they are
-<tt class="docutils literal"><span class="pre">bytes</span></tt> and <tt class="docutils literal"><span class="pre">string</span></tt>. A key aspect of the Python 2 <tt class="docutils literal"><span class="pre">string</span></tt> and
-Python 3 <tt class="docutils literal"><span class="pre">bytes</span></tt> types are that they contain no information
-regarding what <strong>encoding</strong> the data is stored in. For this
-reason they were commonly referred to as <strong>byte strings</strong> on
-Python 2, and Python 3 makes this name more explicit. The
-origins of this come from Python’s background of being developed
-before the Unicode standard was even available, back when
-strings were C-style strings and were just that, a series of
-bytes. Strings that had only values below 128 just happened to
-be <strong>ASCII</strong> strings and were printable on the console, whereas
-strings with values above 128 would produce all kinds of
-graphical characters and bells.</p>
-<p>Contrast the “byte-string” type with the “unicode/string” type.
-Objects of this latter type are created whenever you say something like
-<tt class="docutils literal"><span class="pre">u"hello</span> <span class="pre">world"</span></tt> (or in Python 3, just <tt class="docutils literal"><span class="pre">"hello</span> <span class="pre">world"</span></tt>). In this
-case, Python represents each character in the string internally
-using multiple bytes per character (something similar to
-UTF-16). What’s important is that when using the
-<tt class="docutils literal"><span class="pre">unicode</span></tt>/<tt class="docutils literal"><span class="pre">string</span></tt> type to store strings, Python knows the
-data’s encoding; it’s in its own internal format. Whereas when
-using the <tt class="docutils literal"><span class="pre">string</span></tt>/<tt class="docutils literal"><span class="pre">bytes</span></tt> type, it does not.</p>
-<p>When Python 2 attempts to treat a byte-string as a string, which
-means it’s attempting to compare/parse its characters, to coerce
-it into another encoding, or to decode it to a unicode object,
-it has to guess what the encoding is. In this case, it will
-pretty much always guess the encoding as <tt class="docutils literal"><span class="pre">ascii</span></tt>... and if the
-byte-string contains bytes above value 128, you’ll get an error.
-Python 3 eliminates much of this confusion by just raising an
-error unconditionally if a byte-string is used in a
-character-aware context.</p>
-<p>There is one operation that Python <em>can</em> do with a non-ASCII
-byte-string, and it’s a great source of confusion: it can dump the
-byte-string straight out to a stream or a file, with nary a care
-what the encoding is. To Python, this is pretty much like
-dumping any other kind of binary data (like an image) to a
-stream somewhere. In Python 2, it is common to see programs that
-embed all kinds of international characters and encodings into
-plain byte-strings (i.e. using <tt class="docutils literal"><span class="pre">"hello</span> <span class="pre">world"</span></tt> style literals)
-can fly right through their run, sending reams of strings out to
-wherever they are going, and the programmer, seeing the same
-output as was expressed in the input, is now under the illusion
-that his or her program is Unicode-compliant. In fact, their
-program has no unicode awareness whatsoever, and similarly has
-no ability to interact with libraries that <em>are</em> unicode aware.
-Python 3 makes this much less likely by defaulting to unicode as
-the storage format for strings.</p>
-<p>The “pass through encoded data” scheme is what template
-languages like Cheetah and earlier versions of Myghty do by
-default. Mako as of version 0.2 also supports this mode of
-operation when using Python 2, using the <tt class="docutils literal"><span class="pre">disable_unicode=True</span></tt>
-flag. However, when using Mako in its default mode of
-unicode-aware, it requires explicitness when dealing with
-non-ASCII encodings. Additionally, if you ever need to handle
-unicode strings and other kinds of encoding conversions more
-intelligently, the usage of raw byte-strings quickly becomes a
-nightmare, since you are sending the Python interpreter
-collections of bytes for which it can make no intelligent
-decisions with regards to encoding. In Python 3 Mako only allows
-usage of native, unicode strings.</p>
-<p>In normal Mako operation, all parsed template constructs and
-output streams are handled internally as Python <tt class="docutils literal"><span class="pre">unicode</span></tt>
-objects. It’s only at the point of <a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> that this unicode
-stream may be rendered into whatever the desired output encoding
-is. The implication here is that the template developer must
-:ensure that <a class="reference internal" href="#set-template-file-encoding"><em>the encoding of all non-ASCII templates is explicit</em></a> (still required in Python 3),
-that <a class="reference internal" href="#handling-non-ascii-expressions"><em>all non-ASCII-encoded expressions are in one way or another
-converted to unicode</em></a>
-(not much of a burden in Python 3), and that <a class="reference internal" href="#defining-output-encoding"><em>the output stream of the
-template is handled as a unicode stream being encoded to some
-encoding</em></a> (still required in Python 3).</p>
-<div class="section" id="specifying-the-encoding-of-a-template-file">
-<span id="set-template-file-encoding"></span><h2>Specifying the Encoding of a Template File<a class="headerlink" href="#specifying-the-encoding-of-a-template-file" title="Permalink to this headline">¶</a></h2>
-<p>This is the most basic encoding-related setting, and it is
-equivalent to Python’s “magic encoding comment”, as described in
-<a class="reference external" href="http://www.python.org/dev/peps/pep-0263/">pep-0263</a>. Any
-template that contains non-ASCII characters requires that this
-comment be present so that Mako can decode to unicode (and also
-make usage of Python’s AST parsing services). Mako’s lexer will
-use this encoding in order to convert the template source into a
-<tt class="docutils literal"><span class="pre">unicode</span></tt> object before continuing its parsing:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">## -*- coding: utf-8 -*-</span><span class="x"></span>
-
-<span class="x">Alors vous imaginez ma surprise, au lever du jour, quand</span>
-<span class="x">une drôle de petite voix m’a réveillé. Elle disait:</span>
-<span class="x"> « S’il vous plaît… dessine-moi un mouton! »</span>
-</pre></div>
-</div>
-<p>For the picky, the regular expression used is derived from that
-of the above mentioned pep:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c">#.*coding[:=]\s*([-\w.]+).*\n</span>
-</pre></div>
-</div>
-<p>The lexer will convert to unicode in all cases, so that if any
-characters exist in the template that are outside of the
-specified encoding (or the default of <tt class="docutils literal"><span class="pre">ascii</span></tt>), the error will
-be immediate.</p>
-<p>As an alternative, the template encoding can be specified
-programmatically to either <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> or <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> via
-the <tt class="docutils literal"><span class="pre">input_encoding</span></tt> parameter:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'./'</span><span class="p">],</span> <span class="n">input_encoding</span><span class="o">=</span><span class="s">'utf-8'</span><span class="p">)</span>
-</pre></div>
-</div>
-<p>The above will assume all located templates specify <tt class="docutils literal"><span class="pre">utf-8</span></tt>
-encoding, unless the template itself contains its own magic
-encoding comment, which takes precedence.</p>
-</div>
-<div class="section" id="handling-expressions">
-<span id="handling-non-ascii-expressions"></span><h2>Handling Expressions<a class="headerlink" href="#handling-expressions" title="Permalink to this headline">¶</a></h2>
-<p>The next area that encoding comes into play is in expression
-constructs. By default, Mako’s treatment of an expression like
-this:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">"hello world"</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>looks something like this:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="nb">unicode</span><span class="p">(</span><span class="s">"hello world"</span><span class="p">))</span>
-</pre></div>
-</div>
-<p>In Python 3, it’s just:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="s">"hello world"</span><span class="p">))</span>
-</pre></div>
-</div>
-<p>That is, <strong>the output of all expressions is run through the
-``unicode`` built-in</strong>. This is the default setting, and can be
-modified to expect various encodings. The <tt class="docutils literal"><span class="pre">unicode</span></tt> step serves
-both the purpose of rendering non-string expressions into
-strings (such as integers or objects which contain <tt class="docutils literal"><span class="pre">__str()__</span></tt>
-methods), and to ensure that the final output stream is
-constructed as a unicode object. The main implication of this is
-that <strong>any raw byte-strings that contain an encoding other than
-ASCII must first be decoded to a Python unicode object</strong>. It
-means you can’t say this in Python 2:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">"voix m’a réveillé."</span><span class="cp">}</span>  <span class="cp">## error in Python 2!</span><span class="x"></span>
-</pre></div>
-</div>
-<p>You must instead say this:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="s">u"voix m’a réveillé."</span><span class="cp">}</span>  <span class="cp">## OK !</span><span class="x"></span>
-</pre></div>
-</div>
-<p>Similarly, if you are reading data from a file that is streaming
-bytes, or returning data from some object that is returning a
-Python byte-string containing a non-ASCII encoding, you have to
-explicitly decode to unicode first, such as:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="cp">${</span><span class="n">call_my_object</span><span class="p">()</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s">'utf-8'</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-</pre></div>
-</div>
-<p>Note that filehandles acquired by <tt class="docutils literal"><span class="pre">open()</span></tt> in Python 3 default
-to returning “text”, that is the decoding is done for you. See
-Python 3’s documentation for the <tt class="docutils literal"><span class="pre">open()</span></tt> built-in for details on
-this.</p>
-<p>If you want a certain encoding applied to <em>all</em> expressions,
-override the <tt class="docutils literal"><span class="pre">unicode</span></tt> builtin with the <tt class="docutils literal"><span class="pre">decode</span></tt> built-in at the
-<a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> or <a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> level:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="n">templatetext</span><span class="p">,</span> <span class="n">default_filters</span><span class="o">=</span><span class="p">[</span><span class="s">'decode.utf8'</span><span class="p">])</span>
-</pre></div>
-</div>
-<p>Note that the built-in <tt class="docutils literal"><span class="pre">decode</span></tt> object is slower than the
-<tt class="docutils literal"><span class="pre">unicode</span></tt> function, since unlike <tt class="docutils literal"><span class="pre">unicode</span></tt> it’s not a Python
-built-in, and it also checks the type of the incoming data to
-determine if string conversion is needed first.</p>
-<p>The <tt class="docutils literal"><span class="pre">default_filters</span></tt> argument can be used to entirely customize
-the filtering process of expressions. This argument is described
-in <a class="reference internal" href="filtering.html#filtering-default-filters"><em>The default_filters Argument</em></a>.</p>
-</div>
-<div class="section" id="defining-output-encoding">
-<span id="id1"></span><h2>Defining Output Encoding<a class="headerlink" href="#defining-output-encoding" title="Permalink to this headline">¶</a></h2>
-<p>Now that we have a template which produces a pure unicode output
-stream, all the hard work is done. We can take the output and do
-anything with it.</p>
-<p>As stated in the <a class="reference internal" href="usage.html"><em>“Usage” chapter</em></a>, both <a class="reference internal" href="usage.html#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> and
-<a class="reference internal" href="usage.html#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> accept <tt class="docutils literal"><span class="pre">output_encoding</span></tt> and <tt class="docutils literal"><span class="pre">encoding_errors</span></tt>
-parameters which can be used to encode the output in any Python
-supported codec:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
-<span class="kn">from</span> <span class="nn">mako.lookup</span> <span class="kn">import</span> <span class="n">TemplateLookup</span>
-
-<span class="n">mylookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/docs'</span><span class="p">],</span> <span class="n">output_encoding</span><span class="o">=</span><span class="s">'utf-8'</span><span class="p">,</span> <span class="n">encoding_errors</span><span class="o">=</span><span class="s">'replace'</span><span class="p">)</span>
-
-<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">mylookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="s">"foo.txt"</span><span class="p">)</span>
-<span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
-</pre></div>
-</div>
-<p><a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> will return a <tt class="docutils literal"><span class="pre">bytes</span></tt> object in Python 3 if an output
-encoding is specified. By default it performs no encoding and
-returns a native string.</p>
-<p><a class="reference internal" href="usage.html#mako.template.Template.render_unicode" title="mako.template.Template.render_unicode"><tt class="xref py py-meth docutils literal"><span class="pre">render_unicode()</span></tt></a> will return the template output as a Python
-<tt class="docutils literal"><span class="pre">unicode</span></tt> object (or <tt class="docutils literal"><span class="pre">string</span></tt> in Python 3):</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render_unicode</span><span class="p">()</span>
-</pre></div>
-</div>
-<p>The above method disgards the output encoding keyword argument;
-you can encode yourself by saying:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render_unicode</span><span class="p">()</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s">'utf-8'</span><span class="p">,</span> <span class="s">'replace'</span><span class="p">)</span>
-</pre></div>
-</div>
-<div class="section" id="buffer-selection">
-<h3>Buffer Selection<a class="headerlink" href="#buffer-selection" title="Permalink to this headline">¶</a></h3>
-<p>Mako does play some games with the style of buffering used
-internally, to maximize performance. Since the buffer is by far
-the most heavily used object in a render operation, it’s
-important!</p>
-<p>When calling <a class="reference internal" href="usage.html#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> on a template that does not specify any
-output encoding (i.e. it’s <tt class="docutils literal"><span class="pre">ascii</span></tt>), Python’s <tt class="docutils literal"><span class="pre">cStringIO</span></tt> module,
-which cannot handle encoding of non-ASCII <tt class="docutils literal"><span class="pre">unicode</span></tt> objects
-(even though it can send raw byte-strings through), is used for
-buffering. Otherwise, a custom Mako class called
-<tt class="docutils literal"><span class="pre">FastEncodingBuffer</span></tt> is used, which essentially is a super
-dumbed-down version of <tt class="docutils literal"><span class="pre">StringIO</span></tt> that gathers all strings into
-a list and uses <tt class="docutils literal"><span class="pre">u''.join(elements)</span></tt> to produce the final output
-– it’s markedly faster than <tt class="docutils literal"><span class="pre">StringIO</span></tt>.</p>
-</div>
-</div>
-<div class="section" id="saying-to-heck-with-it-disabling-the-usage-of-unicode-entirely">
-<span id="unicode-disabled"></span><h2>Saying to Heck with It: Disabling the Usage of Unicode Entirely<a class="headerlink" href="#saying-to-heck-with-it-disabling-the-usage-of-unicode-entirely" title="Permalink to this headline">¶</a></h2>
-<p>Some segments of Mako’s userbase choose to make no usage of
-Unicode whatsoever, and instead would prefer the “pass through”
-approach; all string expressions in their templates return
-encoded byte-strings, and they would like these strings to pass
-right through. The only advantage to this approach is that
-templates need not use <tt class="docutils literal"><span class="pre">u""</span></tt> for literal strings; there’s an
-arguable speed improvement as well since raw byte-strings
-generally perform slightly faster than unicode objects in
-Python. For these users, assuming they’re sticking with Python
-2, they can hit the <tt class="docutils literal"><span class="pre">disable_unicode=True</span></tt> flag as so:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># -*- encoding:utf-8 -*-</span>
-<span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
-
-<span class="n">t</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"drôle de petite voix m’a réveillé."</span><span class="p">,</span> <span class="n">disable_unicode</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">input_encoding</span><span class="o">=</span><span class="s">'utf-8'</span><span class="p">)</span>
-<span class="k">print</span> <span class="n">t</span><span class="o">.</span><span class="n">code</span>
-</pre></div>
-</div>
-<p>The <tt class="docutils literal"><span class="pre">disable_unicode</span></tt> mode is strictly a Python 2 thing. It is
-not supported at all in Python 3.</p>
-<p>The generated module source code will contain elements like
-these:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># -*- encoding:utf-8 -*-</span>
-<span class="c">#  ...more generated code ...</span>
-
-<span class="k">def</span> <span class="nf">render_body</span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="o">**</span><span class="n">pageargs</span><span class="p">):</span>
-    <span class="n">context</span><span class="o">.</span><span class="n">caller_stack</span><span class="o">.</span><span class="n">push_frame</span><span class="p">()</span>
-    <span class="k">try</span><span class="p">:</span>
-        <span class="n">__M_locals</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="n">pageargs</span><span class="o">=</span><span class="n">pageargs</span><span class="p">)</span>
-        <span class="c"># SOURCE LINE 1</span>
-        <span class="n">context</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">'dr</span><span class="se">\xc3\xb4</span><span class="s">le de petite voix m</span><span class="se">\xe2\x80\x99</span><span class="s">a r</span><span class="se">\xc3\xa9</span><span class="s">veill</span><span class="se">\xc3\xa9</span><span class="s">.'</span><span class="p">)</span>
-        <span class="k">return</span> <span class="s">''</span>
-    <span class="k">finally</span><span class="p">:</span>
-        <span class="n">context</span><span class="o">.</span><span class="n">caller_stack</span><span class="o">.</span><span class="n">pop_frame</span><span class="p">()</span>
-</pre></div>
-</div>
-<p>Where above that the string literal used within <a class="reference internal" href="runtime.html#mako.runtime.Context.write" title="mako.runtime.Context.write"><tt class="xref py py-meth docutils literal"><span class="pre">Context.write()</span></tt></a>
-is a regular byte-string.</p>
-<p>When <tt class="docutils literal"><span class="pre">disable_unicode=True</span></tt> is turned on, the <tt class="docutils literal"><span class="pre">default_filters</span></tt>
-argument which normally defaults to <tt class="docutils literal"><span class="pre">["unicode"]</span></tt> now defaults
-to <tt class="docutils literal"><span class="pre">["str"]</span></tt> instead. Setting <tt class="docutils literal"><span class="pre">default_filters</span></tt> to the empty list
-<tt class="docutils literal"><span class="pre">[]</span></tt> can remove the overhead of the <tt class="docutils literal"><span class="pre">str</span></tt> call. Also, in this
-mode you <strong>cannot</strong> safely call <a class="reference internal" href="usage.html#mako.template.Template.render_unicode" title="mako.template.Template.render_unicode"><tt class="xref py py-meth docutils literal"><span class="pre">render_unicode()</span></tt></a> – you’ll get
-unicode/decode errors.</p>
-<p>The <tt class="docutils literal"><span class="pre">h</span></tt> filter (HTML escape) uses a less performant pure Python
-escape function in non-unicode mode. This because
-MarkupSafe only supports Python unicode objects for non-ASCII
-strings.</p>
-<p class="versionchanged">
-<span class="versionmodified">Changed in version 0.3.4: </span>In prior versions, it used <tt class="docutils literal"><span class="pre">cgi.escape()</span></tt>, which has been replaced
-with a function that also escapes single quotes.</p>
-<div class="section" id="rules-for-using-disable-unicode-true">
-<h3>Rules for using <tt class="docutils literal"><span class="pre">disable_unicode=True</span></tt><a class="headerlink" href="#rules-for-using-disable-unicode-true" title="Permalink to this headline">¶</a></h3>
-<ul class="simple">
-<li>Don’t use this mode unless you really, really want to and you
-absolutely understand what you’re doing.</li>
-<li>Don’t use this option just because you don’t want to learn to
-use Unicode properly; we aren’t supporting user issues in this
-mode of operation. We will however offer generous help for the
-vast majority of users who stick to the Unicode program.</li>
-<li>Python 3 is unicode by default, and the flag is not available
-when running on Python 3.</li>
-</ul>
-</div>
-</div>
-</div>
-
-    </div>
-
-</div>
-
-<div id="docs-bottom-navigation" class="docs-navigation-links">
-        Previous:
-        <a href="filtering.html" title="previous chapter">Filtering and Buffering</a>
-        Next:
-        <a href="caching.html" title="next chapter">Caching</a>
-
-    <div id="docs-copyright">
-        © Copyright the Mako authors and contributors.
-        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
-        with Mako templates.
-    </div>
-</div>
-
-</div>
-
-<div class="clearfix">
-
-<hr/>
-
-<div class="copyright">Website content copyright © by Michael Bayer.
-    All rights reserved.  Mako and its documentation are licensed
-    under the MIT license.  mike(&)zzzcomputing.com</div>
-
-</div>
-</div>
-</body>
-</html>
diff --git a/lib/mako-0.7.2/doc/usage.html b/lib/mako-0.7.2/doc/usage.html
deleted file mode 100644
--- a/lib/mako-0.7.2/doc/usage.html
+++ /dev/null
@@ -1,1055 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
-<head>
-<title>
-    
-                Usage
-             — 
-    Mako 0.7.2 Documentation
-</title>
-
-    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-    <link rel="stylesheet" href="_static/docs.css" type="text/css" />
-
-    <script type="text/javascript">
-      var DOCUMENTATION_OPTIONS = {
-          URL_ROOT:    '#',
-          VERSION:     '0.7.2',
-          COLLAPSE_MODINDEX: false,
-          FILE_SUFFIX: '.html'
-      };
-    </script>
-        <script type="text/javascript" src="_static/jquery.js"></script>
-        <script type="text/javascript" src="_static/underscore.js"></script>
-        <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
-    <link rel="top" title="Mako 0.7.2 Documentation" href="index.html" />
-        <link rel="next" title="Syntax" href="syntax.html" />
-        <link rel="prev" title="Table of Contents" href="index.html" />
-
-<link rel="stylesheet" href="_static/site.css"></link>
-
-
-</head>
-<body>
-    <div id="wrap">
-    <div class="rightbar">
-    <div class="slogan">
-    Hyperfast and lightweight templating for the Python platform.
-    </div>
-
-
-    </div>
-
-    <a href="http://www.makotemplates.org/"><img src="_static/makoLogo.png" /></a>
-
-    <hr/>
-
-    
-
-
-
-
-
-
-
-
-
-<div id="docs-container">
-
-
-
-<div id="docs-header">
-    <h1>Mako 0.7.2 Documentation</h1>
-
-    <div id="docs-search">
-    Search:
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </div>
-
-    <div id="docs-version-header">
-        Release: <span class="version-num">0.7.2</span>
-
-    </div>
-
-</div>
-
-<div id="docs-top-navigation">
-    <div id="docs-top-page-control" class="docs-navigation-links">
-        <ul>
-            <li>Prev:
-            <a href="index.html" title="previous chapter">Table of Contents</a>
-            </li>
-            <li>Next:
-            <a href="syntax.html" title="next chapter">Syntax</a>
-            </li>
-
-        <li>
-            <a href="index.html">Table of Contents</a> |
-            <a href="genindex.html">Index</a>
-            | <a href="_sources/usage.txt">view source
-        </li>
-        </ul>
-    </div>
-
-    <div id="docs-navigation-banner">
-        <a href="index.html">Mako 0.7.2 Documentation</a>
-        » 
-                Usage
-             
-
-        <h2>
-            
-                Usage
-            
-        </h2>
-    </div>
-
-</div>
-
-<div id="docs-body-container">
-
-    <div id="docs-sidebar">
-    <h3><a href="index.html">Table of Contents</a></h3>
-    <ul>
-<li><a class="reference internal" href="#">Usage</a><ul>
-<li><a class="reference internal" href="#basic-usage">Basic Usage</a></li>
-<li><a class="reference internal" href="#using-file-based-templates">Using File-Based Templates</a></li>
-<li><a class="reference internal" href="#using-templatelookup">Using <tt class="docutils literal"><span class="pre">TemplateLookup</span></tt></a><ul>
-<li><a class="reference internal" href="#setting-the-collection-size">Setting the Collection Size</a></li>
-<li><a class="reference internal" href="#setting-filesystem-checks">Setting Filesystem Checks</a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#using-unicode-and-encoding">Using Unicode and Encoding</a></li>
-<li><a class="reference internal" href="#handling-exceptions">Handling Exceptions</a></li>
-<li><a class="reference internal" href="#common-framework-integrations">Common Framework Integrations</a><ul>
-<li><a class="reference internal" href="#wsgi">WSGI</a></li>
-<li><a class="reference internal" href="#pygments">Pygments</a></li>
-<li><a class="reference internal" href="#babel">Babel</a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#api-reference">API Reference</a></li>
-</ul>
-</li>
-</ul>
-
-
-    <h4>Previous Topic</h4>
-    <p>
-    <a href="index.html" title="previous chapter">Table of Contents</a>
-    </p>
-    <h4>Next Topic</h4>
-    <p>
-    <a href="syntax.html" title="next chapter">Syntax</a>
-    </p>
-
-    <h4>Quick Search</h4>
-    <p>
-    <form class="search" action="search.html" method="get">
-      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
-      <input type="hidden" name="check_keywords" value="yes" />
-      <input type="hidden" name="area" value="default" />
-    </form>
-    </p>
-
-    </div>
-
-    <div id="docs-body" class="withsidebar" >
-        
-<div class="section" id="usage">
-<span id="usage-toplevel"></span><h1>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h1>
-<div class="section" id="basic-usage">
-<h2>Basic Usage<a class="headerlink" href="#basic-usage" title="Permalink to this headline">¶</a></h2>
-<p>This section describes the Python API for Mako templates. If you
-are using Mako within a web framework such as Pylons, the work
-of integrating Mako’s API is already done for you, in which case
-you can skip to the next section, <a class="reference internal" href="syntax.html"><em>Syntax</em></a>.</p>
-<p>The most basic way to create a template and render it is through
-the <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> class:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
-
-<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"hello world!"</span><span class="p">)</span>
-<span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
-</pre></div>
-</div>
-<p>Above, the text argument to <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> is <strong>compiled</strong> into a
-Python module representation. This module contains a function
-called <tt class="docutils literal"><span class="pre">render_body()</span></tt>, which produces the output of the
-template. When <tt class="docutils literal"><span class="pre">mytemplate.render()</span></tt> is called, Mako sets up a
-runtime environment for the template and calls the
-<tt class="docutils literal"><span class="pre">render_body()</span></tt> function, capturing the output into a buffer and
-returning its string contents.</p>
-<p>The code inside the <tt class="docutils literal"><span class="pre">render_body()</span></tt> function has access to a
-namespace of variables. You can specify these variables by
-sending them as additional keyword arguments to the <a class="reference internal" href="#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a>
-method:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
-
-<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"hello, ${name}!"</span><span class="p">)</span>
-<span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">"jack"</span><span class="p">)</span>
-</pre></div>
-</div>
-<p>The <a class="reference internal" href="#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> method calls upon Mako to create a
-<a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object, which stores all the variable names accessible
-to the template and also stores a buffer used to capture output.
-You can create this <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> yourself and have the template
-render with it, using the <a class="reference internal" href="#mako.template.Template.render_context" title="mako.template.Template.render_context"><tt class="xref py py-meth docutils literal"><span class="pre">render_context()</span></tt></a> method:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
-<span class="kn">from</span> <span class="nn">mako.runtime</span> <span class="kn">import</span> <span class="n">Context</span>
-<span class="kn">from</span> <span class="nn">StringIO</span> <span class="kn">import</span> <span class="n">StringIO</span>
-
-<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"hello, ${name}!"</span><span class="p">)</span>
-<span class="n">buf</span> <span class="o">=</span> <span class="n">StringIO</span><span class="p">()</span>
-<span class="n">ctx</span> <span class="o">=</span> <span class="n">Context</span><span class="p">(</span><span class="n">buf</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s">"jack"</span><span class="p">)</span>
-<span class="n">mytemplate</span><span class="o">.</span><span class="n">render_context</span><span class="p">(</span><span class="n">ctx</span><span class="p">)</span>
-<span class="k">print</span> <span class="n">buf</span><span class="o">.</span><span class="n">getvalue</span><span class="p">()</span>
-</pre></div>
-</div>
-</div>
-<div class="section" id="using-file-based-templates">
-<h2>Using File-Based Templates<a class="headerlink" href="#using-file-based-templates" title="Permalink to this headline">¶</a></h2>
-<p>A <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> can also load its template source code from a file,
-using the <tt class="docutils literal"><span class="pre">filename</span></tt> keyword argument:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
-
-<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="s">'/docs/mytmpl.txt'</span><span class="p">)</span>
-<span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
-</pre></div>
-</div>
-<p>For improved performance, a <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> which is loaded from a
-file can also cache the source code to its generated module on
-the filesystem as a regular Python module file (i.e. a <tt class="docutils literal"><span class="pre">.py</span></tt>
-file). To do this, just add the <tt class="docutils literal"><span class="pre">module_directory</span></tt> argument to
-the template:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
-
-<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="s">'/docs/mytmpl.txt'</span><span class="p">,</span> <span class="n">module_directory</span><span class="o">=</span><span class="s">'/tmp/mako_modules'</span><span class="p">)</span>
-<span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
-</pre></div>
-</div>
-<p>When the above code is rendered, a file
-<tt class="docutils literal"><span class="pre">/tmp/mako_modules/docs/mytmpl.txt.py</span></tt> is created containing the
-source code for the module. The next time a <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> with the
-same arguments is created, this module file will be
-automatically re-used.</p>
-</div>
-<div class="section" id="using-templatelookup">
-<span id="usage-templatelookup"></span><h2>Using <tt class="docutils literal"><span class="pre">TemplateLookup</span></tt><a class="headerlink" href="#using-templatelookup" title="Permalink to this headline">¶</a></h2>
-<p>All of the examples thus far have dealt with the usage of a
-single <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object. If the code within those templates
-tries to locate another template resource, it will need some way
-to find them, using simple URI strings. For this need, the
-resolution of other templates from within a template is
-accomplished by the <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> class. This class is
-constructed given a list of directories in which to search for
-templates, as well as keyword arguments that will be passed to
-the <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> objects it creates:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
-<span class="kn">from</span> <span class="nn">mako.lookup</span> <span class="kn">import</span> <span class="n">TemplateLookup</span>
-
-<span class="n">mylookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/docs'</span><span class="p">])</span>
-<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="s">"""<</span><span class="si">%i</span><span class="s">nclude file="header.txt"/> hello world!"""</span><span class="p">,</span> <span class="n">lookup</span><span class="o">=</span><span class="n">mylookup</span><span class="p">)</span>
-</pre></div>
-</div>
-<p>Above, we created a textual template which includes the file
-<tt class="docutils literal"><span class="pre">"header.txt"</span></tt>. In order for it to have somewhere to look for
-<tt class="docutils literal"><span class="pre">"header.txt"</span></tt>, we passed a <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> object to it, which
-will search in the directory <tt class="docutils literal"><span class="pre">/docs</span></tt> for the file <tt class="docutils literal"><span class="pre">"header.txt"</span></tt>.</p>
-<p>Usually, an application will store most or all of its templates
-as text files on the filesystem. So far, all of our examples
-have been a little bit contrived in order to illustrate the
-basic concepts. But a real application would get most or all of
-its templates directly from the <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>, using the
-aptly named <a class="reference internal" href="#mako.lookup.TemplateLookup.get_template" title="mako.lookup.TemplateLookup.get_template"><tt class="xref py py-meth docutils literal"><span class="pre">get_template()</span></tt></a> method, which accepts the URI of the
-desired template:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
-<span class="kn">from</span> <span class="nn">mako.lookup</span> <span class="kn">import</span> <span class="n">TemplateLookup</span>
-
-<span class="n">mylookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/docs'</span><span class="p">],</span> <span class="n">module_directory</span><span class="o">=</span><span class="s">'/tmp/mako_modules'</span><span class="p">)</span>
-
-<span class="k">def</span> <span class="nf">serve_template</span><span class="p">(</span><span class="n">templatename</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
-    <span class="n">mytemplate</span> <span class="o">=</span> <span class="n">mylookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="n">templatename</span><span class="p">)</span>
-    <span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
-</pre></div>
-</div>
-<p>In the example above, we create a <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> which will
-look for templates in the <tt class="docutils literal"><span class="pre">/docs</span></tt> directory, and will store
-generated module files in the <tt class="docutils literal"><span class="pre">/tmp/mako_modules</span></tt> directory. The
-lookup locates templates by appending the given URI to each of
-its search directories; so if you gave it a URI of
-<tt class="docutils literal"><span class="pre">/etc/beans/info.txt</span></tt>, it would search for the file
-<tt class="docutils literal"><span class="pre">/docs/etc/beans/info.txt</span></tt>, else raise a <tt class="xref py py-class docutils literal"><span class="pre">TopLevelNotFound</span></tt>
-exception, which is a custom Mako exception.</p>
-<p>When the lookup locates templates, it will also assign a <tt class="docutils literal"><span class="pre">uri</span></tt>
-property to the <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> which is the URI passed to the
-<a class="reference internal" href="#mako.lookup.TemplateLookup.get_template" title="mako.lookup.TemplateLookup.get_template"><tt class="xref py py-meth docutils literal"><span class="pre">get_template()</span></tt></a> call. <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> uses this URI to calculate the
-name of its module file. So in the above example, a
-<tt class="docutils literal"><span class="pre">templatename</span></tt> argument of <tt class="docutils literal"><span class="pre">/etc/beans/info.txt</span></tt> will create a
-module file <tt class="docutils literal"><span class="pre">/tmp/mako_modules/etc/beans/info.txt.py</span></tt>.</p>
-<div class="section" id="setting-the-collection-size">
-<h3>Setting the Collection Size<a class="headerlink" href="#setting-the-collection-size" title="Permalink to this headline">¶</a></h3>
-<p>The <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> also serves the important need of caching a
-fixed set of templates in memory at a given time, so that
-successive URI lookups do not result in full template
-compilations and/or module reloads on each request. By default,
-the <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> size is unbounded. You can specify a fixed
-size using the <tt class="docutils literal"><span class="pre">collection_size</span></tt> argument:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">mylookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/docs'</span><span class="p">],</span>
-                <span class="n">module_directory</span><span class="o">=</span><span class="s">'/tmp/mako_modules'</span><span class="p">,</span> <span class="n">collection_size</span><span class="o">=</span><span class="mi">500</span><span class="p">)</span>
-</pre></div>
-</div>
-<p>The above lookup will continue to load templates into memory
-until it reaches a count of around 500. At that point, it will
-clean out a certain percentage of templates using a least
-recently used scheme.</p>
-</div>
-<div class="section" id="setting-filesystem-checks">
-<h3>Setting Filesystem Checks<a class="headerlink" href="#setting-filesystem-checks" title="Permalink to this headline">¶</a></h3>
-<p>Another important flag on <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> is
-<tt class="docutils literal"><span class="pre">filesystem_checks</span></tt>. This defaults to <tt class="docutils literal"><span class="pre">True</span></tt>, and says that each
-time a template is returned by the <a class="reference internal" href="#mako.lookup.TemplateLookup.get_template" title="mako.lookup.TemplateLookup.get_template"><tt class="xref py py-meth docutils literal"><span class="pre">get_template()</span></tt></a> method, the
-revision time of the original template file is checked against
-the last time the template was loaded, and if the file is newer
-will reload its contents and recompile the template. On a
-production system, setting <tt class="docutils literal"><span class="pre">filesystem_checks</span></tt> to <tt class="docutils literal"><span class="pre">False</span></tt> can
-afford a small to moderate performance increase (depending on
-the type of filesystem used).</p>
-</div>
-</div>
-<div class="section" id="using-unicode-and-encoding">
-<span id="usage-unicode"></span><h2>Using Unicode and Encoding<a class="headerlink" href="#using-unicode-and-encoding" title="Permalink to this headline">¶</a></h2>
-<p>Both <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> and <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> accept <tt class="docutils literal"><span class="pre">output_encoding</span></tt>
-and <tt class="docutils literal"><span class="pre">encoding_errors</span></tt> parameters which can be used to encode the
-output in any Python supported codec:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
-<span class="kn">from</span> <span class="nn">mako.lookup</span> <span class="kn">import</span> <span class="n">TemplateLookup</span>
-
-<span class="n">mylookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">(</span><span class="n">directories</span><span class="o">=</span><span class="p">[</span><span class="s">'/docs'</span><span class="p">],</span> <span class="n">output_encoding</span><span class="o">=</span><span class="s">'utf-8'</span><span class="p">,</span> <span class="n">encoding_errors</span><span class="o">=</span><span class="s">'replace'</span><span class="p">)</span>
-
-<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">mylookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="s">"foo.txt"</span><span class="p">)</span>
-<span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
-</pre></div>
-</div>
-<p>When using Python 3, the <a class="reference internal" href="#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> method will return a <tt class="docutils literal"><span class="pre">bytes</span></tt>
-object, <strong>if</strong> <tt class="docutils literal"><span class="pre">output_encoding</span></tt> is set. Otherwise it returns a
-<tt class="docutils literal"><span class="pre">string</span></tt>.</p>
-<p>Additionally, the <a class="reference internal" href="#mako.template.Template.render_unicode" title="mako.template.Template.render_unicode"><tt class="xref py py-meth docutils literal"><span class="pre">render_unicode()</span></tt></a> method exists which will
-return the template output as a Python <tt class="docutils literal"><span class="pre">unicode</span></tt> object, or in
-Python 3 a <tt class="docutils literal"><span class="pre">string</span></tt>:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render_unicode</span><span class="p">()</span>
-</pre></div>
-</div>
-<p>The above method disregards the output encoding keyword
-argument; you can encode yourself by saying:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="k">print</span> <span class="n">mytemplate</span><span class="o">.</span><span class="n">render_unicode</span><span class="p">()</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s">'utf-8'</span><span class="p">,</span> <span class="s">'replace'</span><span class="p">)</span>
-</pre></div>
-</div>
-<p>Note that Mako’s ability to return data in any encoding and/or
-<tt class="docutils literal"><span class="pre">unicode</span></tt> implies that the underlying output stream of the
-template is a Python unicode object. This behavior is described
-fully in <a class="reference internal" href="unicode.html"><em>The Unicode Chapter</em></a>.</p>
-</div>
-<div class="section" id="handling-exceptions">
-<span id="id1"></span><h2>Handling Exceptions<a class="headerlink" href="#handling-exceptions" title="Permalink to this headline">¶</a></h2>
-<p>Template exceptions can occur in two distinct places. One is
-when you <strong>lookup, parse and compile</strong> the template, the other
-is when you <strong>run</strong> the template. Within the running of a
-template, exceptions are thrown normally from whatever Python
-code originated the issue. Mako has its own set of exception
-classes which mostly apply to the lookup and lexer/compiler
-stages of template construction. Mako provides some library
-routines that can be used to help provide Mako-specific
-information about any exception’s stack trace, as well as
-formatting the exception within textual or HTML format. In all
-cases, the main value of these handlers is that of converting
-Python filenames, line numbers, and code samples into Mako
-template filenames, line numbers, and code samples. All lines
-within a stack trace which correspond to a Mako template module
-will be converted to be against the originating template file.</p>
-<p>To format exception traces, the <a class="reference internal" href="#mako.exceptions.text_error_template" title="mako.exceptions.text_error_template"><tt class="xref py py-func docutils literal"><span class="pre">text_error_template()</span></tt></a> and
-<a class="reference internal" href="#mako.exceptions.html_error_template" title="mako.exceptions.html_error_template"><tt class="xref py py-func docutils literal"><span class="pre">html_error_template()</span></tt></a> functions are provided. They make usage of
-<tt class="docutils literal"><span class="pre">sys.exc_info()</span></tt> to get at the most recently thrown exception.
-Usage of these handlers usually looks like:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako</span> <span class="kn">import</span> <span class="n">exceptions</span>
-
-<span class="k">try</span><span class="p">:</span>
-    <span class="n">template</span> <span class="o">=</span> <span class="n">lookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="n">uri</span><span class="p">)</span>
-    <span class="k">print</span> <span class="n">template</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
-<span class="k">except</span><span class="p">:</span>
-    <span class="k">print</span> <span class="n">exceptions</span><span class="o">.</span><span class="n">text_error_template</span><span class="p">()</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
-</pre></div>
-</div>
-<p>Or for the HTML render function:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako</span> <span class="kn">import</span> <span class="n">exceptions</span>
-
-<span class="k">try</span><span class="p">:</span>
-    <span class="n">template</span> <span class="o">=</span> <span class="n">lookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="n">uri</span><span class="p">)</span>
-    <span class="k">print</span> <span class="n">template</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
-<span class="k">except</span><span class="p">:</span>
-    <span class="k">print</span> <span class="n">exceptions</span><span class="o">.</span><span class="n">html_error_template</span><span class="p">()</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
-</pre></div>
-</div>
-<p>The <a class="reference internal" href="#mako.exceptions.html_error_template" title="mako.exceptions.html_error_template"><tt class="xref py py-func docutils literal"><span class="pre">html_error_template()</span></tt></a> template accepts two options:
-specifying <tt class="docutils literal"><span class="pre">full=False</span></tt> causes only a section of an HTML
-document to be rendered. Specifying <tt class="docutils literal"><span class="pre">css=False</span></tt> will disable the
-default stylesheet from being rendered.</p>
-<p>E.g.:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="k">print</span> <span class="n">exceptions</span><span class="o">.</span><span class="n">html_error_template</span><span class="p">()</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="n">full</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
-</pre></div>
-</div>
-<p>The HTML render function is also available built-in to
-<a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> using the <tt class="docutils literal"><span class="pre">format_exceptions</span></tt> flag. In this case, any
-exceptions raised within the <strong>render</strong> stage of the template
-will result in the output being substituted with the output of
-<a class="reference internal" href="#mako.exceptions.html_error_template" title="mako.exceptions.html_error_template"><tt class="xref py py-func docutils literal"><span class="pre">html_error_template()</span></tt></a>:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">template</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="s">"/foo/bar"</span><span class="p">,</span> <span class="n">format_exceptions</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
-<span class="k">print</span> <span class="n">template</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
-</pre></div>
-</div>
-<p>Note that the compile stage of the above template occurs when
-you construct the <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> itself, and no output stream is
-defined. Therefore exceptions which occur within the
-lookup/parse/compile stage will not be handled and will
-propagate normally. While the pre-render traceback usually will
-not include any Mako-specific lines anyway, it will mean that
-exceptions which occur previous to rendering and those which
-occur within rendering will be handled differently... so the
-<tt class="docutils literal"><span class="pre">try</span></tt>/<tt class="docutils literal"><span class="pre">except</span></tt> patterns described previously are probably of more
-general use.</p>
-<p>The underlying object used by the error template functions is
-the <a class="reference internal" href="#mako.exceptions.RichTraceback" title="mako.exceptions.RichTraceback"><tt class="xref py py-class docutils literal"><span class="pre">RichTraceback</span></tt></a> object. This object can also be used
-directly to provide custom error views. Here’s an example usage
-which describes its general API:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">mako.exceptions</span> <span class="kn">import</span> <span class="n">RichTraceback</span>
-
-<span class="k">try</span><span class="p">:</span>
-    <span class="n">template</span> <span class="o">=</span> <span class="n">lookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="n">uri</span><span class="p">)</span>
-    <span class="k">print</span> <span class="n">template</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
-<span class="k">except</span><span class="p">:</span>
-    <span class="n">traceback</span> <span class="o">=</span> <span class="n">RichTraceback</span><span class="p">()</span>
-    <span class="k">for</span> <span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">lineno</span><span class="p">,</span> <span class="n">function</span><span class="p">,</span> <span class="n">line</span><span class="p">)</span> <span class="ow">in</span> <span class="n">traceback</span><span class="o">.</span><span class="n">traceback</span><span class="p">:</span>
-        <span class="k">print</span> <span class="s">"File </span><span class="si">%s</span><span class="s">, line </span><span class="si">%s</span><span class="s">, in </span><span class="si">%s</span><span class="s">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">lineno</span><span class="p">,</span> <span class="n">function</span><span class="p">)</span>
-        <span class="k">print</span> <span class="n">line</span><span class="p">,</span> <span class="s">"</span><span class="se">\n</span><span class="s">"</span>
-    <span class="k">print</span> <span class="s">"</span><span class="si">%s</span><span class="s">: </span><span class="si">%s</span><span class="s">"</span> <span class="o">%</span> <span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">traceback</span><span class="o">.</span><span class="n">error</span><span class="o">.</span><span class="n">__class__</span><span class="o">.</span><span class="n">__name__</span><span class="p">),</span> <span class="n">traceback</span><span class="o">.</span><span class="n">error</span><span class="p">)</span>
-</pre></div>
-</div>
-</div>
-<div class="section" id="common-framework-integrations">
-<h2>Common Framework Integrations<a class="headerlink" href="#common-framework-integrations" title="Permalink to this headline">¶</a></h2>
-<p>The Mako distribution includes a little bit of helper code for
-the purpose of using Mako in some popular web framework
-scenarios. This is a brief description of what’s included.</p>
-<div class="section" id="wsgi">
-<h3>WSGI<a class="headerlink" href="#wsgi" title="Permalink to this headline">¶</a></h3>
-<p>A sample WSGI application is included in the distribution in the
-file <tt class="docutils literal"><span class="pre">examples/wsgi/run_wsgi.py</span></tt>. This runner is set up to pull
-files from a <cite>templates</cite> as well as an <cite>htdocs</cite> directory and
-includes a rudimental two-file layout. The WSGI runner acts as a
-fully functional standalone web server, using <tt class="docutils literal"><span class="pre">wsgiutils</span></tt> to run
-itself, and propagates GET and POST arguments from the request
-into the <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>, can serve images, CSS files and other kinds
-of files, and also displays errors using Mako’s included
-exception-handling utilities.</p>
-</div>
-<div class="section" id="pygments">
-<h3>Pygments<a class="headerlink" href="#pygments" title="Permalink to this headline">¶</a></h3>
-<p>A <a class="reference external" href="http://pygments.pocoo.org">Pygments</a>-compatible syntax
-highlighting module is included under <tt class="xref py py-mod docutils literal"><span class="pre">mako.ext.pygmentplugin</span></tt>.
-This module is used in the generation of Mako documentation and
-also contains various <cite>setuptools</cite> entry points under the heading
-<tt class="docutils literal"><span class="pre">pygments.lexers</span></tt>, including <tt class="docutils literal"><span class="pre">mako</span></tt>, <tt class="docutils literal"><span class="pre">html+mako</span></tt>, <tt class="docutils literal"><span class="pre">xml+mako</span></tt>
-(see the <tt class="docutils literal"><span class="pre">setup.py</span></tt> file for all the entry points).</p>
-</div>
-<div class="section" id="babel">
-<h3>Babel<a class="headerlink" href="#babel" title="Permalink to this headline">¶</a></h3>
-<p>Mako provides support for extracting <cite>gettext</cite> messages from
-templates via a <a class="reference external" href="http://babel.edgewall.org/">Babel</a> extractor
-entry point under <tt class="docutils literal"><span class="pre">mako.ext.babelplugin</span></tt>.</p>
-<p><cite>Gettext</cite> messages are extracted from all Python code sections,
-including those of control lines and expressions embedded
-in tags.</p>
-<p><a class="reference external" href="http://babel.edgewall.org/wiki/Documentation/messages.html#comments-tags-and-translator-comments-explanation">Translator
-comments</a>
-may also be extracted from Mako templates when a comment tag is
-specified to <a class="reference external" href="http://babel.edgewall.org/">Babel</a> (such as with
-the <tt class="docutils literal"><span class="pre">-c</span></tt> option).</p>
-<p>For example, a project <tt class="docutils literal"><span class="pre">"myproj"</span></tt> contains the following Mako
-template at <tt class="docutils literal"><span class="pre">myproj/myproj/templates/name.html</span></tt>:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><div id="name"></span>
-<span class="x">  Name:</span>
-<span class="x">  ## TRANSLATORS: This is a proper name. See the gettext</span>
-<span class="x">  ## manual, section Names.</span>
-<span class="x">  </span><span class="cp">${</span><span class="n">_</span><span class="p">(</span><span class="s">'Francois Pinard'</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-<span class="x"></div></span>
-</pre></div>
-</div>
-<p>To extract gettext messages from this template the project needs
-a Mako section in its <a class="reference external" href="http://babel.edgewall.org/wiki/Documentation/messages.html#extraction-method-mapping-and-configuration">Babel Extraction Method Mapping
-file</a>
-(typically located at <tt class="docutils literal"><span class="pre">myproj/babel.cfg</span></tt>):</p>
-<div class="highlight-cfg"><div class="highlight"><pre><span class="c"># Extraction from Python source files</span>
-
-<span class="k">[python: myproj/**.py]</span>
-
-<span class="c"># Extraction from Mako templates</span>
-
-<span class="k">[mako: myproj/templates/**.html]</span>
-<span class="na">input_encoding</span> <span class="o">=</span> <span class="s">utf-8</span>
-</pre></div>
-</div>
-<p>The Mako extractor supports an optional <tt class="docutils literal"><span class="pre">input_encoding</span></tt>
-parameter specifying the encoding of the templates (identical to
-<a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>/<a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>‘s <tt class="docutils literal"><span class="pre">input_encoding</span></tt> parameter).</p>
-<p>Invoking <a class="reference external" href="http://babel.edgewall.org/">Babel</a>‘s extractor at the
-command line in the project’s root directory:</p>
-<div class="highlight-sh"><div class="highlight"><pre>myproj<span class="nv">$ </span>pybabel extract -F babel.cfg -c <span class="s2">"TRANSLATORS:"</span> .
-</pre></div>
-</div>
-<p>will output a <cite>gettext</cite> catalog to <cite>stdout</cite> including the following:</p>
-<div class="highlight-pot"><div class="highlight"><pre><span class="c1">#. TRANSLATORS: This is a proper name. See the gettext</span>
-<span class="c1">#. manual, section Names.</span>
-<span class="kd">#: myproj/templates/name.html:5</span>
-<span class="nv">msgid</span> <span class="s">"Francois Pinard"</span>
-<span class="nv">msgstr</span> <span class="s">""</span>
-</pre></div>
-</div>
-<p>This is only a basic example:
-<a class="reference external" href="http://babel.edgewall.org/">Babel</a> can be invoked from <tt class="docutils literal"><span class="pre">setup.py</span></tt>
-and its command line options specified in the accompanying
-<tt class="docutils literal"><span class="pre">setup.cfg</span></tt> via <a class="reference external" href="http://babel.edgewall.org/wiki/Documentation/setup.html">Babel Distutils/Setuptools
-Integration</a>.</p>
-<p>Comments must immediately precede a <cite>gettext</cite> message to be
-extracted. In the following case the <tt class="docutils literal"><span class="pre">TRANSLATORS:</span></tt> comment would
-not have been extracted:</p>
-<div class="highlight-mako"><div class="highlight"><pre><span class="x"><div id="name"></span>
-<span class="x">  ## TRANSLATORS: This is a proper name. See the gettext</span>
-<span class="x">  ## manual, section Names.</span>
-<span class="x">  Name: </span><span class="cp">${</span><span class="n">_</span><span class="p">(</span><span class="s">'Francois Pinard'</span><span class="p">)</span><span class="cp">}</span><span class="x"></span>
-<span class="x"></div></span>
-</pre></div>
-</div>
-<p>See the <a class="reference external" href="http://babel.edgewall.org/wiki/Documentation/index.html">Babel User
-Guide</a>
-for more information.</p>
-</div>
-</div>
-<div class="section" id="api-reference">
-<h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h2>
-<dl class="class">
-<dt id="mako.template.Template">
-<em class="property">class </em><tt class="descclassname">mako.template.</tt><tt class="descname">Template</tt><big>(</big><em>text=None</em>, <em>filename=None</em>, <em>uri=None</em>, <em>format_exceptions=False</em>, <em>error_handler=None</em>, <em>lookup=None</em>, <em>output_encoding=None</em>, <em>encoding_errors='strict'</em>, <em>module_directory=None</em>, <em>cache_args=None</em>, <em>cache_impl='beaker'</em>, <em>cache_enabled=True</em>, <em>cache_type=None</em>, <em>cache_dir=None</em>, <em>cache_url=None</em>, <em>module_filename=None</em>, <em>input_encoding=None</em>, <em>disable_unicode=False</em>, <em>module_writer=None</em>, <em>bytestring_passthrough=False</em>, <em>default_filters=None</em>, <em>buffer_filters=()</em>, <em>strict_undefined=False</em>, <em>imports=None</em>, <em>enable_loop=True</em>, <em>preprocessor=None</em><big>)</big><a class="headerlink" href="#mako.template.Template" title="Permalink to this definition">¶</a></dt>
-<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
-<p>Represents a compiled template.</p>
-<p><a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> includes a reference to the original
-template source (via the <a class="reference internal" href="#RichTraceback.source" title="RichTraceback.source"><tt class="xref py py-attr docutils literal"><span class="pre">source</span></tt></a> attribute)
-as well as the source code of the
-generated Python module (i.e. the <a class="reference internal" href="#mako.template.Template.code" title="mako.template.Template.code"><tt class="xref py py-attr docutils literal"><span class="pre">code</span></tt></a> attribute),
-as well as a reference to an actual Python module.</p>
-<p><a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> is constructed using either a literal string
-representing the template text, or a filename representing a filesystem
-path to a source file.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>text</strong> – textual template source.  This argument is mutually
-exclusive versus the <tt class="docutils literal"><span class="pre">filename</span></tt> parameter.</li>
-<li><strong>filename</strong> – filename of the source template.  This argument is
-mutually exclusive versus the <tt class="docutils literal"><span class="pre">text</span></tt> parameter.</li>
-<li><strong>buffer_filters</strong> – string list of filters to be applied
-to the output of <tt class="docutils literal"><span class="pre">%def</span></tt>s which are buffered, cached, or otherwise
-filtered, after all filters
-defined with the <tt class="docutils literal"><span class="pre">%def</span></tt> itself have been applied. Allows the
-creation of default expression filters that let the output
-of return-valued <tt class="docutils literal"><span class="pre">%def</span></tt>s “opt out” of that filtering via
-passing special attributes or objects.</li>
-<li><strong>bytestring_passthrough</strong> – <p>When <tt class="docutils literal"><span class="pre">True</span></tt>, and <tt class="docutils literal"><span class="pre">output_encoding</span></tt> is
-set to <tt class="docutils literal"><span class="pre">None</span></tt>, and <a class="reference internal" href="#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">Template.render()</span></tt></a> is used to render,
-the <cite>StringIO</cite> or <cite>cStringIO</cite> buffer will be used instead of the
-default “fast” buffer.   This allows raw bytestrings in the
-output stream, such as in expressions, to pass straight
-through to the buffer.  This flag is forced
-to <tt class="docutils literal"><span class="pre">True</span></tt> if <tt class="docutils literal"><span class="pre">disable_unicode</span></tt> is also configured.</p>
-<p class="versionadded">
-<span class="versionmodified">New in version 0.4: </span>Added to provide the same behavior as that of the previous series.</p>
-</li>
-<li><strong>cache_args</strong> – Dictionary of cache configuration arguments that
-will be passed to the <a class="reference internal" href="caching.html#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a>.   See <a class="reference internal" href="caching.html"><em>Caching</em></a>.</li>
-<li><strong>cache_dir</strong> – <p class="deprecated">
-<span class="versionmodified">Deprecated since version 0.6: </span>Use the <tt class="docutils literal"><span class="pre">'dir'</span></tt> argument in the <tt class="docutils literal"><span class="pre">cache_args</span></tt> dictionary.
-See <a class="reference internal" href="caching.html"><em>Caching</em></a>.</p>
-</li>
-<li><strong>cache_enabled</strong> – Boolean flag which enables caching of this
-template.  See <a class="reference internal" href="caching.html"><em>Caching</em></a>.</li>
-<li><strong>cache_impl</strong> – String name of a <a class="reference internal" href="caching.html#mako.cache.CacheImpl" title="mako.cache.CacheImpl"><tt class="xref py py-class docutils literal"><span class="pre">CacheImpl</span></tt></a> caching
-implementation to use.   Defaults to <tt class="docutils literal"><span class="pre">'beaker'</span></tt>.</li>
-<li><strong>cache_type</strong> – <p class="deprecated">
-<span class="versionmodified">Deprecated since version 0.6: </span>Use the <tt class="docutils literal"><span class="pre">'type'</span></tt> argument in the <tt class="docutils literal"><span class="pre">cache_args</span></tt> dictionary.
-See <a class="reference internal" href="caching.html"><em>Caching</em></a>.</p>
-</li>
-<li><strong>cache_url</strong> – <p class="deprecated">
-<span class="versionmodified">Deprecated since version 0.6: </span>Use the <tt class="docutils literal"><span class="pre">'url'</span></tt> argument in the <tt class="docutils literal"><span class="pre">cache_args</span></tt> dictionary.
-See <a class="reference internal" href="caching.html"><em>Caching</em></a>.</p>
-</li>
-<li><strong>default_filters</strong> – List of string filter names that will
-be applied to all expressions.  See <a class="reference internal" href="filtering.html#filtering-default-filters"><em>The default_filters Argument</em></a>.</li>
-<li><strong>disable_unicode</strong> – Disables all awareness of Python Unicode
-objects.  See <a class="reference internal" href="unicode.html#unicode-disabled"><em>Saying to Heck with It: Disabling the Usage of Unicode Entirely</em></a>.</li>
-<li><strong>enable_loop</strong> – When <tt class="docutils literal"><span class="pre">True</span></tt>, enable the <tt class="docutils literal"><span class="pre">loop</span></tt> context variable.
-This can be set to <tt class="docutils literal"><span class="pre">False</span></tt> to support templates that may
-be making usage of the name “<tt class="docutils literal"><span class="pre">loop</span></tt>”.   Individual templates can
-re-enable the “loop” context by placing the directive
-<tt class="docutils literal"><span class="pre">enable_loop="True"</span></tt> inside the <tt class="docutils literal"><span class="pre"><%page></span></tt> tag – see
-<a class="reference internal" href="runtime.html#migrating-loop"><em>Migrating Legacy Templates that Use the Word “loop”</em></a>.</li>
-<li><strong>encoding_errors</strong> – Error parameter passed to <tt class="docutils literal"><span class="pre">encode()</span></tt> when
-string encoding is performed. See <a class="reference internal" href="#usage-unicode"><em>Using Unicode and Encoding</em></a>.</li>
-<li><strong>error_handler</strong> – Python callable which is called whenever
-compile or runtime exceptions occur. The callable is passed
-the current context as well as the exception. If the
-callable returns <tt class="docutils literal"><span class="pre">True</span></tt>, the exception is considered to
-be handled, else it is re-raised after the function
-completes. Is used to provide custom error-rendering
-functions.</li>
-<li><strong>format_exceptions</strong> – if <tt class="docutils literal"><span class="pre">True</span></tt>, exceptions which occur during
-the render phase of this template will be caught and
-formatted into an HTML error page, which then becomes the
-rendered result of the <a class="reference internal" href="#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a> call. Otherwise,
-runtime exceptions are propagated outwards.</li>
-<li><strong>imports</strong> – String list of Python statements, typically individual
-“import” lines, which will be placed into the module level
-preamble of all generated Python modules. See the example
-in <a class="reference internal" href="filtering.html#filtering-default-filters"><em>The default_filters Argument</em></a>.</li>
-<li><strong>input_encoding</strong> – Encoding of the template’s source code.  Can
-be used in lieu of the coding comment. See
-<a class="reference internal" href="#usage-unicode"><em>Using Unicode and Encoding</em></a> as well as <a class="reference internal" href="unicode.html"><em>The Unicode Chapter</em></a> for
-details on source encoding.</li>
-<li><strong>lookup</strong> – a <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> instance that will be used
-for all file lookups via the <tt class="docutils literal"><span class="pre"><%namespace></span></tt>,
-<tt class="docutils literal"><span class="pre"><%include></span></tt>, and <tt class="docutils literal"><span class="pre"><%inherit></span></tt> tags. See
-<a class="reference internal" href="#usage-templatelookup"><em>Using TemplateLookup</em></a>.</li>
-<li><strong>module_directory</strong> – Filesystem location where generated
-Python module files will be placed.</li>
-<li><strong>module_filename</strong> – Overrides the filename of the generated
-Python module file. For advanced usage only.</li>
-<li><strong>module_writer</strong> – <p>A callable which overrides how the Python
-module is written entirely.  The callable is passed the
-encoded source content of the module and the destination
-path to be written to.   The default behavior of module writing
-uses a tempfile in conjunction with a file move in order
-to make the operation atomic.   So a user-defined module
-writing function that mimics the default behavior would be:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">tempfile</span>
-<span class="kn">import</span> <span class="nn">os</span>
-<span class="kn">import</span> <span class="nn">shutil</span>
-
-<span class="k">def</span> <span class="nf">module_writer</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">outputpath</span><span class="p">):</span>
-    <span class="p">(</span><span class="n">dest</span><span class="p">,</span> <span class="n">name</span><span class="p">)</span> <span class="o">=</span> \
-        <span class="n">tempfile</span><span class="o">.</span><span class="n">mkstemp</span><span class="p">(</span>
-            <span class="nb">dir</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">outputpath</span><span class="p">)</span>
-        <span class="p">)</span>
-
-    <span class="n">os</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">dest</span><span class="p">,</span> <span class="n">source</span><span class="p">)</span>
-    <span class="n">os</span><span class="o">.</span><span class="n">close</span><span class="p">(</span><span class="n">dest</span><span class="p">)</span>
-    <span class="n">shutil</span><span class="o">.</span><span class="n">move</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">outputpath</span><span class="p">)</span>
-
-<span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
-<span class="n">mytemplate</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span>
-                <span class="nb">file</span><span class="o">=</span><span class="s">"index.html"</span><span class="p">,</span>
-                <span class="n">module_directory</span><span class="o">=</span><span class="s">"/path/to/modules"</span><span class="p">,</span>
-                <span class="n">module_writer</span><span class="o">=</span><span class="n">module_writer</span>
-            <span class="p">)</span>
-</pre></div>
-</div>
-<p>The function is provided for unusual configurations where
-certain platform-specific permissions or other special
-steps are needed.</p>
-</li>
-<li><strong>output_encoding</strong> – The encoding to use when <a class="reference internal" href="#mako.template.Template.render" title="mako.template.Template.render"><tt class="xref py py-meth docutils literal"><span class="pre">render()</span></tt></a>
-is called.
-See <a class="reference internal" href="#usage-unicode"><em>Using Unicode and Encoding</em></a> as well as <a class="reference internal" href="unicode.html"><em>The Unicode Chapter</em></a>.</li>
-<li><strong>preprocessor</strong> – Python callable which will be passed
-the full template source before it is parsed. The return
-result of the callable will be used as the template source
-code.</li>
-<li><strong>strict_undefined</strong> – <p>Replaces the automatic usage of
-<tt class="docutils literal"><span class="pre">UNDEFINED</span></tt> for any undeclared variables not located in
-the <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> with an immediate raise of
-<tt class="docutils literal"><span class="pre">NameError</span></tt>. The advantage is immediate reporting of
-missing variables which include the name.</p>
-<p class="versionadded">
-<span class="versionmodified">New in version 0.3.6.</span></p>
-</li>
-<li><strong>uri</strong> – string URI or other identifier for this template.
-If not provided, the <tt class="docutils literal"><span class="pre">uri</span></tt> is generated from the filesystem
-path, or from the in-memory identity of a non-file-based
-template. The primary usage of the <tt class="docutils literal"><span class="pre">uri</span></tt> is to provide a key
-within <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>, as well as to generate the
-file path of the generated Python module file, if
-<tt class="docutils literal"><span class="pre">module_directory</span></tt> is specified.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-<dl class="attribute">
-<dt id="mako.template.Template.code">
-<tt class="descname">code</tt><a class="headerlink" href="#mako.template.Template.code" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return the module source code for this <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.template.Template.get_def">
-<tt class="descname">get_def</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#mako.template.Template.get_def" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return a def of this template as a <a class="reference internal" href="#mako.template.DefTemplate" title="mako.template.DefTemplate"><tt class="xref py py-class docutils literal"><span class="pre">DefTemplate</span></tt></a>.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.template.Template.render">
-<tt class="descname">render</tt><big>(</big><em>*args</em>, <em>**data</em><big>)</big><a class="headerlink" href="#mako.template.Template.render" title="Permalink to this definition">¶</a></dt>
-<dd><p>Render the output of this template as a string.</p>
-<p>If the template specifies an output encoding, the string
-will be encoded accordingly, else the output is raw (raw
-output uses <cite>cStringIO</cite> and can’t handle multibyte
-characters). A <a class="reference internal" href="runtime.html#mako.runtime.Context" title="mako.runtime.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object is created corresponding
-to the given data. Arguments that are explicitly declared
-by this template’s internal rendering method are also
-pulled from the given <tt class="docutils literal"><span class="pre">*args</span></tt>, <tt class="docutils literal"><span class="pre">**data</span></tt> members.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.template.Template.render_context">
-<tt class="descname">render_context</tt><big>(</big><em>context</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mako.template.Template.render_context" title="Permalink to this definition">¶</a></dt>
-<dd><p>Render this <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> with the given context.</p>
-<p>The data is written to the context’s buffer.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.template.Template.render_unicode">
-<tt class="descname">render_unicode</tt><big>(</big><em>*args</em>, <em>**data</em><big>)</big><a class="headerlink" href="#mako.template.Template.render_unicode" title="Permalink to this definition">¶</a></dt>
-<dd><p>Render the output of this template as a unicode object.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="mako.template.Template.source">
-<tt class="descname">source</tt><a class="headerlink" href="#mako.template.Template.source" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return the template source code for this <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>.</p>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="class">
-<dt id="mako.template.DefTemplate">
-<em class="property">class </em><tt class="descclassname">mako.template.</tt><tt class="descname">DefTemplate</tt><big>(</big><em>parent</em>, <em>callable_</em><big>)</big><a class="headerlink" href="#mako.template.DefTemplate" title="Permalink to this definition">¶</a></dt>
-<dd><p>Bases: <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">mako.template.Template</span></tt></a></p>
-<p>A <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> which represents a callable def in a parent
-template.</p>
-</dd></dl>
-
-<dl class="class">
-<dt id="mako.lookup.TemplateCollection">
-<em class="property">class </em><tt class="descclassname">mako.lookup.</tt><tt class="descname">TemplateCollection</tt><a class="headerlink" href="#mako.lookup.TemplateCollection" title="Permalink to this definition">¶</a></dt>
-<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
-<p>Represent a collection of <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> objects,
-identifiable via URI.</p>
-<p>A <a class="reference internal" href="#mako.lookup.TemplateCollection" title="mako.lookup.TemplateCollection"><tt class="xref py py-class docutils literal"><span class="pre">TemplateCollection</span></tt></a> is linked to the usage of
-all template tags that address other templates, such
-as <tt class="docutils literal"><span class="pre"><%include></span></tt>, <tt class="docutils literal"><span class="pre"><%namespace></span></tt>, and <tt class="docutils literal"><span class="pre"><%inherit></span></tt>.
-The <tt class="docutils literal"><span class="pre">file</span></tt> attribute of each of those tags refers
-to a string URI that is passed to that <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>
-object’s <a class="reference internal" href="#mako.lookup.TemplateCollection" title="mako.lookup.TemplateCollection"><tt class="xref py py-class docutils literal"><span class="pre">TemplateCollection</span></tt></a> for resolution.</p>
-<p><a class="reference internal" href="#mako.lookup.TemplateCollection" title="mako.lookup.TemplateCollection"><tt class="xref py py-class docutils literal"><span class="pre">TemplateCollection</span></tt></a> is an abstract class,
-with the usual default implementation being <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>.</p>
-<dl class="method">
-<dt id="mako.lookup.TemplateCollection.adjust_uri">
-<tt class="descname">adjust_uri</tt><big>(</big><em>uri</em>, <em>filename</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateCollection.adjust_uri" title="Permalink to this definition">¶</a></dt>
-<dd><p>Adjust the given <tt class="docutils literal"><span class="pre">uri</span></tt> based on the calling <tt class="docutils literal"><span class="pre">filename</span></tt>.</p>
-<p>When this method is called from the runtime, the
-<tt class="docutils literal"><span class="pre">filename</span></tt> parameter is taken directly to the <tt class="docutils literal"><span class="pre">filename</span></tt>
-attribute of the calling template. Therefore a custom
-<a class="reference internal" href="#mako.lookup.TemplateCollection" title="mako.lookup.TemplateCollection"><tt class="xref py py-class docutils literal"><span class="pre">TemplateCollection</span></tt></a> subclass can place any string
-identifier desired in the <tt class="docutils literal"><span class="pre">filename</span></tt> parameter of the
-<a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> objects it constructs and have them come back
-here.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.lookup.TemplateCollection.filename_to_uri">
-<tt class="descname">filename_to_uri</tt><big>(</big><em>uri</em>, <em>filename</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateCollection.filename_to_uri" title="Permalink to this definition">¶</a></dt>
-<dd><p>Convert the given <tt class="docutils literal"><span class="pre">filename</span></tt> to a URI relative to
-this <a class="reference internal" href="#mako.lookup.TemplateCollection" title="mako.lookup.TemplateCollection"><tt class="xref py py-class docutils literal"><span class="pre">TemplateCollection</span></tt></a>.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.lookup.TemplateCollection.get_template">
-<tt class="descname">get_template</tt><big>(</big><em>uri</em>, <em>relativeto=None</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateCollection.get_template" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return a <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object corresponding to the given
-<tt class="docutils literal"><span class="pre">uri</span></tt>.</p>
-<p>The default implementation raises
-<tt class="xref py py-class docutils literal"><span class="pre">NotImplementedError</span></tt>. Implementations should
-raise <tt class="xref py py-class docutils literal"><span class="pre">TemplateLookupException</span></tt> if the given <tt class="docutils literal"><span class="pre">uri</span></tt>
-cannot be resolved.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>uri</strong> – String URI of the template to be resolved.</li>
-<li><strong>relativeto</strong> – if present, the given <tt class="docutils literal"><span class="pre">uri</span></tt> is assumed to
-be relative to this URI.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.lookup.TemplateCollection.has_template">
-<tt class="descname">has_template</tt><big>(</big><em>uri</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateCollection.has_template" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return <tt class="docutils literal"><span class="pre">True</span></tt> if this <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> is
-capable of returning a <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object for the
-given <tt class="docutils literal"><span class="pre">uri</span></tt>.</p>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>uri</strong> – String URI of the template to be resolved.</td>
-</tr>
-</tbody>
-</table>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="class">
-<dt id="mako.lookup.TemplateLookup">
-<em class="property">class </em><tt class="descclassname">mako.lookup.</tt><tt class="descname">TemplateLookup</tt><big>(</big><em>directories=None</em>, <em>module_directory=None</em>, <em>filesystem_checks=True</em>, <em>collection_size=-1</em>, <em>format_exceptions=False</em>, <em>error_handler=None</em>, <em>disable_unicode=False</em>, <em>bytestring_passthrough=False</em>, <em>output_encoding=None</em>, <em>encoding_errors='strict'</em>, <em>cache_args=None</em>, <em>cache_impl='beaker'</em>, <em>cache_enabled=True</em>, <em>cache_type=None</em>, <em>cache_dir=None</em>, <em>cache_url=None</em>, <em>modulename_callable=None</em>, <em>module_writer=None</em>, <em>default_filters=None</em>, <em>buffer_filters=()</em>, <em>strict_undefined=False</em>, <em>imports=None</em>, <em>enable_loop=True</em>, <em>input_encoding=None</em>, <em>preprocessor=None</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateLookup" title="Permalink to this definition">¶</a></dt>
-<dd><p>Bases: <a class="reference internal" href="#mako.lookup.TemplateCollection" title="mako.lookup.TemplateCollection"><tt class="xref py py-class docutils literal"><span class="pre">mako.lookup.TemplateCollection</span></tt></a></p>
-<p>Represent a collection of templates that locates template source files
-from the local filesystem.</p>
-<p>The primary argument is the <tt class="docutils literal"><span class="pre">directories</span></tt> argument, the list of
-directories to search:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">lookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">([</span><span class="s">"/path/to/templates"</span><span class="p">])</span>
-<span class="n">some_template</span> <span class="o">=</span> <span class="n">lookup</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="s">"/index.html"</span><span class="p">)</span>
-</pre></div>
-</div>
-<p>The <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> can also be given <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> objects
-programatically using <a class="reference internal" href="#mako.lookup.TemplateLookup.put_string" title="mako.lookup.TemplateLookup.put_string"><tt class="xref py py-meth docutils literal"><span class="pre">put_string()</span></tt></a> or <a class="reference internal" href="#mako.lookup.TemplateLookup.put_template" title="mako.lookup.TemplateLookup.put_template"><tt class="xref py py-meth docutils literal"><span class="pre">put_template()</span></tt></a>:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">lookup</span> <span class="o">=</span> <span class="n">TemplateLookup</span><span class="p">()</span>
-<span class="n">lookup</span><span class="o">.</span><span class="n">put_string</span><span class="p">(</span><span class="s">"base.html"</span><span class="p">,</span> <span class="s">'''</span>
-<span class="s">    <html><body>${self.next()}</body></html></span>
-<span class="s">'''</span><span class="p">)</span>
-<span class="n">lookup</span><span class="o">.</span><span class="n">put_string</span><span class="p">(</span><span class="s">"hello.html"</span><span class="p">,</span> <span class="s">'''</span>
-<span class="s">    <</span><span class="si">%i</span><span class="s">nclude file='base.html'/></span>
-
-<span class="s">    Hello, world !</span>
-<span class="s">'''</span><span class="p">)</span>
-</pre></div>
-</div>
-<table class="docutils field-list" frame="void" rules="none">
-<col class="field-name" />
-<col class="field-body" />
-<tbody valign="top">
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
-<li><strong>directories</strong> – A list of directory names which will be
-searched for a particular template URI. The URI is appended
-to each directory and the filesystem checked.</li>
-<li><strong>collection_size</strong> – Approximate size of the collection used
-to store templates. If left at its default of <tt class="docutils literal"><span class="pre">-1</span></tt>, the size
-is unbounded, and a plain Python dictionary is used to
-relate URI strings to <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> instances.
-Otherwise, a least-recently-used cache object is used which
-will maintain the size of the collection approximately to
-the number given.</li>
-<li><strong>filesystem_checks</strong> – When at its default value of <tt class="docutils literal"><span class="pre">True</span></tt>,
-each call to <a class="reference internal" href="#mako.lookup.TemplateLookup.get_template" title="mako.lookup.TemplateLookup.get_template"><tt class="xref py py-meth docutils literal"><span class="pre">TemplateLookup.get_template()</span></tt></a> will
-compare the filesystem last modified time to the time in
-which an existing <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object was created.
-This allows the <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> to regenerate a
-new <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> whenever the original source has
-been updated. Set this to <tt class="docutils literal"><span class="pre">False</span></tt> for a very minor
-performance increase.</li>
-<li><strong>modulename_callable</strong> – A callable which, when present,
-is passed the path of the source file as well as the
-requested URI, and then returns the full path of the
-generated Python module file. This is used to inject
-alternate schemes for Python module location. If left at
-its default of <tt class="docutils literal"><span class="pre">None</span></tt>, the built in system of generation
-based on <tt class="docutils literal"><span class="pre">module_directory</span></tt> plus <tt class="docutils literal"><span class="pre">uri</span></tt> is used.</li>
-</ul>
-</td>
-</tr>
-</tbody>
-</table>
-<p>All other keyword parameters available for
-<a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> are mirrored here. When new
-<a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> objects are created, the keywords
-established with this <a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a> are passed on
-to each new <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a>.</p>
-<dl class="method">
-<dt id="mako.lookup.TemplateLookup.adjust_uri">
-<tt class="descname">adjust_uri</tt><big>(</big><em>uri</em>, <em>relativeto</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateLookup.adjust_uri" title="Permalink to this definition">¶</a></dt>
-<dd><p>Adjust the given <tt class="docutils literal"><span class="pre">uri</span></tt> based on the given relative URI.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.lookup.TemplateLookup.filename_to_uri">
-<tt class="descname">filename_to_uri</tt><big>(</big><em>filename</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateLookup.filename_to_uri" title="Permalink to this definition">¶</a></dt>
-<dd><p>Convert the given <tt class="docutils literal"><span class="pre">filename</span></tt> to a URI relative to
-this <a class="reference internal" href="#mako.lookup.TemplateCollection" title="mako.lookup.TemplateCollection"><tt class="xref py py-class docutils literal"><span class="pre">TemplateCollection</span></tt></a>.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.lookup.TemplateLookup.get_template">
-<tt class="descname">get_template</tt><big>(</big><em>uri</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateLookup.get_template" title="Permalink to this definition">¶</a></dt>
-<dd><p>Return a <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object corresponding to the given
-<tt class="docutils literal"><span class="pre">uri</span></tt>.</p>
-<div class="admonition note">
-<p class="first admonition-title">Note</p>
-<p class="last">The <tt class="docutils literal"><span class="pre">relativeto</span></tt> argument is not supported here at the moment.</p>
-</div>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.lookup.TemplateLookup.put_string">
-<tt class="descname">put_string</tt><big>(</big><em>uri</em>, <em>text</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateLookup.put_string" title="Permalink to this definition">¶</a></dt>
-<dd><p>Place a new <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object into this
-<a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>, based on the given string of
-<tt class="docutils literal"><span class="pre">text</span></tt>.</p>
-</dd></dl>
-
-<dl class="method">
-<dt id="mako.lookup.TemplateLookup.put_template">
-<tt class="descname">put_template</tt><big>(</big><em>uri</em>, <em>template</em><big>)</big><a class="headerlink" href="#mako.lookup.TemplateLookup.put_template" title="Permalink to this definition">¶</a></dt>
-<dd><p>Place a new <a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object into this
-<a class="reference internal" href="#mako.lookup.TemplateLookup" title="mako.lookup.TemplateLookup"><tt class="xref py py-class docutils literal"><span class="pre">TemplateLookup</span></tt></a>, based on the given
-<a class="reference internal" href="#mako.template.Template" title="mako.template.Template"><tt class="xref py py-class docutils literal"><span class="pre">Template</span></tt></a> object.</p>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="class">
-<dt id="mako.exceptions.RichTraceback">
-<em class="property">class </em><tt class="descclassname">mako.exceptions.</tt><tt class="descname">RichTraceback</tt><big>(</big><em>error=None</em>, <em>traceback=None</em><big>)</big><a class="headerlink" href="#mako.exceptions.RichTraceback" title="Permalink to this definition">¶</a></dt>
-<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
-<p>Pull the current exception from the <tt class="docutils literal"><span class="pre">sys</span></tt> traceback and extracts
-Mako-specific template information.</p>
-<p>See the usage examples in <a class="reference internal" href="#handling-exceptions"><em>Handling Exceptions</em></a>.</p>
-<dl class="attribute">
-<dt id="RichTraceback.error">
-<tt class="descname">error</tt><a class="headerlink" href="#RichTraceback.error" title="Permalink to this definition">¶</a></dt>
-<dd><p>the exception instance.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="RichTraceback.message">
-<tt class="descname">message</tt><a class="headerlink" href="#RichTraceback.message" title="Permalink to this definition">¶</a></dt>
-<dd><p>the exception error message as unicode.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="RichTraceback.source">
-<tt class="descname">source</tt><a class="headerlink" href="#RichTraceback.source" title="Permalink to this definition">¶</a></dt>
-<dd><p>source code of the file where the error occurred.
-If the error occurred within a compiled template,
-this is the template source.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="RichTraceback.lineno">
-<tt class="descname">lineno</tt><a class="headerlink" href="#RichTraceback.lineno" title="Permalink to this definition">¶</a></dt>
-<dd><p>line number where the error occurred.  If the error
-occurred within a compiled template, the line number
-is adjusted to that of the template source.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="RichTraceback.records">
-<tt class="descname">records</tt><a class="headerlink" href="#RichTraceback.records" title="Permalink to this definition">¶</a></dt>
-<dd><p>a list of 8-tuples containing the original
-python traceback elements, plus the
-filename, line number, source line, and full template source
-for the traceline mapped back to its originating source
-template, if any for that traceline (else the fields are <tt class="docutils literal"><span class="pre">None</span></tt>).</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="RichTraceback.reverse_records">
-<tt class="descname">reverse_records</tt><a class="headerlink" href="#RichTraceback.reverse_records" title="Permalink to this definition">¶</a></dt>
-<dd><p>the list of records in reverse
-traceback – a list of 4-tuples, in the same format as a regular
-python traceback, with template-corresponding
-traceback records replacing the originals.</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="RichTraceback.reverse_traceback">
-<tt class="descname">reverse_traceback</tt><a class="headerlink" href="#RichTraceback.reverse_traceback" title="Permalink to this definition">¶</a></dt>
-<dd><p>the traceback list in reverse.</p>
-</dd></dl>
-
-</dd></dl>
-
-<dl class="function">
-<dt id="mako.exceptions.html_error_template">
-<tt class="descclassname">mako.exceptions.</tt><tt class="descname">html_error_template</tt><big>(</big><big>)</big><a class="headerlink" href="#mako.exceptions.html_error_template" title="Permalink to this definition">¶</a></dt>
-<dd><p>Provides a template that renders a stack trace in an HTML format,
-providing an excerpt of code as well as substituting source template
-filenames, line numbers and code for that of the originating source
-template, as applicable.</p>
-<p>The template’s default <tt class="docutils literal"><span class="pre">encoding_errors</span></tt> value is <tt class="docutils literal"><span class="pre">'htmlentityreplace'</span></tt>. The
-template has two options. With the <tt class="docutils literal"><span class="pre">full</span></tt> option disabled, only a section of
-an HTML document is returned. With the <tt class="docutils literal"><span class="pre">css</span></tt> option disabled, the default
-stylesheet won’t be included.</p>
-</dd></dl>
-
-<dl class="function">
-<dt id="mako.exceptions.text_error_template">
-<tt class="descclassname">mako.exceptions.</tt><tt class="descname">text_error_template</tt><big>(</big><em>lookup=None</em><big>)</big><a class="headerlink" href="#mako.exceptions.text_error_template" title="Permalink to this definition">¶</a></dt>
-<dd><p>Provides a template that renders a stack trace in a similar format to
-the Python interpreter, substituting source template filenames, line
-numbers and code for that of the originating source template, as
-applicable.</p>
-</dd></dl>
-
-</div>
-</div>
-
-    </div>
-
-</div>
-
-<div id="docs-bottom-navigation" class="docs-navigation-links">
-        Previous:
-        <a href="index.html" title="previous chapter">Table of Contents</a>
-        Next:
-        <a href="syntax.html" title="next chapter">Syntax</a>
-
-    <div id="docs-copyright">
-        © Copyright the Mako authors and contributors.
-        Documentation generated using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3 
-        with Mako templates.
-    </div>
-</div>
-
-</div>
-
-<div class="clearfix">
-
-<hr/>
-
-<div class="copyright">Website content copyright © by Michael Bayer.
-    All rights reserved.  Mako and its documentation are licensed
-    under the MIT license.  mike(&)zzzcomputing.com</div>
-
-</div>
-</div>
-</body>
-</html>
diff --git a/lib/mako-0.7.2/examples/bench/basic.py b/lib/mako-0.7.2/examples/bench/basic.py
deleted file mode 100644
--- a/lib/mako-0.7.2/examples/bench/basic.py
+++ /dev/null
@@ -1,191 +0,0 @@
-# basic.py - basic benchmarks adapted from Genshi
-# Copyright (C) 2006 Edgewall Software
-# All rights reserved.
-# 
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in
-#     the documentation and/or other materials provided with the
-#     distribution.
-#  3. The name of the author may not be used to endorse or promote
-#     products derived from this software without specific prior
-#     written permission.
-# 
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-from cgi import escape
-import os
-try:
-    from StringIO import StringIO
-except ImportError:
-    from io import StringIO
-import sys
-import timeit
-
-def u(stringlit):
-    if sys.version_info >= (3,):
-        return stringlit
-    else:
-        return stringlit.decode('latin1')
-
-__all__ = ['mako', 'mako_inheritance', 'jinja2', 'jinja2_inheritance',
-            'cheetah', 'django', 'myghty', 'genshi', 'kid']
-
-# Templates content and constants
-TITLE = 'Just a test'
-USER = 'joe'
-ITEMS = ['Number %d' % num for num in range(1, 15)]
-U_ITEMS = [u(item) for item in ITEMS]
-
-def genshi(dirname, verbose=False):
-    from genshi.template import TemplateLoader
-    loader = TemplateLoader([dirname], auto_reload=False)
-    template = loader.load('template.html')
-    def render():
-        data = dict(title=TITLE, user=USER, items=ITEMS)
-        return template.generate(**data).render('xhtml')
-
-    if verbose:
-        print(render())
-    return render
-
-def myghty(dirname, verbose=False):
-    from myghty import interp
-    interpreter = interp.Interpreter(component_root=dirname)
-    def render():
-        data = dict(title=TITLE, user=USER, items=ITEMS)
-        buffer = StringIO()
-        interpreter.execute("template.myt", request_args=data, out_buffer=buffer)
-        return buffer.getvalue()
-    if verbose:
-        print(render())
-    return render
-
-def mako(dirname, verbose=False):
-    from mako.template import Template
-    from mako.lookup import TemplateLookup
-    disable_unicode = (sys.version_info < (3,))
-    lookup = TemplateLookup(directories=[dirname], filesystem_checks=False, disable_unicode=disable_unicode)
-    template = lookup.get_template('template.html')
-    def render():
-        return template.render(title=TITLE, user=USER, list_items=U_ITEMS)
-    if verbose:
-        print(template.code + " " + render())
-    return render
-mako_inheritance = mako
-
-def jinja2(dirname, verbose=False):
-    from jinja2 import Environment, FileSystemLoader
-    env = Environment(loader=FileSystemLoader(dirname))
-    template = env.get_template('template.html')
-    def render():
-        return template.render(title=TITLE, user=USER, list_items=U_ITEMS)
-    if verbose:
-        print(render())
-    return render
-jinja2_inheritance = jinja2
-
-def cheetah(dirname, verbose=False):
-    from Cheetah.Template import Template
-    filename = os.path.join(dirname, 'template.tmpl')
-    template = Template(file=filename)
-    def render():
-        template.__dict__.update({'title': TITLE, 'user': USER,
-                                  'list_items': U_ITEMS})
-        return template.respond()
-
-    if verbose:
-        print(dir(template))
-        print(template.generatedModuleCode())
-        print(render())
-    return render
-
-def django(dirname, verbose=False):
-    from django.conf import settings
-    settings.configure(TEMPLATE_DIRS=[os.path.join(dirname, 'templates')])
-    from django import template, templatetags
-    from django.template import loader
-    templatetags.__path__.append(os.path.join(dirname, 'templatetags'))
-    tmpl = loader.get_template('template.html')
-
-    def render():
-        data = {'title': TITLE, 'user': USER, 'items': ITEMS}
-        return tmpl.render(template.Context(data))
-
-    if verbose:
-        print(render())
-    return render
-
-def kid(dirname, verbose=False):
-    import kid
-    kid.path = kid.TemplatePath([dirname])
-    template = kid.Template(file='template.kid')
-    def render():
-        template = kid.Template(file='template.kid',
-                                title=TITLE, user=USER, items=ITEMS)
-        return template.serialize(output='xhtml')
-
-    if verbose:
-        print(render())
-    return render
-
-
-def run(engines, number=2000, verbose=False):
-    basepath = os.path.abspath(os.path.dirname(__file__))
-    for engine in engines:
-        dirname = os.path.join(basepath, engine)
-        if verbose:
-            print('%s:' % engine.capitalize())
-            print('--------------------------------------------------------')
-        else:
-            sys.stdout.write('%s:' % engine.capitalize())
-        t = timeit.Timer(setup='from __main__ import %s; render = %s(r"%s", %s)'
-                                       % (engine, engine, dirname, verbose),
-                                 stmt='render()')
-
-        time = t.timeit(number=number) / number
-        if verbose:
-            print('--------------------------------------------------------')
-        print('%.2f ms' % (1000 * time))
-        if verbose:
-            print('--------------------------------------------------------')
-
-
-if __name__ == '__main__':
-    engines = [arg for arg in sys.argv[1:] if arg[0] != '-']
-    if not engines:
-        engines = __all__
-
-    verbose = '-v' in sys.argv
-
-    if '-p' in sys.argv:
-        try:
-            import hotshot, hotshot.stats
-            prof = hotshot.Profile("template.prof")
-            benchtime = prof.runcall(run, engines, number=100, verbose=verbose)
-            stats = hotshot.stats.load("template.prof")
-        except ImportError:
-            import cProfile, pstats
-            stmt = "run(%r, number=%r, verbose=%r)" % (engines, 1000, verbose)
-            cProfile.runctx(stmt, globals(), {}, "template.prof")
-            stats = pstats.Stats("template.prof")
-        stats.strip_dirs()
-        stats.sort_stats('time', 'calls')
-        stats.print_stats()
-    else:
-        run(engines, verbose=verbose)
diff --git a/lib/mako-0.7.2/examples/bench/cheetah/footer.tmpl b/lib/mako-0.7.2/examples/bench/cheetah/footer.tmpl
deleted file mode 100644
--- a/lib/mako-0.7.2/examples/bench/cheetah/footer.tmpl
+++ /dev/null
@@ -1,2 +0,0 @@
-<div id="footer">
-</div>
diff --git a/lib/mako-0.7.2/examples/bench/cheetah/header.tmpl b/lib/mako-0.7.2/examples/bench/cheetah/header.tmpl
deleted file mode 100644
--- a/lib/mako-0.7.2/examples/bench/cheetah/header.tmpl
+++ /dev/null
@@ -1,5 +0,0 @@
-<div id="header">
-  <h1>$title</h1>
-</div>
-
-
diff --git a/lib/mako-0.7.2/examples/bench/cheetah/template.tmpl b/lib/mako-0.7.2/examples/bench/cheetah/template.tmpl
deleted file mode 100644
--- a/lib/mako-0.7.2/examples/bench/cheetah/template.tmpl
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html
-    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
-  <head>
-    <title>${title}</title>
-  </head>
-  <body>
-
-      #def greeting(name)
-      <p>hello ${name}!</p>
-      #end def
- 
-    #include "cheetah/header.tmpl"
-
-    $greeting($user)
-    $greeting('me')
-    $greeting('world')
- 
-    <h2>Loop</h2>
-    #if $list_items
-      <ul>
-        #for $list_item in $list_items
-          <li #if $list_item is $list_items[-1] then "class='last'" else ""#>$list_item</li>
-        #end for
-      </ul>
-    #end if
-
-    #include "cheetah/footer.tmpl"
-  </body>
-</html>
diff --git a/lib/mako-0.7.2/examples/bench/django/templatetags/__init__.py b/lib/mako-0.7.2/examples/bench/django/templatetags/__init__.py
deleted file mode 100644
diff --git a/lib/mako-0.7.2/examples/bench/django/templatetags/bench.py b/lib/mako-0.7.2/examples/bench/django/templatetags/bench.py
deleted file mode 100644
--- a/lib/mako-0.7.2/examples/bench/django/templatetags/bench.py
+++ /dev/null
@@ -1,8 +0,0 @@
-from django.template import Library, Node, resolve_variable
-from django.utils.html import escape
-
-register = Library()
-
-def greeting(name):
-    return 'Hello, %s!' % escape(name)
-greeting = register.simple_tag(greeting)
diff --git a/lib/mako-0.7.2/examples/bench/kid/base.kid b/lib/mako-0.7.2/examples/bench/kid/base.kid
deleted file mode 100644
--- a/lib/mako-0.7.2/examples/bench/kid/base.kid
+++ /dev/null
@@ -1,15 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:py="http://purl.org/kid/ns#">
-
-  <p py:def="greeting(name)">
-    Hello, ${name}!
-  </p>
-
-  <body py:match="item.tag == '{http://www.w3.org/1999/xhtml}body'" py:strip="">
-    <div id="header">
-      <h1>${title}</h1>
-    </div>
-    ${item}
-    <div id="footer" />
-  </body>
-</html>
diff --git a/lib/mako-0.7.2/examples/bench/kid/template.kid b/lib/mako-0.7.2/examples/bench/kid/template.kid
deleted file mode 100644
--- a/lib/mako-0.7.2/examples/bench/kid/template.kid
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE html
-    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:py="http://purl.org/kid/ns#"
-      py:extends="'base.kid'"
-      lang="en">
-  <head>
-    <title>${title}</title>
-  </head>
-  <body>
-    <div>${greeting(user)}</div>
-    <div>${greeting('me')}</div>
-    <div>${greeting('world')}</div>
- 
-    <h2>Loop</h2>
-    <ul py:if="items">
-      <li py:for="idx, item in enumerate(items)" py:content="item"
-          class="${idx + 1 == len(items) and 'last' or None}" />
-    </ul>
-  </body>
-</html>
diff --git a/lib/mako-0.7.2/examples/bench/myghty/base.myt b/lib/mako-0.7.2/examples/bench/myghty/base.myt
deleted file mode 100644
--- a/lib/mako-0.7.2/examples/bench/myghty/base.myt
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html
-    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
-<%args scope="request">
-    title
-</%args>
-
-<& REQUEST:header &>
-
-<body>
-<div id="header">
-  <h1><% title %></h1>
-</div>
-
-% m.call_next()
-
-<div id="footer"></div>
-
-</body>
-</html>
-
-
-<%method greeting>
-<%args>
-   name
-</%args>
-Hello, <% name | h %>
-</%method>
diff --git a/lib/mako-0.7.2/examples/bench/myghty/template.myt b/lib/mako-0.7.2/examples/bench/myghty/template.myt
deleted file mode 100644
--- a/lib/mako-0.7.2/examples/bench/myghty/template.myt
+++ /dev/null
@@ -1,30 +0,0 @@
-<%flags>inherit="base.myt"</%flags>
-<%args>
-	title
-	items
-	user
-</%args>
-
-<%method header>
-    <%args scope="request">
-    title
-    </%args>
-<head>
-  <title><% title %></title>
-</head>
-</%method>
-
-  <div><& base.myt:greeting, name=user &></div>
-  <div><& base.myt:greeting, name="me"&></div>
-  <div><& base.myt:greeting, name="world" &></div>
-
-  <h2>Loop</h2>
-%if items:
-      <ul>
-%	for i, item in enumerate(items):
-  <li <% i+1==len(items) and "class='last'" or ""%>><% item %></li>
-%
-      </ul>
-%
-
- 
diff --git a/lib/mako-0.7.2/examples/wsgi/run_wsgi.py b/lib/mako-0.7.2/examples/wsgi/run_wsgi.py
deleted file mode 100644
--- a/lib/mako-0.7.2/examples/wsgi/run_wsgi.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/python
-
-import cgi, re, os, posixpath, mimetypes
-from mako.lookup import TemplateLookup
-from mako import exceptions
-
-root = './'
-port = 8000
-error_style = 'html' # select 'text' for plaintext error reporting
-
-lookup = TemplateLookup(directories=[root + 'templates', root + 'htdocs'], filesystem_checks=True, module_directory='./modules')
-
-def serve(environ, start_response):
-    """serves requests using the WSGI callable interface."""
-    fieldstorage = cgi.FieldStorage(
-            fp = environ['wsgi.input'],
-            environ = environ,
-            keep_blank_values = True
-    )
-    d = dict([(k, getfield(fieldstorage[k])) for k in fieldstorage])
-
-    uri = environ.get('PATH_INFO', '/')
-    if not uri:
-        uri = '/index.html'
-    else:
-        uri = re.sub(r'^/$', '/index.html', uri)
-
-    if re.match(r'.*\.html$', uri):
-        try:
-            template = lookup.get_template(uri)
-            start_response("200 OK", [('Content-type','text/html')])
-            return [template.render(**d)]
-        except exceptions.TopLevelLookupException:
-            start_response("404 Not Found", [])
-            return ["Cant find template '%s'" % uri]
-        except:
-            if error_style == 'text':
-                start_response("200 OK", [('Content-type','text/plain')])
-                return [exceptions.text_error_template().render()]
-            else:
-                start_response("200 OK", [('Content-type','text/html')])
-                return [exceptions.html_error_template().render()]
-    else:
-        u = re.sub(r'^\/+', '', uri)
-        filename = os.path.join(root, u)
-        start_response("200 OK", [('Content-type',guess_type(uri))])
-        return [file(filename).read()]
- 
-def getfield(f):
-    """convert values from cgi.Field objects to plain values."""
-    if isinstance(f, list):
-        return [getfield(x) for x in f]
-    else:
-        return f.value
-
-extensions_map = mimetypes.types_map.copy()
-extensions_map.update({
-'': 'text/html', # Default
-})
-
-def guess_type(path):
-    """return a mimetype for the given path based on file extension."""
-    base, ext = posixpath.splitext(path)
-    if ext in extensions_map:
-        return extensions_map[ext]
-    ext = ext.lower()
-    if ext in extensions_map:
-        return extensions_map[ext]
-    else:
-        return extensions_map['']
- 
-if __name__ == '__main__':
-    import wsgiref.simple_server
-    server = wsgiref.simple_server.make_server('', port, serve)
-    print "Server listening on port %d" % port
-    server.serve_forever()
-
-
diff --git a/lib/mako-0.7.2/mako/__init__.py b/lib/mako-0.7.2/mako/__init__.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/__init__.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# mako/__init__.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-
-__version__ = '0.7.2'
-
diff --git a/lib/mako-0.7.2/mako/_ast_util.py b/lib/mako-0.7.2/mako/_ast_util.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/_ast_util.py
+++ /dev/null
@@ -1,839 +0,0 @@
-# mako/_ast_util.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""
-    ast
-    ~~~
-
-    The `ast` module helps Python applications to process trees of the Python
-    abstract syntax grammar.  The abstract syntax itself might change with
-    each Python release; this module helps to find out programmatically what
-    the current grammar looks like and allows modifications of it.
-
-    An abstract syntax tree can be generated by passing `ast.PyCF_ONLY_AST` as
-    a flag to the `compile()` builtin function or by using the `parse()`
-    function from this module.  The result will be a tree of objects whose
-    classes all inherit from `ast.AST`.
-
-    A modified abstract syntax tree can be compiled into a Python code object
-    using the built-in `compile()` function.
-
-    Additionally various helper functions are provided that make working with
-    the trees simpler.  The main intention of the helper functions and this
-    module in general is to provide an easy to use interface for libraries
-    that work tightly with the python syntax (template engines for example).
-
-
-    :copyright: Copyright 2008 by Armin Ronacher.
-    :license: Python License.
-"""
-from _ast import *
-
-
-BOOLOP_SYMBOLS = {
-    And:        'and',
-    Or:         'or'
-}
-
-BINOP_SYMBOLS = {
-    Add:        '+',
-    Sub:        '-',
-    Mult:       '*',
-    Div:        '/',
-    FloorDiv:   '//',
-    Mod:        '%',
-    LShift:     '<<',
-    RShift:     '>>',
-    BitOr:      '|',
-    BitAnd:     '&',
-    BitXor:     '^'
-}
-
-CMPOP_SYMBOLS = {
-    Eq:         '==',
-    Gt:         '>',
-    GtE:        '>=',
-    In:         'in',
-    Is:         'is',
-    IsNot:      'is not',
-    Lt:         '<',
-    LtE:        '<=',
-    NotEq:      '!=',
-    NotIn:      'not in'
-}
-
-UNARYOP_SYMBOLS = {
-    Invert:     '~',
-    Not:        'not',
-    UAdd:       '+',
-    USub:       '-'
-}
-
-ALL_SYMBOLS = {}
-ALL_SYMBOLS.update(BOOLOP_SYMBOLS)
-ALL_SYMBOLS.update(BINOP_SYMBOLS)
-ALL_SYMBOLS.update(CMPOP_SYMBOLS)
-ALL_SYMBOLS.update(UNARYOP_SYMBOLS)
-
-
-def parse(expr, filename='<unknown>', mode='exec'):
-    """Parse an expression into an AST node."""
-    return compile(expr, filename, mode, PyCF_ONLY_AST)
-
-
-def to_source(node, indent_with=' ' * 4):
-    """
-    This function can convert a node tree back into python sourcecode.  This
-    is useful for debugging purposes, especially if you're dealing with custom
-    asts not generated by python itself.
-
-    It could be that the sourcecode is evaluable when the AST itself is not
-    compilable / evaluable.  The reason for this is that the AST contains some
-    more data than regular sourcecode does, which is dropped during
-    conversion.
-
-    Each level of indentation is replaced with `indent_with`.  Per default this
-    parameter is equal to four spaces as suggested by PEP 8, but it might be
-    adjusted to match the application's styleguide.
-    """
-    generator = SourceGenerator(indent_with)
-    generator.visit(node)
-    return ''.join(generator.result)
-
-
-def dump(node):
-    """
-    A very verbose representation of the node passed.  This is useful for
-    debugging purposes.
-    """
-    def _format(node):
-        if isinstance(node, AST):
-            return '%s(%s)' % (node.__class__.__name__,
-                               ', '.join('%s=%s' % (a, _format(b))
-                                         for a, b in iter_fields(node)))
-        elif isinstance(node, list):
-            return '[%s]' % ', '.join(_format(x) for x in node)
-        return repr(node)
-    if not isinstance(node, AST):
-        raise TypeError('expected AST, got %r' % node.__class__.__name__)
-    return _format(node)
-
-
-def copy_location(new_node, old_node):
-    """
-    Copy the source location hint (`lineno` and `col_offset`) from the
-    old to the new node if possible and return the new one.
-    """
-    for attr in 'lineno', 'col_offset':
-        if attr in old_node._attributes and attr in new_node._attributes \
-           and hasattr(old_node, attr):
-            setattr(new_node, attr, getattr(old_node, attr))
-    return new_node
-
-
-def fix_missing_locations(node):
-    """
-    Some nodes require a line number and the column offset.  Without that
-    information the compiler will abort the compilation.  Because it can be
-    a dull task to add appropriate line numbers and column offsets when
-    adding new nodes this function can help.  It copies the line number and
-    column offset of the parent node to the child nodes without this
-    information.
-
-    Unlike `copy_location` this works recursive and won't touch nodes that
-    already have a location information.
-    """
-    def _fix(node, lineno, col_offset):
-        if 'lineno' in node._attributes:
-            if not hasattr(node, 'lineno'):
-                node.lineno = lineno
-            else:
-                lineno = node.lineno
-        if 'col_offset' in node._attributes:
-            if not hasattr(node, 'col_offset'):
-                node.col_offset = col_offset
-            else:
-                col_offset = node.col_offset
-        for child in iter_child_nodes(node):
-            _fix(child, lineno, col_offset)
-    _fix(node, 1, 0)
-    return node
-
-
-def increment_lineno(node, n=1):
-    """
-    Increment the line numbers of all nodes by `n` if they have line number
-    attributes.  This is useful to "move code" to a different location in a
-    file.
-    """
-    for node in zip((node,), walk(node)):
-        if 'lineno' in node._attributes:
-            node.lineno = getattr(node, 'lineno', 0) + n
-
-
-def iter_fields(node):
-    """Iterate over all fields of a node, only yielding existing fields."""
-    # CPython 2.5 compat
-    if not hasattr(node, '_fields') or not node._fields:
-        return
-    for field in node._fields:
-        try:
-            yield field, getattr(node, field)
-        except AttributeError:
-            pass
-
-
-def get_fields(node):
-    """Like `iter_fiels` but returns a dict."""
-    return dict(iter_fields(node))
-
-
-def iter_child_nodes(node):
-    """Iterate over all child nodes or a node."""
-    for name, field in iter_fields(node):
-        if isinstance(field, AST):
-            yield field
-        elif isinstance(field, list):
-            for item in field:
-                if isinstance(item, AST):
-                    yield item
-
-
-def get_child_nodes(node):
-    """Like `iter_child_nodes` but returns a list."""
-    return list(iter_child_nodes(node))
-
-
-def get_compile_mode(node):
-    """
-    Get the mode for `compile` of a given node.  If the node is not a `mod`
-    node (`Expression`, `Module` etc.) a `TypeError` is thrown.
-    """
-    if not isinstance(node, mod):
-        raise TypeError('expected mod node, got %r' % node.__class__.__name__)
-    return {
-        Expression:     'eval',
-        Interactive:    'single'
-    }.get(node.__class__, 'expr')
-
-
-def get_docstring(node):
-    """
-    Return the docstring for the given node or `None` if no docstring can be
-    found.  If the node provided does not accept docstrings a `TypeError`
-    will be raised.
-    """
-    if not isinstance(node, (FunctionDef, ClassDef, Module)):
-        raise TypeError("%r can't have docstrings" % node.__class__.__name__)
-    if node.body and isinstance(node.body[0], Str):
-        return node.body[0].s
-
-
-def walk(node):
-    """
-    Iterate over all nodes.  This is useful if you only want to modify nodes in
-    place and don't care about the context or the order the nodes are returned.
-    """
-    from collections import deque
-    todo = deque([node])
-    while todo:
-        node = todo.popleft()
-        todo.extend(iter_child_nodes(node))
-        yield node
-
-
-class NodeVisitor(object):
-    """
-    Walks the abstract syntax tree and call visitor functions for every node
-    found.  The visitor functions may return values which will be forwarded
-    by the `visit` method.
-
-    Per default the visitor functions for the nodes are ``'visit_'`` +
-    class name of the node.  So a `TryFinally` node visit function would
-    be `visit_TryFinally`.  This behavior can be changed by overriding
-    the `get_visitor` function.  If no visitor function exists for a node
-    (return value `None`) the `generic_visit` visitor is used instead.
-
-    Don't use the `NodeVisitor` if you want to apply changes to nodes during
-    traversing.  For this a special visitor exists (`NodeTransformer`) that
-    allows modifications.
-    """
-
-    def get_visitor(self, node):
-        """
-        Return the visitor function for this node or `None` if no visitor
-        exists for this node.  In that case the generic visit function is
-        used instead.
-        """
-        method = 'visit_' + node.__class__.__name__
-        return getattr(self, method, None)
-
-    def visit(self, node):
-        """Visit a node."""
-        f = self.get_visitor(node)
-        if f is not None:
-            return f(node)
-        return self.generic_visit(node)
-
-    def generic_visit(self, node):
-        """Called if no explicit visitor function exists for a node."""
-        for field, value in iter_fields(node):
-            if isinstance(value, list):
-                for item in value:
-                    if isinstance(item, AST):
-                        self.visit(item)
-            elif isinstance(value, AST):
-                self.visit(value)
-
-
-class NodeTransformer(NodeVisitor):
-    """
-    Walks the abstract syntax tree and allows modifications of nodes.
-
-    The `NodeTransformer` will walk the AST and use the return value of the
-    visitor functions to replace or remove the old node.  If the return
-    value of the visitor function is `None` the node will be removed
-    from the previous location otherwise it's replaced with the return
-    value.  The return value may be the original node in which case no
-    replacement takes place.
-
-    Here an example transformer that rewrites all `foo` to `data['foo']`::
-
-        class RewriteName(NodeTransformer):
-
-            def visit_Name(self, node):
-                return copy_location(Subscript(
-                    value=Name(id='data', ctx=Load()),
-                    slice=Index(value=Str(s=node.id)),
-                    ctx=node.ctx
-                ), node)
-
-    Keep in mind that if the node you're operating on has child nodes
-    you must either transform the child nodes yourself or call the generic
-    visit function for the node first.
-
-    Nodes that were part of a collection of statements (that applies to
-    all statement nodes) may also return a list of nodes rather than just
-    a single node.
-
-    Usually you use the transformer like this::
-
-        node = YourTransformer().visit(node)
-    """
-
-    def generic_visit(self, node):
-        for field, old_value in iter_fields(node):
-            old_value = getattr(node, field, None)
-            if isinstance(old_value, list):
-                new_values = []
-                for value in old_value:
-                    if isinstance(value, AST):
-                        value = self.visit(value)
-                        if value is None:
-                            continue
-                        elif not isinstance(value, AST):
-                            new_values.extend(value)
-                            continue
-                    new_values.append(value)
-                old_value[:] = new_values
-            elif isinstance(old_value, AST):
-                new_node = self.visit(old_value)
-                if new_node is None:
-                    delattr(node, field)
-                else:
-                    setattr(node, field, new_node)
-        return node
-
-
-class SourceGenerator(NodeVisitor):
-    """
-    This visitor is able to transform a well formed syntax tree into python
-    sourcecode.  For more details have a look at the docstring of the
-    `node_to_source` function.
-    """
-
-    def __init__(self, indent_with):
-        self.result = []
-        self.indent_with = indent_with
-        self.indentation = 0
-        self.new_lines = 0
-
-    def write(self, x):
-        if self.new_lines:
-            if self.result:
-                self.result.append('\n' * self.new_lines)
-            self.result.append(self.indent_with * self.indentation)
-            self.new_lines = 0
-        self.result.append(x)
-
-    def newline(self, n=1):
-        self.new_lines = max(self.new_lines, n)
-
-    def body(self, statements):
-        self.new_line = True
-        self.indentation += 1
-        for stmt in statements:
-            self.visit(stmt)
-        self.indentation -= 1
-
-    def body_or_else(self, node):
-        self.body(node.body)
-        if node.orelse:
-            self.newline()
-            self.write('else:')
-            self.body(node.orelse)
-
-    def signature(self, node):
-        want_comma = []
-        def write_comma():
-            if want_comma:
-                self.write(', ')
-            else:
-                want_comma.append(True)
-
-        padding = [None] * (len(node.args) - len(node.defaults))
-        for arg, default in zip(node.args, padding + node.defaults):
-            write_comma()
-            self.visit(arg)
-            if default is not None:
-                self.write('=')
-                self.visit(default)
-        if node.vararg is not None:
-            write_comma()
-            self.write('*' + node.vararg)
-        if node.kwarg is not None:
-            write_comma()
-            self.write('**' + node.kwarg)
-
-    def decorators(self, node):
-        for decorator in node.decorator_list:
-            self.newline()
-            self.write('@')
-            self.visit(decorator)
-
-    # Statements
-
-    def visit_Assign(self, node):
-        self.newline()
-        for idx, target in enumerate(node.targets):
-            if idx:
-                self.write(', ')
-            self.visit(target)
-        self.write(' = ')
-        self.visit(node.value)
-
-    def visit_AugAssign(self, node):
-        self.newline()
-        self.visit(node.target)
-        self.write(BINOP_SYMBOLS[type(node.op)] + '=')
-        self.visit(node.value)
-
-    def visit_ImportFrom(self, node):
-        self.newline()
-        self.write('from %s%s import ' % ('.' * node.level, node.module))
-        for idx, item in enumerate(node.names):
-            if idx:
-                self.write(', ')
-            self.write(item)
-
-    def visit_Import(self, node):
-        self.newline()
-        for item in node.names:
-            self.write('import ')
-            self.visit(item)
-
-    def visit_Expr(self, node):
-        self.newline()
-        self.generic_visit(node)
-
-    def visit_FunctionDef(self, node):
-        self.newline(n=2)
-        self.decorators(node)
-        self.newline()
-        self.write('def %s(' % node.name)
-        self.signature(node.args)
-        self.write('):')
-        self.body(node.body)
-
-    def visit_ClassDef(self, node):
-        have_args = []
-        def paren_or_comma():
-            if have_args:
-                self.write(', ')
-            else:
-                have_args.append(True)
-                self.write('(')
-
-        self.newline(n=3)
-        self.decorators(node)
-        self.newline()
-        self.write('class %s' % node.name)
-        for base in node.bases:
-            paren_or_comma()
-            self.visit(base)
-        # XXX: the if here is used to keep this module compatible
-        #      with python 2.6.
-        if hasattr(node, 'keywords'):
-            for keyword in node.keywords:
-                paren_or_comma()
-                self.write(keyword.arg + '=')
-                self.visit(keyword.value)
-            if node.starargs is not None:
-                paren_or_comma()
-                self.write('*')
-                self.visit(node.starargs)
-            if node.kwargs is not None:
-                paren_or_comma()
-                self.write('**')
-                self.visit(node.kwargs)
-        self.write(have_args and '):' or ':')
-        self.body(node.body)
-
-    def visit_If(self, node):
-        self.newline()
-        self.write('if ')
-        self.visit(node.test)
-        self.write(':')
-        self.body(node.body)
-        while True:
-            else_ = node.orelse
-            if len(else_) == 1 and isinstance(else_[0], If):
-                node = else_[0]
-                self.newline()
-                self.write('elif ')
-                self.visit(node.test)
-                self.write(':')
-                self.body(node.body)
-            else:
-                self.newline()
-                self.write('else:')
-                self.body(else_)
-                break
-
-    def visit_For(self, node):
-        self.newline()
-        self.write('for ')
-        self.visit(node.target)
-        self.write(' in ')
-        self.visit(node.iter)
-        self.write(':')
-        self.body_or_else(node)
-
-    def visit_While(self, node):
-        self.newline()
-        self.write('while ')
-        self.visit(node.test)
-        self.write(':')
-        self.body_or_else(node)
-
-    def visit_With(self, node):
-        self.newline()
-        self.write('with ')
-        self.visit(node.context_expr)
-        if node.optional_vars is not None:
-            self.write(' as ')
-            self.visit(node.optional_vars)
-        self.write(':')
-        self.body(node.body)
-
-    def visit_Pass(self, node):
-        self.newline()
-        self.write('pass')
-
-    def visit_Print(self, node):
-        # XXX: python 2.6 only
-        self.newline()
-        self.write('print ')
-        want_comma = False
-        if node.dest is not None:
-            self.write(' >> ')
-            self.visit(node.dest)
-            want_comma = True
-        for value in node.values:
-            if want_comma:
-                self.write(', ')
-            self.visit(value)
-            want_comma = True
-        if not node.nl:
-            self.write(',')
-
-    def visit_Delete(self, node):
-        self.newline()
-        self.write('del ')
-        for idx, target in enumerate(node):
-            if idx:
-                self.write(', ')
-            self.visit(target)
-
-    def visit_TryExcept(self, node):
-        self.newline()
-        self.write('try:')
-        self.body(node.body)
-        for handler in node.handlers:
-            self.visit(handler)
-
-    def visit_TryFinally(self, node):
-        self.newline()
-        self.write('try:')
-        self.body(node.body)
-        self.newline()
-        self.write('finally:')
-        self.body(node.finalbody)
-
-    def visit_Global(self, node):
-        self.newline()
-        self.write('global ' + ', '.join(node.names))
-
-    def visit_Nonlocal(self, node):
-        self.newline()
-        self.write('nonlocal ' + ', '.join(node.names))
-
-    def visit_Return(self, node):
-        self.newline()
-        self.write('return ')
-        self.visit(node.value)
-
-    def visit_Break(self, node):
-        self.newline()
-        self.write('break')
-
-    def visit_Continue(self, node):
-        self.newline()
-        self.write('continue')
-
-    def visit_Raise(self, node):
-        # XXX: Python 2.6 / 3.0 compatibility
-        self.newline()
-        self.write('raise')
-        if hasattr(node, 'exc') and node.exc is not None:
-            self.write(' ')
-            self.visit(node.exc)
-            if node.cause is not None:
-                self.write(' from ')
-                self.visit(node.cause)
-        elif hasattr(node, 'type') and node.type is not None:
-            self.visit(node.type)
-            if node.inst is not None:
-                self.write(', ')
-                self.visit(node.inst)
-            if node.tback is not None:
-                self.write(', ')
-                self.visit(node.tback)
-
-    # Expressions
-
-    def visit_Attribute(self, node):
-        self.visit(node.value)
-        self.write('.' + node.attr)
-
-    def visit_Call(self, node):
-        want_comma = []
-        def write_comma():
-            if want_comma:
-                self.write(', ')
-            else:
-                want_comma.append(True)
-
-        self.visit(node.func)
-        self.write('(')
-        for arg in node.args:
-            write_comma()
-            self.visit(arg)
-        for keyword in node.keywords:
-            write_comma()
-            self.write(keyword.arg + '=')
-            self.visit(keyword.value)
-        if node.starargs is not None:
-            write_comma()
-            self.write('*')
-            self.visit(node.starargs)
-        if node.kwargs is not None:
-            write_comma()
-            self.write('**')
-            self.visit(node.kwargs)
-        self.write(')')
-
-    def visit_Name(self, node):
-        self.write(node.id)
-
-    def visit_Str(self, node):
-        self.write(repr(node.s))
-
-    def visit_Bytes(self, node):
-        self.write(repr(node.s))
-
-    def visit_Num(self, node):
-        self.write(repr(node.n))
-
-    def visit_Tuple(self, node):
-        self.write('(')
-        idx = -1
-        for idx, item in enumerate(node.elts):
-            if idx:
-                self.write(', ')
-            self.visit(item)
-        self.write(idx and ')' or ',)')
-
-    def sequence_visit(left, right):
-        def visit(self, node):
-            self.write(left)
-            for idx, item in enumerate(node.elts):
-                if idx:
-                    self.write(', ')
-                self.visit(item)
-            self.write(right)
-        return visit
-
-    visit_List = sequence_visit('[', ']')
-    visit_Set = sequence_visit('{', '}')
-    del sequence_visit
-
-    def visit_Dict(self, node):
-        self.write('{')
-        for idx, (key, value) in enumerate(zip(node.keys, node.values)):
-            if idx:
-                self.write(', ')
-            self.visit(key)
-            self.write(': ')
-            self.visit(value)
-        self.write('}')
-
-    def visit_BinOp(self, node):
-        self.write('(')
-        self.visit(node.left)
-        self.write(' %s ' % BINOP_SYMBOLS[type(node.op)])
-        self.visit(node.right)
-        self.write(')')
-
-    def visit_BoolOp(self, node):
-        self.write('(')
-        for idx, value in enumerate(node.values):
-            if idx:
-                self.write(' %s ' % BOOLOP_SYMBOLS[type(node.op)])
-            self.visit(value)
-        self.write(')')
-
-    def visit_Compare(self, node):
-        self.write('(')
-        self.visit(node.left)
-        for op, right in zip(node.ops, node.comparators):
-            self.write(' %s ' % CMPOP_SYMBOLS[type(op)])
-            self.visit(right)
-        self.write(')')
-
-    def visit_UnaryOp(self, node):
-        self.write('(')
-        op = UNARYOP_SYMBOLS[type(node.op)]
-        self.write(op)
-        if op == 'not':
-            self.write(' ')
-        self.visit(node.operand)
-        self.write(')')
-
-    def visit_Subscript(self, node):
-        self.visit(node.value)
-        self.write('[')
-        self.visit(node.slice)
-        self.write(']')
-
-    def visit_Slice(self, node):
-        if node.lower is not None:
-            self.visit(node.lower)
-        self.write(':')
-        if node.upper is not None:
-            self.visit(node.upper)
-        if node.step is not None:
-            self.write(':')
-            if not (isinstance(node.step, Name) and node.step.id == 'None'):
-                self.visit(node.step)
-
-    def visit_ExtSlice(self, node):
-        for idx, item in node.dims:
-            if idx:
-                self.write(', ')
-            self.visit(item)
-
-    def visit_Yield(self, node):
-        self.write('yield ')
-        self.visit(node.value)
-
-    def visit_Lambda(self, node):
-        self.write('lambda ')
-        self.signature(node.args)
-        self.write(': ')
-        self.visit(node.body)
-
-    def visit_Ellipsis(self, node):
-        self.write('Ellipsis')
-
-    def generator_visit(left, right):
-        def visit(self, node):
-            self.write(left)
-            self.visit(node.elt)
-            for comprehension in node.generators:
-                self.visit(comprehension)
-            self.write(right)
-        return visit
-
-    visit_ListComp = generator_visit('[', ']')
-    visit_GeneratorExp = generator_visit('(', ')')
-    visit_SetComp = generator_visit('{', '}')
-    del generator_visit
-
-    def visit_DictComp(self, node):
-        self.write('{')
-        self.visit(node.key)
-        self.write(': ')
-        self.visit(node.value)
-        for comprehension in node.generators:
-            self.visit(comprehension)
-        self.write('}')
-
-    def visit_IfExp(self, node):
-        self.visit(node.body)
-        self.write(' if ')
-        self.visit(node.test)
-        self.write(' else ')
-        self.visit(node.orelse)
-
-    def visit_Starred(self, node):
-        self.write('*')
-        self.visit(node.value)
-
-    def visit_Repr(self, node):
-        # XXX: python 2.6 only
-        self.write('`')
-        self.visit(node.value)
-        self.write('`')
-
-    # Helper Nodes
-
-    def visit_alias(self, node):
-        self.write(node.name)
-        if node.asname is not None:
-            self.write(' as ' + node.asname)
-
-    def visit_comprehension(self, node):
-        self.write(' for ')
-        self.visit(node.target)
-        self.write(' in ')
-        self.visit(node.iter)
-        if node.ifs:
-            for if_ in node.ifs:
-                self.write(' if ')
-                self.visit(if_)
-
-    def visit_excepthandler(self, node):
-        self.newline()
-        self.write('except')
-        if node.type is not None:
-            self.write(' ')
-            self.visit(node.type)
-            if node.name is not None:
-                self.write(' as ')
-                self.visit(node.name)
-        self.write(':')
-        self.body(node.body)
diff --git a/lib/mako-0.7.2/mako/ast.py b/lib/mako-0.7.2/mako/ast.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/ast.py
+++ /dev/null
@@ -1,151 +0,0 @@
-# mako/ast.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""utilities for analyzing expressions and blocks of Python
-code, as well as generating Python from AST nodes"""
-
-from mako import exceptions, pyparser, util
-import re
-
-class PythonCode(object):
-    """represents information about a string containing Python code"""
-    def __init__(self, code, **exception_kwargs):
-        self.code = code
-
-        # represents all identifiers which are assigned to at some point in
-        # the code
-        self.declared_identifiers = set()
-
-        # represents all identifiers which are referenced before their
-        # assignment, if any
-        self.undeclared_identifiers = set()
-
-        # note that an identifier can be in both the undeclared and declared
-        # lists.
-
-        # using AST to parse instead of using code.co_varnames,
-        # code.co_names has several advantages:
-        # - we can locate an identifier as "undeclared" even if
-        # its declared later in the same block of code
-        # - AST is less likely to break with version changes
-        # (for example, the behavior of co_names changed a little bit
-        # in python version 2.5)
-        if isinstance(code, basestring):
-            expr = pyparser.parse(code.lstrip(), "exec", **exception_kwargs)
-        else:
-            expr = code
-
-        f = pyparser.FindIdentifiers(self, **exception_kwargs)
-        f.visit(expr)
-
-class ArgumentList(object):
-    """parses a fragment of code as a comma-separated list of expressions"""
-    def __init__(self, code, **exception_kwargs):
-        self.codeargs = []
-        self.args = []
-        self.declared_identifiers = set()
-        self.undeclared_identifiers = set()
-        if isinstance(code, basestring):
-            if re.match(r"\S", code) and not re.match(r",\s*$", code):
-                # if theres text and no trailing comma, insure its parsed
-                # as a tuple by adding a trailing comma
-                code  += ","
-            expr = pyparser.parse(code, "exec", **exception_kwargs)
-        else:
-            expr = code
-
-        f = pyparser.FindTuple(self, PythonCode, **exception_kwargs)
-        f.visit(expr)
-
-class PythonFragment(PythonCode):
-    """extends PythonCode to provide identifier lookups in partial control
-    statements
-
-    e.g.
-        for x in 5:
-        elif y==9:
-        except (MyException, e):
-    etc.
-    """
-    def __init__(self, code, **exception_kwargs):
-        m = re.match(r'^(\w+)(?:\s+(.*?))?:\s*(#|$)', code.strip(), re.S)
-        if not m:
-            raise exceptions.CompileException(
-                          "Fragment '%s' is not a partial control statement" %
-                          code, **exception_kwargs)
-        if m.group(3):
-            code = code[:m.start(3)]
-        (keyword, expr) = m.group(1,2)
-        if keyword in ['for','if', 'while']:
-            code = code + "pass"
-        elif keyword == 'try':
-            code = code + "pass\nexcept:pass"
-        elif keyword == 'elif' or keyword == 'else':
-            code = "if False:pass\n" + code + "pass"
-        elif keyword == 'except':
-            code = "try:pass\n" + code + "pass"
-        elif keyword == 'with':
-            code = code + "pass"
-        else:
-            raise exceptions.CompileException(
-                                "Unsupported control keyword: '%s'" %
-                                keyword, **exception_kwargs)
-        super(PythonFragment, self).__init__(code, **exception_kwargs)
-
-
-class FunctionDecl(object):
-    """function declaration"""
-    def __init__(self, code, allow_kwargs=True, **exception_kwargs):
-        self.code = code
-        expr = pyparser.parse(code, "exec", **exception_kwargs)
-
-        f = pyparser.ParseFunc(self, **exception_kwargs)
-        f.visit(expr)
-        if not hasattr(self, 'funcname'):
-            raise exceptions.CompileException(
-                              "Code '%s' is not a function declaration" % code,
-                              **exception_kwargs)
-        if not allow_kwargs and self.kwargs:
-            raise exceptions.CompileException(
-                                "'**%s' keyword argument not allowed here" %
-                                self.argnames[-1], **exception_kwargs)
-
-    def get_argument_expressions(self, include_defaults=True):
-        """return the argument declarations of this FunctionDecl as a printable
-        list."""
-
-        namedecls = []
-        defaults = [d for d in self.defaults]
-        kwargs = self.kwargs
-        varargs = self.varargs
-        argnames = [f for f in self.argnames]
-        argnames.reverse()
-        for arg in argnames:
-            default = None
-            if kwargs:
-                arg = "**" + arg
-                kwargs = False
-            elif varargs:
-                arg = "*" + arg
-                varargs = False
-            else:
-                default = len(defaults) and defaults.pop() or None
-            if include_defaults and default:
-                namedecls.insert(0, "%s=%s" %
-                            (arg,
-                            pyparser.ExpressionGenerator(default).value()
-                            )
-                        )
-            else:
-                namedecls.insert(0, arg)
-        return namedecls
-
-class FunctionArgs(FunctionDecl):
-    """the argument portion of a function declaration"""
-
-    def __init__(self, code, **kwargs):
-        super(FunctionArgs, self).__init__("def ANON(%s):pass" % code,
-                **kwargs)
diff --git a/lib/mako-0.7.2/mako/cache.py b/lib/mako-0.7.2/mako/cache.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/cache.py
+++ /dev/null
@@ -1,236 +0,0 @@
-# mako/cache.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-from mako import exceptions, util
-
-_cache_plugins = util.PluginLoader("mako.cache")
-
-register_plugin = _cache_plugins.register
-register_plugin("beaker", "mako.ext.beaker_cache", "BeakerCacheImpl")
-
-
-class Cache(object):
-    """Represents a data content cache made available to the module
-    space of a specific :class:`.Template` object.
-
-    .. versionadded:: 0.6
-       :class:`.Cache` by itself is mostly a
-       container for a :class:`.CacheImpl` object, which implements
-       a fixed API to provide caching services; specific subclasses exist to
-       implement different
-       caching strategies.   Mako includes a backend that works with
-       the Beaker caching system.   Beaker itself then supports
-       a number of backends (i.e. file, memory, memcached, etc.)
-
-    The construction of a :class:`.Cache` is part of the mechanics
-    of a :class:`.Template`, and programmatic access to this
-    cache is typically via the :attr:`.Template.cache` attribute.
-
-    """
-
-    impl = None
-    """Provide the :class:`.CacheImpl` in use by this :class:`.Cache`.
-
-    This accessor allows a :class:`.CacheImpl` with additional
-    methods beyond that of :class:`.Cache` to be used programmatically.
-
-    """
-
-    id = None
-    """Return the 'id' that identifies this cache.
-
-    This is a value that should be globally unique to the
-    :class:`.Template` associated with this cache, and can
-    be used by a caching system to name a local container
-    for data specific to this template.
-
-    """
-
-    starttime = None
-    """Epochal time value for when the owning :class:`.Template` was
-    first compiled.
-
-    A cache implementation may wish to invalidate data earlier than
-    this timestamp; this has the effect of the cache for a specific
-    :class:`.Template` starting clean any time the :class:`.Template`
-    is recompiled, such as when the original template file changed on
-    the filesystem.
-
-    """
-
-    def __init__(self, template, *args):
-        # check for a stale template calling the
-        # constructor
-        if isinstance(template, basestring) and args:
-            return
-        self.template = template
-        self.id = template.module.__name__
-        self.starttime = template.module._modified_time
-        self._def_regions = {}
-        self.impl = self._load_impl(self.template.cache_impl)
-
-    def _load_impl(self, name):
-        return _cache_plugins.load(name)(self)
-
-    def get_or_create(self, key, creation_function, **kw):
-        """Retrieve a value from the cache, using the given creation function
-        to generate a new value."""
-
-        return self._ctx_get_or_create(key, creation_function, None, **kw)
-
-    def _ctx_get_or_create(self, key, creation_function, context, **kw):
-        """Retrieve a value from the cache, using the given creation function
-        to generate a new value."""
-
-        if not self.template.cache_enabled:
-            return creation_function()
-
-        return self.impl.get_or_create(key,
-                        creation_function,
-                        **self._get_cache_kw(kw, context))
-
-    def set(self, key, value, **kw):
-        """Place a value in the cache.
-
-        :param key: the value's key.
-        :param value: the value.
-        :param \**kw: cache configuration arguments.
-
-        """
-
-        self.impl.set(key, value, **self._get_cache_kw(kw, None))
-
-    put = set
-    """A synonym for :meth:`.Cache.set`.
-
-    This is here for backwards compatibility.
-
-    """
-
-    def get(self, key, **kw):
-        """Retrieve a value from the cache.
-
-        :param key: the value's key.
-        :param \**kw: cache configuration arguments.  The
-         backend is configured using these arguments upon first request.
-         Subsequent requests that use the same series of configuration
-         values will use that same backend.
-
-        """
-        return self.impl.get(key, **self._get_cache_kw(kw, None))
-
-    def invalidate(self, key, **kw):
-        """Invalidate a value in the cache.
-
-        :param key: the value's key.
-        :param \**kw: cache configuration arguments.  The
-         backend is configured using these arguments upon first request.
-         Subsequent requests that use the same series of configuration
-         values will use that same backend.
-
-        """
-        self.impl.invalidate(key, **self._get_cache_kw(kw, None))
-
-    def invalidate_body(self):
-        """Invalidate the cached content of the "body" method for this
-        template.
-
-        """
-        self.invalidate('render_body', __M_defname='render_body')
-
-    def invalidate_def(self, name):
-        """Invalidate the cached content of a particular ``<%def>`` within this
-        template.
-
-        """
-
-        self.invalidate('render_%s' % name, __M_defname='render_%s' % name)
-
-    def invalidate_closure(self, name):
-        """Invalidate a nested ``<%def>`` within this template.
-
-        Caching of nested defs is a blunt tool as there is no
-        management of scope -- nested defs that use cache tags
-        need to have names unique of all other nested defs in the
-        template, else their content will be overwritten by
-        each other.
-
-        """
-
-        self.invalidate(name, __M_defname=name)
-
-    def _get_cache_kw(self, kw, context):
-        defname = kw.pop('__M_defname', None)
-        if not defname:
-            tmpl_kw = self.template.cache_args.copy()
-            tmpl_kw.update(kw)
-        elif defname in self._def_regions:
-            tmpl_kw = self._def_regions[defname]
-        else:
-            tmpl_kw = self.template.cache_args.copy()
-            tmpl_kw.update(kw)
-            self._def_regions[defname] = tmpl_kw
-        if context and self.impl.pass_context:
-            tmpl_kw = tmpl_kw.copy()
-            tmpl_kw.setdefault('context', context)
-        return tmpl_kw
-
-class CacheImpl(object):
-    """Provide a cache implementation for use by :class:`.Cache`."""
-
-    def __init__(self, cache):
-        self.cache = cache
-
-    pass_context = False
-    """If ``True``, the :class:`.Context` will be passed to
-    :meth:`get_or_create <.CacheImpl.get_or_create>` as the name ``'context'``.
-    """
-
-    def get_or_create(self, key, creation_function, **kw):
-        """Retrieve a value from the cache, using the given creation function
-        to generate a new value.
-
-        This function *must* return a value, either from
-        the cache, or via the given creation function.
-        If the creation function is called, the newly
-        created value should be populated into the cache
-        under the given key before being returned.
-
-        :param key: the value's key.
-        :param creation_function: function that when called generates
-         a new value.
-        :param \**kw: cache configuration arguments.
-
-        """
-        raise NotImplementedError()
-
-    def set(self, key, value, **kw):
-        """Place a value in the cache.
-
-        :param key: the value's key.
-        :param value: the value.
-        :param \**kw: cache configuration arguments.
-
-        """
-        raise NotImplementedError()
-
-    def get(self, key, **kw):
-        """Retrieve a value from the cache.
-
-        :param key: the value's key.
-        :param \**kw: cache configuration arguments.
-
-        """
-        raise NotImplementedError()
-
-    def invalidate(self, key, **kw):
-        """Invalidate a value in the cache.
-
-        :param key: the value's key.
-        :param \**kw: cache configuration arguments.
-
-        """
-        raise NotImplementedError()
diff --git a/lib/mako-0.7.2/mako/codegen.py b/lib/mako-0.7.2/mako/codegen.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/codegen.py
+++ /dev/null
@@ -1,1209 +0,0 @@
-# mako/codegen.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""provides functionality for rendering a parsetree constructing into module
-source code."""
-
-import time
-import re
-from mako.pygen import PythonPrinter
-from mako import util, ast, parsetree, filters, exceptions
-
-MAGIC_NUMBER = 8
-
-# names which are hardwired into the
-# template and are not accessed via the
-# context itself
-RESERVED_NAMES = set(['context', 'loop', 'UNDEFINED'])
-
-def compile(node,
-                uri,
-                filename=None,
-                default_filters=None,
-                buffer_filters=None,
-                imports=None,
-                source_encoding=None,
-                generate_magic_comment=True,
-                disable_unicode=False,
-                strict_undefined=False,
-                enable_loop=True,
-                reserved_names=()):
-
-    """Generate module source code given a parsetree node,
-      uri, and optional source filename"""
-
-    # if on Py2K, push the "source_encoding" string to be
-    # a bytestring itself, as we will be embedding it into
-    # the generated source and we don't want to coerce the
-    # result into a unicode object, in "disable_unicode" mode
-    if not util.py3k and isinstance(source_encoding, unicode):
-        source_encoding = source_encoding.encode(source_encoding)
-
-
-    buf = util.FastEncodingBuffer()
-
-    printer = PythonPrinter(buf)
-    _GenerateRenderMethod(printer,
-                            _CompileContext(uri,
-                                            filename,
-                                            default_filters,
-                                            buffer_filters,
-                                            imports,
-                                            source_encoding,
-                                            generate_magic_comment,
-                                            disable_unicode,
-                                            strict_undefined,
-                                            enable_loop,
-                                            reserved_names),
-                                node)
-    return buf.getvalue()
-
-class _CompileContext(object):
-    def __init__(self,
-                    uri,
-                    filename,
-                    default_filters,
-                    buffer_filters,
-                    imports,
-                    source_encoding,
-                    generate_magic_comment,
-                    disable_unicode,
-                    strict_undefined,
-                    enable_loop,
-                    reserved_names):
-        self.uri = uri
-        self.filename = filename
-        self.default_filters = default_filters
-        self.buffer_filters = buffer_filters
-        self.imports = imports
-        self.source_encoding = source_encoding
-        self.generate_magic_comment = generate_magic_comment
-        self.disable_unicode = disable_unicode
-        self.strict_undefined = strict_undefined
-        self.enable_loop = enable_loop
-        self.reserved_names = reserved_names
-
-class _GenerateRenderMethod(object):
-    """A template visitor object which generates the
-       full module source for a template.
-
-    """
-    def __init__(self, printer, compiler, node):
-        self.printer = printer
-        self.last_source_line = -1
-        self.compiler = compiler
-        self.node = node
-        self.identifier_stack = [None]
-
-        self.in_def = isinstance(node, (parsetree.DefTag, parsetree.BlockTag))
-
-        if self.in_def:
-            name = "render_%s" % node.funcname
-            args = node.get_argument_expressions()
-            filtered = len(node.filter_args.args) > 0
-            buffered = eval(node.attributes.get('buffered', 'False'))
-            cached = eval(node.attributes.get('cached', 'False'))
-            defs = None
-            pagetag = None
-            if node.is_block and not node.is_anonymous:
-                args += ['**pageargs']
-        else:
-            defs = self.write_toplevel()
-            pagetag = self.compiler.pagetag
-            name = "render_body"
-            if pagetag is not None:
-                args = pagetag.body_decl.get_argument_expressions()
-                if not pagetag.body_decl.kwargs:
-                    args += ['**pageargs']
-                cached = eval(pagetag.attributes.get('cached', 'False'))
-                self.compiler.enable_loop = self.compiler.enable_loop or eval(
-                                        pagetag.attributes.get(
-                                                'enable_loop', 'False')
-                                    )
-            else:
-                args = ['**pageargs']
-                cached = False
-            buffered = filtered = False
-        if args is None:
-            args = ['context']
-        else:
-            args = [a for a in ['context'] + args]
-
-        self.write_render_callable(
-                            pagetag or node,
-                            name, args,
-                            buffered, filtered, cached)
-
-        if defs is not None:
-            for node in defs:
-                _GenerateRenderMethod(printer, compiler, node)
-
-    @property
-    def identifiers(self):
-        return self.identifier_stack[-1]
-
-    def write_toplevel(self):
-        """Traverse a template structure for module-level directives and
-        generate the start of module-level code.
-
-        """
-        inherit = []
-        namespaces = {}
-        module_code = []
-        encoding =[None]
-
-        self.compiler.pagetag = None
-
-        class FindTopLevel(object):
-            def visitInheritTag(s, node):
-                inherit.append(node)
-            def visitNamespaceTag(s, node):
-                namespaces[node.name] = node
-            def visitPageTag(s, node):
-                self.compiler.pagetag = node
-            def visitCode(s, node):
-                if node.ismodule:
-                    module_code.append(node)
-
-        f = FindTopLevel()
-        for n in self.node.nodes:
-            n.accept_visitor(f)
-
-        self.compiler.namespaces = namespaces
-
-        module_ident = set()
-        for n in module_code:
-            module_ident = module_ident.union(n.declared_identifiers())
-
-        module_identifiers = _Identifiers(self.compiler)
-        module_identifiers.declared = module_ident
-
-        # module-level names, python code
-        if self.compiler.generate_magic_comment and \
-            self.compiler.source_encoding:
-            self.printer.writeline("# -*- encoding:%s -*-" %
-                                    self.compiler.source_encoding)
-
-        self.printer.writeline("from mako import runtime, filters, cache")
-        self.printer.writeline("UNDEFINED = runtime.UNDEFINED")
-        self.printer.writeline("__M_dict_builtin = dict")
-        self.printer.writeline("__M_locals_builtin = locals")
-        self.printer.writeline("_magic_number = %r" % MAGIC_NUMBER)
-        self.printer.writeline("_modified_time = %r" % time.time())
-        self.printer.writeline("_enable_loop = %r" % self.compiler.enable_loop)
-        self.printer.writeline(
-                            "_template_filename = %r" % self.compiler.filename)
-        self.printer.writeline("_template_uri = %r" % self.compiler.uri)
-        self.printer.writeline(
-                    "_source_encoding = %r" % self.compiler.source_encoding)
-        if self.compiler.imports:
-            buf = ''
-            for imp in self.compiler.imports:
-                buf += imp + "\n"
-                self.printer.writeline(imp)
-            impcode = ast.PythonCode(
-                            buf,
-                            source='', lineno=0,
-                            pos=0,
-                            filename='template defined imports')
-        else:
-            impcode = None
-
-        main_identifiers = module_identifiers.branch(self.node)
-        module_identifiers.topleveldefs = \
-            module_identifiers.topleveldefs.\
-                union(main_identifiers.topleveldefs)
-        module_identifiers.declared.add("UNDEFINED")
-        if impcode:
-            module_identifiers.declared.update(impcode.declared_identifiers)
-
-        self.compiler.identifiers = module_identifiers
-        self.printer.writeline("_exports = %r" %
-                            [n.name for n in
-                            main_identifiers.topleveldefs.values()]
-                        )
-        self.printer.write("\n\n")
-
-        if len(module_code):
-            self.write_module_code(module_code)
-
-        if len(inherit):
-            self.write_namespaces(namespaces)
-            self.write_inherit(inherit[-1])
-        elif len(namespaces):
-            self.write_namespaces(namespaces)
-
-        return main_identifiers.topleveldefs.values()
-
-    def write_render_callable(self, node, name, args, buffered, filtered,
-            cached):
-        """write a top-level render callable.
-
-        this could be the main render() method or that of a top-level def."""
-
-        if self.in_def:
-            decorator = node.decorator
-            if decorator:
-                self.printer.writeline(
-                                 "@runtime._decorate_toplevel(%s)" % decorator)
-
-        self.printer.writelines(
-            "def %s(%s):" % (name, ','.join(args)),
-                # push new frame, assign current frame to __M_caller
-                "__M_caller = context.caller_stack._push_frame()",
-                "try:"
-        )
-        if buffered or filtered or cached:
-            self.printer.writeline("context._push_buffer()")
-
-        self.identifier_stack.append(
-                                   self.compiler.identifiers.branch(self.node))
-        if (not self.in_def or self.node.is_block) and '**pageargs' in args:
-            self.identifier_stack[-1].argument_declared.add('pageargs')
-
-        if not self.in_def and (
-                                len(self.identifiers.locally_assigned) > 0 or
-                                len(self.identifiers.argument_declared) > 0
-                                ):
-            self.printer.writeline("__M_locals = __M_dict_builtin(%s)" %
-                                    ','.join([
-                                            "%s=%s" % (x, x) for x in
-                                            self.identifiers.argument_declared
-                                            ]))
-
-        self.write_variable_declares(self.identifiers, toplevel=True)
-
-        for n in self.node.nodes:
-            n.accept_visitor(self)
-
-        self.write_def_finish(self.node, buffered, filtered, cached)
-        self.printer.writeline(None)
-        self.printer.write("\n\n")
-        if cached:
-            self.write_cache_decorator(
-                                node, name,
-                                args, buffered,
-                                self.identifiers, toplevel=True)
-
-    def write_module_code(self, module_code):
-        """write module-level template code, i.e. that which
-        is enclosed in <%! %> tags in the template."""
-        for n in module_code:
-            self.write_source_comment(n)
-            self.printer.write_indented_block(n.text)
-
-    def write_inherit(self, node):
-        """write the module-level inheritance-determination callable."""
-
-        self.printer.writelines(
-            "def _mako_inherit(template, context):",
-                "_mako_generate_namespaces(context)",
-                "return runtime._inherit_from(context, %s, _template_uri)" %
-                 (node.parsed_attributes['file']),
-                None
-            )
-
-    def write_namespaces(self, namespaces):
-        """write the module-level namespace-generating callable."""
-        self.printer.writelines(
-            "def _mako_get_namespace(context, name):",
-                "try:",
-                    "return context.namespaces[(__name__, name)]",
-                "except KeyError:",
-                    "_mako_generate_namespaces(context)",
-                "return context.namespaces[(__name__, name)]",
-            None,None
-            )
-        self.printer.writeline("def _mako_generate_namespaces(context):")
-
-
-        for node in namespaces.values():
-            if node.attributes.has_key('import'):
-                self.compiler.has_ns_imports = True
-            self.write_source_comment(node)
-            if len(node.nodes):
-                self.printer.writeline("def make_namespace():")
-                export = []
-                identifiers = self.compiler.identifiers.branch(node)
-                self.in_def = True
-                class NSDefVisitor(object):
-                    def visitDefTag(s, node):
-                        s.visitDefOrBase(node)
-
-                    def visitBlockTag(s, node):
-                        s.visitDefOrBase(node)
-
-                    def visitDefOrBase(s, node):
-                        if node.is_anonymous:
-                            raise exceptions.CompileException(
-                                "Can't put anonymous blocks inside "
-                                "<%namespace>",
-                                **node.exception_kwargs
-                            )
-                        self.write_inline_def(node, identifiers, nested=False)
-                        export.append(node.funcname)
-                vis = NSDefVisitor()
-                for n in node.nodes:
-                    n.accept_visitor(vis)
-                self.printer.writeline("return [%s]" % (','.join(export)))
-                self.printer.writeline(None)
-                self.in_def = False
-                callable_name = "make_namespace()"
-            else:
-                callable_name = "None"
-
-            if 'file' in node.parsed_attributes:
-                self.printer.writeline(
-                                "ns = runtime.TemplateNamespace(%r,"
-                                " context._clean_inheritance_tokens(),"
-                                " templateuri=%s, callables=%s, "
-                                " calling_uri=_template_uri)" %
-                                (
-                                   node.name,
-                                   node.parsed_attributes.get('file', 'None'),
-                                   callable_name,
-                                )
-                            )
-            elif 'module' in node.parsed_attributes:
-                self.printer.writeline(
-                                "ns = runtime.ModuleNamespace(%r,"
-                                " context._clean_inheritance_tokens(),"
-                                " callables=%s, calling_uri=_template_uri,"
-                                " module=%s)" %
-                                (
-                                   node.name,
-                                   callable_name,
-                                   node.parsed_attributes.get('module', 'None')
-                                )
-                            )
-            else:
-                self.printer.writeline(
-                                "ns = runtime.Namespace(%r,"
-                                " context._clean_inheritance_tokens(),"
-                                " callables=%s, calling_uri=_template_uri)" %
-                                (
-                                    node.name,
-                                    callable_name,
-                                )
-                            )
-            if eval(node.attributes.get('inheritable', "False")):
-                self.printer.writeline("context['self'].%s = ns" % (node.name))
-
-            self.printer.writeline(
-                   "context.namespaces[(__name__, %s)] = ns" % repr(node.name))
-            self.printer.write("\n")
-        if not len(namespaces):
-            self.printer.writeline("pass")
-        self.printer.writeline(None)
-
-    def write_variable_declares(self, identifiers, toplevel=False, limit=None):
-        """write variable declarations at the top of a function.
-
-        the variable declarations are in the form of callable
-        definitions for defs and/or name lookup within the
-        function's context argument. the names declared are based
-        on the names that are referenced in the function body,
-        which don't otherwise have any explicit assignment
-        operation. names that are assigned within the body are
-        assumed to be locally-scoped variables and are not
-        separately declared.
-
-        for def callable definitions, if the def is a top-level
-        callable then a 'stub' callable is generated which wraps
-        the current Context into a closure. if the def is not
-        top-level, it is fully rendered as a local closure.
-
-        """
-
-        # collection of all defs available to us in this scope
-        comp_idents = dict([(c.funcname, c) for c in identifiers.defs])
-        to_write = set()
-
-        # write "context.get()" for all variables we are going to
-        # need that arent in the namespace yet
-        to_write = to_write.union(identifiers.undeclared)
-
-        # write closure functions for closures that we define
-        # right here
-        to_write = to_write.union(
-                        [c.funcname for c in identifiers.closuredefs.values()])
-
-        # remove identifiers that are declared in the argument
-        # signature of the callable
-        to_write = to_write.difference(identifiers.argument_declared)
-
-        # remove identifiers that we are going to assign to.
-        # in this way we mimic Python's behavior,
-        # i.e. assignment to a variable within a block
-        # means that variable is now a "locally declared" var,
-        # which cannot be referenced beforehand.
-        to_write = to_write.difference(identifiers.locally_declared)
-
-        if self.compiler.enable_loop:
-            has_loop = "loop" in to_write
-            to_write.discard("loop")
-        else:
-            has_loop = False
-
-        # if a limiting set was sent, constraint to those items in that list
-        # (this is used for the caching decorator)
-        if limit is not None:
-            to_write = to_write.intersection(limit)
-
-        if toplevel and getattr(self.compiler, 'has_ns_imports', False):
-            self.printer.writeline("_import_ns = {}")
-            self.compiler.has_imports = True
-            for ident, ns in self.compiler.namespaces.iteritems():
-                if ns.attributes.has_key('import'):
-                    self.printer.writeline(
-                            "_mako_get_namespace(context, %r)."\
-                                    "_populate(_import_ns, %r)" %
-                            (
-                                ident,
-                                re.split(r'\s*,\s*', ns.attributes['import'])
-                            ))
-
-        if has_loop:
-            self.printer.writeline(
-                'loop = __M_loop = runtime.LoopStack()'
-            )
-
-        for ident in to_write:
-            if ident in comp_idents:
-                comp = comp_idents[ident]
-                if comp.is_block:
-                    if not comp.is_anonymous:
-                        self.write_def_decl(comp, identifiers)
-                    else:
-                        self.write_inline_def(comp, identifiers, nested=True)
-                else:
-                    if comp.is_root():
-                        self.write_def_decl(comp, identifiers)
-                    else:
-                        self.write_inline_def(comp, identifiers, nested=True)
-
-            elif ident in self.compiler.namespaces:
-                self.printer.writeline(
-                            "%s = _mako_get_namespace(context, %r)" %
-                                (ident, ident)
-                            )
-            else:
-                if getattr(self.compiler, 'has_ns_imports', False):
-                    if self.compiler.strict_undefined:
-                        self.printer.writelines(
-                        "%s = _import_ns.get(%r, UNDEFINED)" %
-                        (ident, ident),
-                        "if %s is UNDEFINED:" % ident,
-                            "try:",
-                                "%s = context[%r]" % (ident, ident),
-                            "except KeyError:",
-                                "raise NameError(\"'%s' is not defined\")" %
-                                    ident,
-                            None, None
-                        )
-                    else:
-                        self.printer.writeline(
-                        "%s = _import_ns.get(%r, context.get(%r, UNDEFINED))" %
-                        (ident, ident, ident))
-                else:
-                    if self.compiler.strict_undefined:
-                        self.printer.writelines(
-                            "try:",
-                                "%s = context[%r]" % (ident, ident),
-                            "except KeyError:",
-                                "raise NameError(\"'%s' is not defined\")" %
-                                    ident,
-                            None
-                        )
-                    else:
-                        self.printer.writeline(
-                            "%s = context.get(%r, UNDEFINED)" % (ident, ident)
-                        )
-
-        self.printer.writeline("__M_writer = context.writer()")
-
-    def write_source_comment(self, node):
-        """write a source comment containing the line number of the
-        corresponding template line."""
-        if self.last_source_line != node.lineno:
-            self.printer.writeline("# SOURCE LINE %d" % node.lineno)
-            self.last_source_line = node.lineno
-
-    def write_def_decl(self, node, identifiers):
-        """write a locally-available callable referencing a top-level def"""
-        funcname = node.funcname
-        namedecls = node.get_argument_expressions()
-        nameargs = node.get_argument_expressions(include_defaults=False)
-
-        if not self.in_def and (
-                                len(self.identifiers.locally_assigned) > 0 or
-                                len(self.identifiers.argument_declared) > 0):
-            nameargs.insert(0, 'context.locals_(__M_locals)')
-        else:
-            nameargs.insert(0, 'context')
-        self.printer.writeline("def %s(%s):" % (funcname, ",".join(namedecls)))
-        self.printer.writeline(
-                       "return render_%s(%s)" % (funcname, ",".join(nameargs)))
-        self.printer.writeline(None)
-
-    def write_inline_def(self, node, identifiers, nested):
-        """write a locally-available def callable inside an enclosing def."""
-
-        namedecls = node.get_argument_expressions()
-
-        decorator = node.decorator
-        if decorator:
-            self.printer.writeline(
-                          "@runtime._decorate_inline(context, %s)" % decorator)
-        self.printer.writeline(
-                          "def %s(%s):" % (node.funcname, ",".join(namedecls)))
-        filtered = len(node.filter_args.args) > 0
-        buffered = eval(node.attributes.get('buffered', 'False'))
-        cached = eval(node.attributes.get('cached', 'False'))
-        self.printer.writelines(
-            # push new frame, assign current frame to __M_caller
-            "__M_caller = context.caller_stack._push_frame()",
-            "try:"
-            )
-        if buffered or filtered or cached:
-            self.printer.writelines(
-                "context._push_buffer()",
-                )
-
-        identifiers = identifiers.branch(node, nested=nested)
-
-        self.write_variable_declares(identifiers)
-
-        self.identifier_stack.append(identifiers)
-        for n in node.nodes:
-            n.accept_visitor(self)
-        self.identifier_stack.pop()
-
-        self.write_def_finish(node, buffered, filtered, cached)
-        self.printer.writeline(None)
-        if cached:
-            self.write_cache_decorator(node, node.funcname,
-                                        namedecls, False, identifiers,
-                                        inline=True, toplevel=False)
-
-    def write_def_finish(self, node, buffered, filtered, cached,
-            callstack=True):
-        """write the end section of a rendering function, either outermost or
-        inline.
-
-        this takes into account if the rendering function was filtered,
-        buffered, etc.  and closes the corresponding try: block if any, and
-        writes code to retrieve captured content, apply filters, send proper
-        return value."""
-
-        if not buffered and not cached and not filtered:
-            self.printer.writeline("return ''")
-            if callstack:
-                self.printer.writelines(
-                    "finally:",
-                        "context.caller_stack._pop_frame()",
-                    None
-                )
-
-        if buffered or filtered or cached:
-            if buffered or cached:
-                # in a caching scenario, don't try to get a writer
-                # from the context after popping; assume the caching
-                # implemenation might be using a context with no
-                # extra buffers
-                self.printer.writelines(
-                    "finally:",
-                        "__M_buf = context._pop_buffer()"
-                )
-            else:
-                self.printer.writelines(
-                   "finally:",
-                       "__M_buf, __M_writer = context._pop_buffer_and_writer()"
-                )
-
-            if callstack:
-                self.printer.writeline("context.caller_stack._pop_frame()")
-
-            s = "__M_buf.getvalue()"
-            if filtered:
-                s = self.create_filter_callable(node.filter_args.args, s,
-                                                False)
-            self.printer.writeline(None)
-            if buffered and not cached:
-                s = self.create_filter_callable(self.compiler.buffer_filters,
-                                                s, False)
-            if buffered or cached:
-                self.printer.writeline("return %s" % s)
-            else:
-                self.printer.writelines(
-                    "__M_writer(%s)" % s,
-                    "return ''"
-                )
-
-    def write_cache_decorator(self, node_or_pagetag, name,
-                                    args, buffered, identifiers,
-                                    inline=False, toplevel=False):
-        """write a post-function decorator to replace a rendering
-            callable with a cached version of itself."""
-
-        self.printer.writeline("__M_%s = %s" % (name, name))
-        cachekey = node_or_pagetag.parsed_attributes.get('cache_key',
-                                                         repr(name))
-
-        cache_args = {}
-        if self.compiler.pagetag is not None:
-            cache_args.update(
-                (
-                    pa[6:],
-                    self.compiler.pagetag.parsed_attributes[pa]
-                )
-                for pa in self.compiler.pagetag.parsed_attributes
-                if pa.startswith('cache_') and pa != 'cache_key'
-            )
-        cache_args.update(
-            (
-                pa[6:],
-                node_or_pagetag.parsed_attributes[pa]
-            ) for pa in node_or_pagetag.parsed_attributes
-            if pa.startswith('cache_') and pa != 'cache_key'
-        )
-        if 'timeout' in cache_args:
-            cache_args['timeout'] = int(eval(cache_args['timeout']))
-
-        self.printer.writeline("def %s(%s):" % (name, ','.join(args)))
-
-        # form "arg1, arg2, arg3=arg3, arg4=arg4", etc.
-        pass_args = [
-                        '=' in a and "%s=%s" % ((a.split('=')[0],)*2) or a
-                        for a in args
-                    ]
-
-        self.write_variable_declares(
-                            identifiers,
-                            toplevel=toplevel,
-                            limit=node_or_pagetag.undeclared_identifiers()
-                        )
-        if buffered:
-            s = "context.get('local')."\
-                "cache._ctx_get_or_create("\
-                "%s, lambda:__M_%s(%s),  context, %s__M_defname=%r)" % \
-                            (cachekey, name, ','.join(pass_args),
-                            ''.join(["%s=%s, " % (k,v)
-                            for k, v in cache_args.items()]),
-                            name
-                            )
-            # apply buffer_filters
-            s = self.create_filter_callable(self.compiler.buffer_filters, s,
-                                            False)
-            self.printer.writelines("return " + s,None)
-        else:
-            self.printer.writelines(
-                    "__M_writer(context.get('local')."
-                    "cache._ctx_get_or_create("\
-                    "%s, lambda:__M_%s(%s), context, %s__M_defname=%r))" %
-                    (cachekey, name, ','.join(pass_args),
-                    ''.join(["%s=%s, " % (k,v)
-                        for k, v in cache_args.items()]),
-                    name,
-                    ),
-                    "return ''",
-                None
-            )
-
-    def create_filter_callable(self, args, target, is_expression):
-        """write a filter-applying expression based on the filters
-        present in the given filter names, adjusting for the global
-        'default' filter aliases as needed."""
-
-        def locate_encode(name):
-            if re.match(r'decode\..+', name):
-                return "filters." + name
-            elif self.compiler.disable_unicode:
-                return filters.NON_UNICODE_ESCAPES.get(name, name)
-            else:
-                return filters.DEFAULT_ESCAPES.get(name, name)
-
-        if 'n' not in args:
-            if is_expression:
-                if self.compiler.pagetag:
-                    args = self.compiler.pagetag.filter_args.args + args
-                if self.compiler.default_filters:
-                    args = self.compiler.default_filters + args
-        for e in args:
-            # if filter given as a function, get just the identifier portion
-            if e == 'n':
-                continue
-            m = re.match(r'(.+?)(\(.*\))', e)
-            if m:
-                (ident, fargs) = m.group(1,2)
-                f = locate_encode(ident)
-                e = f + fargs
-            else:
-                x = e
-                e = locate_encode(e)
-                assert e is not None
-            target = "%s(%s)" % (e, target)
-        return target
-
-    def visitExpression(self, node):
-        self.write_source_comment(node)
-        if len(node.escapes) or \
-                (
-                    self.compiler.pagetag is not None and
-                    len(self.compiler.pagetag.filter_args.args)
-                ) or \
-                len(self.compiler.default_filters):
-
-            s = self.create_filter_callable(node.escapes_code.args,
-                                            "%s" % node.text, True)
-            self.printer.writeline("__M_writer(%s)" % s)
-        else:
-            self.printer.writeline("__M_writer(%s)" % node.text)
-
-    def visitControlLine(self, node):
-        if node.isend:
-            self.printer.writeline(None)
-            if node.has_loop_context:
-                self.printer.writeline('finally:')
-                self.printer.writeline("loop = __M_loop._exit()")
-                self.printer.writeline(None)
-        else:
-            self.write_source_comment(node)
-            if self.compiler.enable_loop and node.keyword == 'for':
-                text = mangle_mako_loop(node, self.printer)
-            else:
-                text = node.text
-            self.printer.writeline(text)
-            children = node.get_children()
-            # this covers the three situations where we want to insert a pass:
-            #    1) a ternary control line with no children,
-            #    2) a primary control line with nothing but its own ternary
-            #          and end control lines, and
-            #    3) any control line with no content other than comments
-            if not children or (
-                    util.all(isinstance(c, (parsetree.Comment,
-                                            parsetree.ControlLine))
-                             for c in children) and
-                    util.all((node.is_ternary(c.keyword) or c.isend)
-                             for c in children
-                             if isinstance(c, parsetree.ControlLine))):
-                self.printer.writeline("pass")
-
-    def visitText(self, node):
-        self.write_source_comment(node)
-        self.printer.writeline("__M_writer(%s)" % repr(node.content))
-
-    def visitTextTag(self, node):
-        filtered = len(node.filter_args.args) > 0
-        if filtered:
-            self.printer.writelines(
-                "__M_writer = context._push_writer()",
-                "try:",
-            )
-        for n in node.nodes:
-            n.accept_visitor(self)
-        if filtered:
-            self.printer.writelines(
-                "finally:",
-                "__M_buf, __M_writer = context._pop_buffer_and_writer()",
-                "__M_writer(%s)" %
-                self.create_filter_callable(
-                                node.filter_args.args,
-                                "__M_buf.getvalue()",
-                                False),
-                None
-                )
-
-    def visitCode(self, node):
-        if not node.ismodule:
-            self.write_source_comment(node)
-            self.printer.write_indented_block(node.text)
-
-            if not self.in_def and len(self.identifiers.locally_assigned) > 0:
-                # if we are the "template" def, fudge locally
-                # declared/modified variables into the "__M_locals" dictionary,
-                # which is used for def calls within the same template,
-                # to simulate "enclosing scope"
-                self.printer.writeline(
-                      '__M_locals_builtin_stored = __M_locals_builtin()')
-                self.printer.writeline(
-                      '__M_locals.update(__M_dict_builtin([(__M_key,'
-                      ' __M_locals_builtin_stored[__M_key]) for __M_key in'
-                      ' [%s] if __M_key in __M_locals_builtin_stored]))' %
-                      ','.join([repr(x) for x in node.declared_identifiers()]))
-
-    def visitIncludeTag(self, node):
-        self.write_source_comment(node)
-        args = node.attributes.get('args')
-        if args:
-            self.printer.writeline(
-                      "runtime._include_file(context, %s, _template_uri, %s)" %
-                      (node.parsed_attributes['file'], args))
-        else:
-            self.printer.writeline(
-                        "runtime._include_file(context, %s, _template_uri)" %
-                        (node.parsed_attributes['file']))
-
-    def visitNamespaceTag(self, node):
-        pass
-
-    def visitDefTag(self, node):
-        pass
-
-    def visitBlockTag(self, node):
-        if node.is_anonymous:
-            self.printer.writeline("%s()" % node.funcname)
-        else:
-            nameargs = node.get_argument_expressions(include_defaults=False)
-            nameargs += ['**pageargs']
-            self.printer.writeline("if 'parent' not in context._data or "
-                                  "not hasattr(context._data['parent'], '%s'):"
-                                  % node.funcname)
-            self.printer.writeline(
-                "context['self'].%s(%s)" % (node.funcname, ",".join(nameargs)))
-            self.printer.writeline("\n")
-
-    def visitCallNamespaceTag(self, node):
-        # TODO: we can put namespace-specific checks here, such
-        # as ensure the given namespace will be imported,
-        # pre-import the namespace, etc.
-        self.visitCallTag(node)
-
-    def visitCallTag(self, node):
-        self.printer.writeline("def ccall(caller):")
-        export = ['body']
-        callable_identifiers = self.identifiers.branch(node, nested=True)
-        body_identifiers = callable_identifiers.branch(node, nested=False)
-        # we want the 'caller' passed to ccall to be used
-        # for the body() function, but for other non-body()
-        # <%def>s within <%call> we want the current caller
-        # off the call stack (if any)
-        body_identifiers.add_declared('caller')
-
-        self.identifier_stack.append(body_identifiers)
-        class DefVisitor(object):
-            def visitDefTag(s, node):
-                s.visitDefOrBase(node)
-
-            def visitBlockTag(s, node):
-                s.visitDefOrBase(node)
-
-            def visitDefOrBase(s, node):
-                self.write_inline_def(node, callable_identifiers, nested=False)
-                if not node.is_anonymous:
-                    export.append(node.funcname)
-                # remove defs that are within the <%call> from the
-                # "closuredefs" defined in the body, so they dont render twice
-                if node.funcname in body_identifiers.closuredefs:
-                    del body_identifiers.closuredefs[node.funcname]
-
-        vis = DefVisitor()
-        for n in node.nodes:
-            n.accept_visitor(vis)
-        self.identifier_stack.pop()
-
-        bodyargs = node.body_decl.get_argument_expressions()
-        self.printer.writeline("def body(%s):" % ','.join(bodyargs))
-
-        # TODO: figure out best way to specify
-        # buffering/nonbuffering (at call time would be better)
-        buffered = False
-        if buffered:
-            self.printer.writelines(
-                "context._push_buffer()",
-                "try:"
-            )
-        self.write_variable_declares(body_identifiers)
-        self.identifier_stack.append(body_identifiers)
-
-        for n in node.nodes:
-            n.accept_visitor(self)
-        self.identifier_stack.pop()
-
-        self.write_def_finish(node, buffered, False, False, callstack=False)
-        self.printer.writelines(
-            None,
-            "return [%s]" % (','.join(export)),
-            None
-        )
-
-        self.printer.writelines(
-            # push on caller for nested call
-            "context.caller_stack.nextcaller = "
-                "runtime.Namespace('caller', context, "
-                                  "callables=ccall(__M_caller))",
-            "try:")
-        self.write_source_comment(node)
-        self.printer.writelines(
-                "__M_writer(%s)" % self.create_filter_callable(
-                                                    [], node.expression, True),
-            "finally:",
-                "context.caller_stack.nextcaller = None",
-            None
-        )
-
-class _Identifiers(object):
-    """tracks the status of identifier names as template code is rendered."""
-
-    def __init__(self, compiler, node=None, parent=None, nested=False):
-        if parent is not None:
-            # if we are the branch created in write_namespaces(),
-            # we don't share any context from the main body().
-            if isinstance(node, parsetree.NamespaceTag):
-                self.declared = set()
-                self.topleveldefs = util.SetLikeDict()
-            else:
-                # things that have already been declared
-                # in an enclosing namespace (i.e. names we can just use)
-                self.declared = set(parent.declared).\
-                         union([c.name for c in parent.closuredefs.values()]).\
-                         union(parent.locally_declared).\
-                         union(parent.argument_declared)
-
-                # if these identifiers correspond to a "nested"
-                # scope, it means whatever the parent identifiers
-                # had as undeclared will have been declared by that parent,
-                # and therefore we have them in our scope.
-                if nested:
-                    self.declared = self.declared.union(parent.undeclared)
-
-                # top level defs that are available
-                self.topleveldefs = util.SetLikeDict(**parent.topleveldefs)
-        else:
-            self.declared = set()
-            self.topleveldefs = util.SetLikeDict()
-
-        self.compiler = compiler
-
-        # things within this level that are referenced before they
-        # are declared (e.g. assigned to)
-        self.undeclared = set()
-
-        # things that are declared locally.  some of these things
-        # could be in the "undeclared" list as well if they are
-        # referenced before declared
-        self.locally_declared = set()
-
-        # assignments made in explicit python blocks.
-        # these will be propagated to
-        # the context of local def calls.
-        self.locally_assigned = set()
-
-        # things that are declared in the argument
-        # signature of the def callable
-        self.argument_declared = set()
-
-        # closure defs that are defined in this level
-        self.closuredefs = util.SetLikeDict()
-
-        self.node = node
-
-        if node is not None:
-            node.accept_visitor(self)
-
-        illegal_names = self.compiler.reserved_names.intersection(
-                                                         self.locally_declared)
-        if illegal_names:
-            raise exceptions.NameConflictError(
-                "Reserved words declared in template: %s" %
-                ", ".join(illegal_names))
-
-
-    def branch(self, node, **kwargs):
-        """create a new Identifiers for a new Node, with
-          this Identifiers as the parent."""
-
-        return _Identifiers(self.compiler, node, self, **kwargs)
-
-    @property
-    def defs(self):
-        return set(self.topleveldefs.union(self.closuredefs).values())
-
-    def __repr__(self):
-        return "Identifiers(declared=%r, locally_declared=%r, "\
-                "undeclared=%r, topleveldefs=%r, closuredefs=%r, "\
-                "argumentdeclared=%r)" %\
-                (
-                    list(self.declared),
-                    list(self.locally_declared),
-                    list(self.undeclared),
-                    [c.name for c in self.topleveldefs.values()],
-                    [c.name for c in self.closuredefs.values()],
-                    self.argument_declared)
-
-    def check_declared(self, node):
-        """update the state of this Identifiers with the undeclared
-            and declared identifiers of the given node."""
-
-        for ident in node.undeclared_identifiers():
-            if ident != 'context' and\
-                       ident not in self.declared.union(self.locally_declared):
-                self.undeclared.add(ident)
-        for ident in node.declared_identifiers():
-            self.locally_declared.add(ident)
-
-    def add_declared(self, ident):
-        self.declared.add(ident)
-        if ident in self.undeclared:
-            self.undeclared.remove(ident)
-
-    def visitExpression(self, node):
-        self.check_declared(node)
-
-    def visitControlLine(self, node):
-        self.check_declared(node)
-
-    def visitCode(self, node):
-        if not node.ismodule:
-            self.check_declared(node)
-            self.locally_assigned = self.locally_assigned.union(
-                                                   node.declared_identifiers())
-
-    def visitNamespaceTag(self, node):
-        # only traverse into the sub-elements of a
-        # <%namespace> tag if we are the branch created in
-        # write_namespaces()
-        if self.node is node:
-            for n in node.nodes:
-                n.accept_visitor(self)
-
-    def _check_name_exists(self, collection, node):
-        existing = collection.get(node.funcname)
-        collection[node.funcname] = node
-        if existing is not None and \
-            existing is not node and \
-            (node.is_block or existing.is_block):
-            raise exceptions.CompileException(
-                    "%%def or %%block named '%s' already "
-                    "exists in this template." %
-                    node.funcname, **node.exception_kwargs)
-
-    def visitDefTag(self, node):
-        if node.is_root() and not node.is_anonymous:
-            self._check_name_exists(self.topleveldefs, node)
-        elif node is not self.node:
-            self._check_name_exists(self.closuredefs, node)
-
-        for ident in node.undeclared_identifiers():
-            if ident != 'context' and\
-                       ident not in self.declared.union(self.locally_declared):
-                self.undeclared.add(ident)
-
-        # visit defs only one level deep
-        if node is self.node:
-            for ident in node.declared_identifiers():
-                self.argument_declared.add(ident)
-
-            for n in node.nodes:
-                n.accept_visitor(self)
-
-    def visitBlockTag(self, node):
-        if node is not self.node and \
-            not node.is_anonymous:
-
-            if isinstance(self.node, parsetree.DefTag):
-                raise exceptions.CompileException(
-                        "Named block '%s' not allowed inside of def '%s'"
-                        % (node.name, self.node.name), **node.exception_kwargs)
-            elif isinstance(self.node,
-                            (parsetree.CallTag, parsetree.CallNamespaceTag)):
-                raise exceptions.CompileException(
-                        "Named block '%s' not allowed inside of <%%call> tag"
-                        % (node.name, ), **node.exception_kwargs)
-
-        for ident in node.undeclared_identifiers():
-            if ident != 'context' and\
-                       ident not in self.declared.union(self.locally_declared):
-                self.undeclared.add(ident)
-
-        if not node.is_anonymous:
-            self._check_name_exists(self.topleveldefs, node)
-            self.undeclared.add(node.funcname)
-        elif node is not self.node:
-            self._check_name_exists(self.closuredefs, node)
-        for ident in node.declared_identifiers():
-            self.argument_declared.add(ident)
-        for n in node.nodes:
-            n.accept_visitor(self)
-
-    def visitIncludeTag(self, node):
-        self.check_declared(node)
-
-    def visitPageTag(self, node):
-        for ident in node.declared_identifiers():
-            self.argument_declared.add(ident)
-        self.check_declared(node)
-
-    def visitCallNamespaceTag(self, node):
-        self.visitCallTag(node)
-
-    def visitCallTag(self, node):
-        if node is self.node:
-            for ident in node.undeclared_identifiers():
-                if ident != 'context' and\
-                       ident not in self.declared.union(self.locally_declared):
-                    self.undeclared.add(ident)
-            for ident in node.declared_identifiers():
-                self.argument_declared.add(ident)
-            for n in node.nodes:
-                n.accept_visitor(self)
-        else:
-            for ident in node.undeclared_identifiers():
-                if ident != 'context' and\
-                       ident not in self.declared.union(self.locally_declared):
-                    self.undeclared.add(ident)
-
-
-_FOR_LOOP = re.compile(
-        r'^for\s+((?:\(?)\s*[A-Za-z_][A-Za-z_0-9]*'
-        r'(?:\s*,\s*(?:[A-Za-z_][A-Za-z0-9_]*),??)*\s*(?:\)?))\s+in\s+(.*):'
-    )
-
-def mangle_mako_loop(node, printer):
-    """converts a for loop into a context manager wrapped around a for loop
-    when access to the `loop` variable has been detected in the for loop body
-    """
-    loop_variable = LoopVariable()
-    node.accept_visitor(loop_variable)
-    if loop_variable.detected:
-        node.nodes[-1].has_loop_context = True
-        match = _FOR_LOOP.match(node.text)
-        if match:
-            printer.writelines(
-                    'loop = __M_loop._enter(%s)' % match.group(2),
-                    'try:'
-                    #'with __M_loop(%s) as loop:' % match.group(2)
-                )
-            text = 'for %s in loop:' % match.group(1)
-        else:
-            raise SyntaxError("Couldn't apply loop context: %s" % node.text)
-    else:
-        text = node.text
-    return text
-
-
-class LoopVariable(object):
-    """A node visitor which looks for the name 'loop' within undeclared
-    identifiers."""
-
-    def __init__(self):
-        self.detected = False
-
-    def _loop_reference_detected(self, node):
-        if 'loop' in node.undeclared_identifiers():
-            self.detected = True
-        else:
-            for n in node.get_children():
-                n.accept_visitor(self)
-
-    def visitControlLine(self, node):
-        self._loop_reference_detected(node)
-
-    def visitCode(self, node):
-        self._loop_reference_detected(node)
-
-    def visitExpression(self, node):
-        self._loop_reference_detected(node)
diff --git a/lib/mako-0.7.2/mako/exceptions.py b/lib/mako-0.7.2/mako/exceptions.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/exceptions.py
+++ /dev/null
@@ -1,362 +0,0 @@
-# mako/exceptions.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""exception classes"""
-
-import traceback, sys, re
-from mako import util
-
-class MakoException(Exception):
-    pass
-
-class RuntimeException(MakoException):
-    pass
-
-def _format_filepos(lineno, pos, filename):
-    if filename is None:
-        return " at line: %d char: %d" % (lineno, pos)
-    else:
-        return " in file '%s' at line: %d char: %d" % (filename, lineno, pos)
-
-
-class CompileException(MakoException):
-    def __init__(self, message, source, lineno, pos, filename):
-        MakoException.__init__(self,
-                              message + _format_filepos(lineno, pos, filename))
-        self.lineno =lineno
-        self.pos = pos
-        self.filename = filename
-        self.source = source
-
-class SyntaxException(MakoException):
-    def __init__(self, message, source, lineno, pos, filename):
-        MakoException.__init__(self,
-                              message + _format_filepos(lineno, pos, filename))
-        self.lineno =lineno
-        self.pos = pos
-        self.filename = filename
-        self.source = source
-
-class UnsupportedError(MakoException):
-    """raised when a retired feature is used."""
-
-class NameConflictError(MakoException):
-    """raised when a reserved word is used inappropriately"""
-
-class TemplateLookupException(MakoException):
-    pass
-
-class TopLevelLookupException(TemplateLookupException):
-    pass
-
-class RichTraceback(object):
-    """Pull the current exception from the ``sys`` traceback and extracts
-    Mako-specific template information.
-
-    See the usage examples in :ref:`handling_exceptions`.
-
-    """
-    def __init__(self, error=None, traceback=None):
-        self.source, self.lineno = "", 0
-
-        if error is None or traceback is None:
-            t, value, tback = sys.exc_info()
-
-        if error is None:
-            error = value or t
-
-        if traceback is None:
-            traceback = tback
-
-        self.error = error
-        self.records = self._init(traceback)
-
-        if isinstance(self.error, (CompileException, SyntaxException)):
-            import mako.template
-            self.source = self.error.source
-            self.lineno = self.error.lineno
-            self._has_source = True
-
-        self._init_message()
-
-    @property
-    def errorname(self):
-        return util.exception_name(self.error)
-
-    def _init_message(self):
-        """Find a unicode representation of self.error"""
-        try:
-            self.message = unicode(self.error)
-        except UnicodeError:
-            try:
-                self.message = str(self.error)
-            except UnicodeEncodeError:
-                # Fallback to args as neither unicode nor
-                # str(Exception(u'\xe6')) work in Python < 2.6
-                self.message = self.error.args[0]
-        if not isinstance(self.message, unicode):
-            self.message = unicode(self.message, 'ascii', 'replace')
-
-    def _get_reformatted_records(self, records):
-        for rec in records:
-            if rec[6] is not None:
-                yield (rec[4], rec[5], rec[2], rec[6])
-            else:
-                yield tuple(rec[0:4])
-
-    @property
-    def traceback(self):
-        """Return a list of 4-tuple traceback records (i.e. normal python
-        format) with template-corresponding lines remapped to the originating
-        template.
-
-        """
-        return list(self._get_reformatted_records(self.records))
-
-    @property
-    def reverse_records(self):
-        return reversed(self.records)
-
-    @property
-    def reverse_traceback(self):
-        """Return the same data as traceback, except in reverse order.
-        """
-
-        return list(self._get_reformatted_records(self.reverse_records))
-
-    def _init(self, trcback):
-        """format a traceback from sys.exc_info() into 7-item tuples,
-        containing the regular four traceback tuple items, plus the original
-        template filename, the line number adjusted relative to the template
-        source, and code line from that line number of the template."""
-
-        import mako.template
-        mods = {}
-        rawrecords = traceback.extract_tb(trcback)
-        new_trcback = []
-        for filename, lineno, function, line in rawrecords:
-            if not line:
-                line = ''
-            try:
-                (line_map, template_lines) = mods[filename]
-            except KeyError:
-                try:
-                    info = mako.template._get_module_info(filename)
-                    module_source = info.code
-                    template_source = info.source
-                    template_filename = info.template_filename or filename
-                except KeyError:
-                    # A normal .py file (not a Template)
-                    if not util.py3k:
-                        try:
-                            fp = open(filename, 'rb')
-                            encoding = util.parse_encoding(fp)
-                            fp.close()
-                        except IOError:
-                            encoding = None
-                        if encoding:
-                            line = line.decode(encoding)
-                        else:
-                            line = line.decode('ascii', 'replace')
-                    new_trcback.append((filename, lineno, function, line,
-                                            None, None, None, None))
-                    continue
-
-                template_ln = module_ln = 1
-                line_map = {}
-                for line in module_source.split("\n"):
-                    match = re.match(r'\s*# SOURCE LINE (\d+)', line)
-                    if match:
-                        template_ln = int(match.group(1))
-                    module_ln += 1
-                    line_map[module_ln] = template_ln
-                template_lines = [line for line in
-                                    template_source.split("\n")]
-                mods[filename] = (line_map, template_lines)
-
-            template_ln = line_map[lineno]
-            if template_ln <= len(template_lines):
-                template_line = template_lines[template_ln - 1]
-            else:
-                template_line = None
-            new_trcback.append((filename, lineno, function,
-                                line, template_filename, template_ln,
-                                template_line, template_source))
-        if not self.source:
-            for l in range(len(new_trcback)-1, 0, -1):
-                if new_trcback[l][5]:
-                    self.source = new_trcback[l][7]
-                    self.lineno = new_trcback[l][5]
-                    break
-            else:
-                if new_trcback:
-                    try:
-                        # A normal .py file (not a Template)
-                        fp = open(new_trcback[-1][0], 'rb')
-                        encoding = util.parse_encoding(fp)
-                        fp.seek(0)
-                        self.source = fp.read()
-                        fp.close()
-                        if encoding:
-                            self.source = self.source.decode(encoding)
-                    except IOError:
-                        self.source = ''
-                    self.lineno = new_trcback[-1][1]
-        return new_trcback
-
-
-def text_error_template(lookup=None):
-    """Provides a template that renders a stack trace in a similar format to
-    the Python interpreter, substituting source template filenames, line
-    numbers and code for that of the originating source template, as
-    applicable.
-
-    """
-    import mako.template
-    return mako.template.Template(r"""
-<%page args="error=None, traceback=None"/>
-<%!
-    from mako.exceptions import RichTraceback
-%>\
-<%
-    tback = RichTraceback(error=error, traceback=traceback)
-%>\
-Traceback (most recent call last):
-% for (filename, lineno, function, line) in tback.traceback:
-  File "${filename}", line ${lineno}, in ${function or '?'}
-    ${line | trim}
-% endfor
-${tback.errorname}: ${tback.message}
-""")
-
-
-try:
-    from mako.ext.pygmentplugin import syntax_highlight,\
-            pygments_html_formatter
-except ImportError:
-    from mako.filters import html_escape
-    pygments_html_formatter = None
-    def syntax_highlight(filename='', language=None):
-        return html_escape
-
-def html_error_template():
-    """Provides a template that renders a stack trace in an HTML format,
-    providing an excerpt of code as well as substituting source template
-    filenames, line numbers and code for that of the originating source
-    template, as applicable.
-
-    The template's default ``encoding_errors`` value is ``'htmlentityreplace'``. The
-    template has two options. With the ``full`` option disabled, only a section of
-    an HTML document is returned. With the ``css`` option disabled, the default
-    stylesheet won't be included.
-
-    """
-    import mako.template
-    return mako.template.Template(r"""
-<%!
-    from mako.exceptions import RichTraceback, syntax_highlight,\
-            pygments_html_formatter
-%>
-<%page args="full=True, css=True, error=None, traceback=None"/>
-% if full:
-<html>
-<head>
-    <title>Mako Runtime Error</title>
-% endif
-% if css:
-    <style>
-        body { font-family:verdana; margin:10px 30px 10px 30px;}
-        .stacktrace { margin:5px 5px 5px 5px; }
-        .highlight { padding:0px 10px 0px 10px; background-color:#9F9FDF; }
-        .nonhighlight { padding:0px; background-color:#DFDFDF; }
-        .sample { padding:10px; margin:10px 10px 10px 10px;
-                  font-family:monospace; }
-        .sampleline { padding:0px 10px 0px 10px; }
-        .sourceline { margin:5px 5px 10px 5px; font-family:monospace;}
-        .location { font-size:80%; }
-        .highlight { white-space:pre; }
-        .sampleline { white-space:pre; }
-
-    % if pygments_html_formatter:
-        ${pygments_html_formatter.get_style_defs()}
-        .linenos { min-width: 2.5em; text-align: right; }
-        pre { margin: 0; }
-        .syntax-highlighted { padding: 0 10px; }
-        .syntax-highlightedtable { border-spacing: 1px; }
-        .nonhighlight { border-top: 1px solid #DFDFDF;
-                        border-bottom: 1px solid #DFDFDF; }
-        .stacktrace .nonhighlight { margin: 5px 15px 10px; }
-        .sourceline { margin: 0 0; font-family:monospace; }
-        .code { background-color: #F8F8F8; width: 100%; }
-        .error .code { background-color: #FFBDBD; }
-        .error .syntax-highlighted { background-color: #FFBDBD; }
-    % endif
-
-    </style>
-% endif
-% if full:
-</head>
-<body>
-% endif
-
-<h2>Error !</h2>
-<%
-    tback = RichTraceback(error=error, traceback=traceback)
-    src = tback.source
-    line = tback.lineno
-    if src:
-        lines = src.split('\n')
-    else:
-        lines = None
-%>
-<h3>${tback.errorname}: ${tback.message|h}</h3>
-
-% if lines:
-    <div class="sample">
-    <div class="nonhighlight">
-% for index in range(max(0, line-4),min(len(lines), line+5)):
-    <%
-       if pygments_html_formatter:
-           pygments_html_formatter.linenostart = index + 1
-    %>
-    % if index + 1 == line:
-    <%
-       if pygments_html_formatter:
-           old_cssclass = pygments_html_formatter.cssclass
-           pygments_html_formatter.cssclass = 'error ' + old_cssclass
-    %>
-        ${lines[index] | syntax_highlight(language='mako')}
-    <%
-       if pygments_html_formatter:
-           pygments_html_formatter.cssclass = old_cssclass
-    %>
-    % else:
-        ${lines[index] | syntax_highlight(language='mako')}
-    % endif
-% endfor
-    </div>
-    </div>
-% endif
-
-<div class="stacktrace">
-% for (filename, lineno, function, line) in tback.reverse_traceback:
-    <div class="location">${filename}, line ${lineno}:</div>
-    <div class="nonhighlight">
-    <%
-       if pygments_html_formatter:
-           pygments_html_formatter.linenostart = lineno
-    %>
-      <div class="sourceline">${line | syntax_highlight(filename)}</div>
-    </div>
-% endfor
-</div>
-
-% if full:
-</body>
-</html>
-% endif
-""", output_encoding=sys.getdefaultencoding(),
-        encoding_errors='htmlentityreplace')
diff --git a/lib/mako-0.7.2/mako/ext/__init__.py b/lib/mako-0.7.2/mako/ext/__init__.py
deleted file mode 100644
diff --git a/lib/mako-0.7.2/mako/ext/autohandler.py b/lib/mako-0.7.2/mako/ext/autohandler.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/ext/autohandler.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# ext/autohandler.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""adds autohandler functionality to Mako templates.
-
-requires that the TemplateLookup class is used with templates.
-
-usage:
-
-<%!
-    from mako.ext.autohandler import autohandler
-%>
-<%inherit file="${autohandler(template, context)}"/>
-
-
-or with custom autohandler filename:
-
-<%!
-    from mako.ext.autohandler import autohandler
-%>
-<%inherit file="${autohandler(template, context, name='somefilename')}"/>
-
-"""
-
-import posixpath, os, re
-
-def autohandler(template, context, name='autohandler'):
-    lookup = context.lookup
-    _template_uri = template.module._template_uri
-    if not lookup.filesystem_checks:
-        try:
-            return lookup._uri_cache[(autohandler, _template_uri, name)]
-        except KeyError:
-            pass
-
-    tokens = re.findall(r'([^/]+)', posixpath.dirname(_template_uri)) + [name]
-    while len(tokens):
-        path = '/' + '/'.join(tokens)
-        if path != _template_uri and _file_exists(lookup, path):
-            if not lookup.filesystem_checks:
-                return lookup._uri_cache.setdefault(
-                            (autohandler, _template_uri, name), path)
-            else:
-                return path
-        if len(tokens) == 1:
-            break
-        tokens[-2:] = [name]
- 
-    if not lookup.filesystem_checks:
-        return lookup._uri_cache.setdefault(
-                            (autohandler, _template_uri, name), None)
-    else:
-        return None
-
-def _file_exists(lookup, path):
-    psub = re.sub(r'^/', '',path)
-    for d in lookup.directories:
-        if os.path.exists(d + '/' + psub):
-            return True
-    else:
-        return False
- 
diff --git a/lib/mako-0.7.2/mako/ext/babelplugin.py b/lib/mako-0.7.2/mako/ext/babelplugin.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/ext/babelplugin.py
+++ /dev/null
@@ -1,132 +0,0 @@
-# ext/babelplugin.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""gettext message extraction via Babel: http://babel.edgewall.org/"""
-from StringIO import StringIO
-
-from babel.messages.extract import extract_python
-
-from mako import lexer, parsetree
-
-def extract(fileobj, keywords, comment_tags, options):
-    """Extract messages from Mako templates.
-
-    :param fileobj: the file-like object the messages should be extracted from
-    :param keywords: a list of keywords (i.e. function names) that should be
-                     recognized as translation functions
-    :param comment_tags: a list of translator tags to search for and include
-                         in the results
-    :param options: a dictionary of additional options (optional)
-    :return: an iterator over ``(lineno, funcname, message, comments)`` tuples
-    :rtype: ``iterator``
-    """
-    encoding = options.get('input_encoding', options.get('encoding', None))
-
-    template_node = lexer.Lexer(fileobj.read(),
-                                input_encoding=encoding).parse()
-    for extracted in extract_nodes(template_node.get_children(),
-                                   keywords, comment_tags, options):
-        yield extracted
-
-def extract_nodes(nodes, keywords, comment_tags, options):
-    """Extract messages from Mako's lexer node objects
-
-    :param nodes: an iterable of Mako parsetree.Node objects to extract from
-    :param keywords: a list of keywords (i.e. function names) that should be
-                     recognized as translation functions
-    :param comment_tags: a list of translator tags to search for and include
-                         in the results
-    :param options: a dictionary of additional options (optional)
-    :return: an iterator over ``(lineno, funcname, message, comments)`` tuples
-    :rtype: ``iterator``
-    """
-    translator_comments = []
-    in_translator_comments = False
-
-    for node in nodes:
-        child_nodes = None
-        if in_translator_comments and isinstance(node, parsetree.Text) and \
-                not node.content.strip():
-            # Ignore whitespace within translator comments
-            continue
-
-        if isinstance(node, parsetree.Comment):
-            value = node.text.strip()
-            if in_translator_comments:
-                translator_comments.extend(_split_comment(node.lineno, value))
-                continue
-            for comment_tag in comment_tags:
-                if value.startswith(comment_tag):
-                    in_translator_comments = True
-                    translator_comments.extend(_split_comment(node.lineno,
-                                                              value))
-            continue
-
-        if isinstance(node, parsetree.DefTag):
-            code = node.function_decl.code
-            child_nodes = node.nodes
-        elif isinstance(node, parsetree.BlockTag):
-            code = node.body_decl.code
-            child_nodes = node.nodes
-        elif isinstance(node, parsetree.CallTag):
-            code = node.code.code
-            child_nodes = node.nodes
-        elif isinstance(node, parsetree.PageTag):
-            code = node.body_decl.code
-        elif isinstance(node, parsetree.CallNamespaceTag):
-            attribs = ', '.join(['%s=%s' % (key, val)
-                                 for key, val in node.attributes.iteritems()])
-            code = '{%s}' % attribs
-            child_nodes = node.nodes
-        elif isinstance(node, parsetree.ControlLine):
-            if node.isend:
-                translator_comments = []
-                in_translator_comments = False
-                continue
-            code = node.text
-        elif isinstance(node, parsetree.Code):
-            # <% and <%! blocks would provide their own translator comments
-            translator_comments = []
-            in_translator_comments = False
-
-            code = node.code.code
-        elif isinstance(node, parsetree.Expression):
-            code = node.code.code
-        else:
-            translator_comments = []
-            in_translator_comments = False
-            continue
-
-        # Comments don't apply unless they immediately preceed the message
-        if translator_comments and \
-                translator_comments[-1][0] < node.lineno - 1:
-            translator_comments = []
-        else:
-            translator_comments = \
-                [comment[1] for comment in translator_comments]
-
-        if isinstance(code, unicode):
-            code = code.encode('ascii', 'backslashreplace')
-        code = StringIO(code)
-        for lineno, funcname, messages, python_translator_comments \
-                in extract_python(code, keywords, comment_tags, options):
-            yield (node.lineno + (lineno - 1), funcname, messages,
-                   translator_comments + python_translator_comments)
-
-        translator_comments = []
-        in_translator_comments = False
-
-        if child_nodes:
-            for extracted in extract_nodes(child_nodes, keywords, comment_tags,
-                                           options):
-                yield extracted
-
-
-def _split_comment(lineno, comment):
-    """Return the multiline comment at lineno split into a list of comment line
-    numbers and the accompanying comment line"""
-    return [(lineno + index, line) for index, line in
-            enumerate(comment.splitlines())]
diff --git a/lib/mako-0.7.2/mako/ext/beaker_cache.py b/lib/mako-0.7.2/mako/ext/beaker_cache.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/ext/beaker_cache.py
+++ /dev/null
@@ -1,70 +0,0 @@
-"""Provide a :class:`.CacheImpl` for the Beaker caching system."""
-
-from mako import exceptions
-
-from mako.cache import CacheImpl
-
-_beaker_cache = None
-class BeakerCacheImpl(CacheImpl):
-    """A :class:`.CacheImpl` provided for the Beaker caching system.
-    
-    This plugin is used by default, based on the default
-    value of ``'beaker'`` for the ``cache_impl`` parameter of the
-    :class:`.Template` or :class:`.TemplateLookup` classes.
-    
-    """
-
-    def __init__(self, cache):
-        global _beaker_cache
-        if _beaker_cache is None:
-            try:
-                from beaker import cache as beaker_cache
-            except ImportError, e:
-                raise exceptions.RuntimeException(
-                            "the Beaker package is required to use cache "
-                            "functionality.")
-
-            if 'manager' in cache.template.cache_args:
-                _beaker_cache = cache.template.cache_args['manager']
-            else:
-                _beaker_cache = beaker_cache.CacheManager()
-        super(BeakerCacheImpl, self).__init__(cache)
-
-    def _get_cache(self, **kw):
-        expiretime = kw.pop('timeout', None)
-        if 'dir' in kw:
-            kw['data_dir'] = kw.pop('dir')
-        elif self.cache.template.module_directory:
-            kw['data_dir'] = self.cache.template.module_directory
-
-        if 'manager' in kw:
-            kw.pop('manager')
-
-        if kw.get('type') == 'memcached':
-            kw['type'] = 'ext:memcached'
-
-        if 'region' in kw:
-            region = kw.pop('region')
-            cache = _beaker_cache.get_cache_region(self.cache.id, region, **kw)
-        else:
-            cache = _beaker_cache.get_cache(self.cache.id, **kw)
-        cache_args = {'starttime':self.cache.starttime}
-        if expiretime:
-            cache_args['expiretime'] = expiretime
-        return cache, cache_args
-
-    def get_or_create(self, key, creation_function, **kw):
-        cache, kw = self._get_cache(**kw)
-        return cache.get(key, createfunc=creation_function, **kw)
-
-    def put(self, key, value, **kw):
-        cache, kw = self._get_cache(**kw)
-        cache.put(key, value, **kw)
- 
-    def get(self, key, **kw):
-        cache, kw = self._get_cache(**kw)
-        return cache.get(key, **kw)
- 
-    def invalidate(self, key, **kw):
-        cache, kw = self._get_cache(**kw)
-        cache.remove_value(key, **kw)
diff --git a/lib/mako-0.7.2/mako/ext/preprocessors.py b/lib/mako-0.7.2/mako/ext/preprocessors.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/ext/preprocessors.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# ext/preprocessors.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""preprocessing functions, used with the 'preprocessor' 
-argument on Template, TemplateLookup"""
-
-import re
-
-def convert_comments(text):
-    """preprocess old style comments.
- 
-    example:
- 
-    from mako.ext.preprocessors import convert_comments
-    t = Template(..., preprocessor=preprocess_comments)"""
-    return re.sub(r'(?<=\n)\s*#[^#]', "##", text)
-
diff --git a/lib/mako-0.7.2/mako/ext/pygmentplugin.py b/lib/mako-0.7.2/mako/ext/pygmentplugin.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/ext/pygmentplugin.py
+++ /dev/null
@@ -1,122 +0,0 @@
-# ext/pygmentplugin.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-from pygments.lexers.web import \
-     HtmlLexer, XmlLexer, JavascriptLexer, CssLexer
-from pygments.lexers.agile import PythonLexer, Python3Lexer
-from pygments.lexer import DelegatingLexer, RegexLexer, bygroups, \
-     include, using
-from pygments.token import \
-     Text, Comment, Operator, Keyword, Name, String, Other
-from pygments.formatters.html import HtmlFormatter
-from pygments import highlight
-from mako import util
-
-class MakoLexer(RegexLexer):
-    name = 'Mako'
-    aliases = ['mako']
-    filenames = ['*.mao']
-
-    tokens = {
-        'root': [
-            (r'(\s*)(\%)(\s*end(?:\w+))(\n|\Z)',
-             bygroups(Text, Comment.Preproc, Keyword, Other)),
-            (r'(\s*)(\%(?!%))([^\n]*)(\n|\Z)',
-             bygroups(Text, Comment.Preproc, using(PythonLexer), Other)),
-            (r'(\s*)(##[^\n]*)(\n|\Z)',
-              bygroups(Text, Comment.Preproc, Other)),
-            (r'''(?s)<%doc>.*?</%doc>''', Comment.Preproc),
-            (r'(<%)([\w\.\:]+)',
-              bygroups(Comment.Preproc, Name.Builtin), 'tag'),
-            (r'(</%)([\w\.\:]+)(>)',
-              bygroups(Comment.Preproc, Name.Builtin, Comment.Preproc)),
-            (r'<%(?=([\w\.\:]+))', Comment.Preproc, 'ondeftags'),
-            (r'(<%(?:!?))(.*?)(%>)(?s)',
-              bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc)),
-            (r'(\$\{)(.*?)(\})',
-             bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc)),
-            (r'''(?sx)
-                (.+?)               # anything, followed by:
-                (?:
-                 (?<=\n)(?=%(?!%)|\#\#) |  # an eval or comment line
-                 (?=\#\*) |          # multiline comment
-                 (?=</?%) |         # a python block
-                                    # call start or end
-                 (?=\$\{) |         # a substitution
-                 (?<=\n)(?=\s*%) |
-                                    # - don't consume
-                 (\\\n) |           # an escaped newline
-                 \Z                 # end of string
-                )
-            ''', bygroups(Other, Operator)),
-            (r'\s+', Text),
-        ],
-        'ondeftags': [
-            (r'<%', Comment.Preproc),
-            (r'(?<=<%)(include|inherit|namespace|page)', Name.Builtin),
-            include('tag'),
-        ],
-        'tag': [
-            (r'((?:\w+)\s*=)\s*(".*?")',
-             bygroups(Name.Attribute, String)),
-            (r'/?\s*>', Comment.Preproc, '#pop'),
-            (r'\s+', Text),
-        ],
-        'attr': [
-            ('".*?"', String, '#pop'),
-            ("'.*?'", String, '#pop'),
-            (r'[^\s>]+', String, '#pop'),
-        ],
-    }
-
-
-class MakoHtmlLexer(DelegatingLexer):
-    name = 'HTML+Mako'
-    aliases = ['html+mako']
-
-    def __init__(self, **options):
-        super(MakoHtmlLexer, self).__init__(HtmlLexer, MakoLexer,
-                                              **options)
-
-class MakoXmlLexer(DelegatingLexer):
-    name = 'XML+Mako'
-    aliases = ['xml+mako']
-
-    def __init__(self, **options):
-        super(MakoXmlLexer, self).__init__(XmlLexer, MakoLexer,
-                                             **options)
-
-class MakoJavascriptLexer(DelegatingLexer):
-    name = 'JavaScript+Mako'
-    aliases = ['js+mako', 'javascript+mako']
-
-    def __init__(self, **options):
-        super(MakoJavascriptLexer, self).__init__(JavascriptLexer,
-                                                    MakoLexer, **options)
-
-class MakoCssLexer(DelegatingLexer):
-    name = 'CSS+Mako'
-    aliases = ['css+mako']
-
-    def __init__(self, **options):
-        super(MakoCssLexer, self).__init__(CssLexer, MakoLexer,
-                                             **options)
-
-
-pygments_html_formatter = HtmlFormatter(cssclass='syntax-highlighted',
-                                        linenos=True)
-def syntax_highlight(filename='', language=None):
-    mako_lexer = MakoLexer()
-    if util.py3k:
-        python_lexer = Python3Lexer()
-    else:
-        python_lexer = PythonLexer()
-    if filename.startswith('memory:') or language == 'mako':
-        return lambda string: highlight(string, mako_lexer,
-                                        pygments_html_formatter)
-    return lambda string: highlight(string, python_lexer,
-                                    pygments_html_formatter)
-
diff --git a/lib/mako-0.7.2/mako/ext/turbogears.py b/lib/mako-0.7.2/mako/ext/turbogears.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/ext/turbogears.py
+++ /dev/null
@@ -1,57 +0,0 @@
-# ext/turbogears.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-import re, inspect
-from mako.lookup import TemplateLookup
-from mako.template import Template
-
-class TGPlugin(object):
-    """TurboGears compatible Template Plugin."""
-
-    def __init__(self, extra_vars_func=None, options=None, extension='mak'):
-        self.extra_vars_func = extra_vars_func
-        self.extension = extension
-        if not options:
-            options = {}
-
-        # Pull the options out and initialize the lookup
-        lookup_options = {}
-        for k, v in options.iteritems():
-            if k.startswith('mako.'):
-                lookup_options[k[5:]] = v
-            elif k in ['directories', 'filesystem_checks', 'module_directory']:
-                lookup_options[k] = v
-        self.lookup = TemplateLookup(**lookup_options)
- 
-        self.tmpl_options = {}
-        # transfer lookup args to template args, based on those available
-        # in getargspec
-        for kw in inspect.getargspec(Template.__init__)[0]:
-            if kw in lookup_options:
-                self.tmpl_options[kw] = lookup_options[kw]
-
-    def load_template(self, templatename, template_string=None):
-        """Loads a template from a file or a string"""
-        if template_string is not None:
-            return Template(template_string, **self.tmpl_options)
-        # Translate TG dot notation to normal / template path
-        if '/' not in templatename:
-            templatename = '/' + templatename.replace('.', '/') + '.' +\
-                    self.extension
-
-        # Lookup template
-        return self.lookup.get_template(templatename)
-
-    def render(self, info, format="html", fragment=False, template=None):
-        if isinstance(template, basestring):
-            template = self.load_template(template)
-
-        # Load extra vars func if provided
-        if self.extra_vars_func:
-            info.update(self.extra_vars_func())
-
-        return template.render(**info)
-
diff --git a/lib/mako-0.7.2/mako/filters.py b/lib/mako-0.7.2/mako/filters.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/filters.py
+++ /dev/null
@@ -1,189 +0,0 @@
-# mako/filters.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-
-import re, urllib, htmlentitydefs, codecs
-from StringIO import StringIO
-from mako import util
-
-xml_escapes = {
-    '&' : '&',
-    '>' : '>',
-    '<' : '<',
-    '"' : '"',   # also " in html-only
-    "'" : '''    # also ' in html-only
-}
-
-# XXX: " is valid in HTML and XML
-#      ' is not valid HTML, but is valid XML
-
-def legacy_html_escape(string):
-    """legacy HTML escape for non-unicode mode."""
-
-    return re.sub(r'([&<"\'>])', lambda m: xml_escapes[m.group()], string)
-
-try:
-    import markupsafe
-    html_escape = markupsafe.escape
-except ImportError:
-    html_escape = legacy_html_escape
-
-
-def xml_escape(string):
-    return re.sub(r'([&<"\'>])', lambda m: xml_escapes[m.group()], string)
-
-def url_escape(string):
-    # convert into a list of octets
-    string = string.encode("utf8")
-    return urllib.quote_plus(string)
-
-def url_unescape(string):
-    text = urllib.unquote_plus(string)
-    if not is_ascii_str(text):
-        text = text.decode("utf8")
-    return text
-
-def trim(string):
-    return string.strip()
-
-
-class Decode(object):
-    def __getattr__(self, key):
-        def decode(x):
-            if isinstance(x, unicode):
-                return x
-            elif not isinstance(x, str):
-                return unicode(str(x), encoding=key)
-            else:
-                return unicode(x, encoding=key)
-        return decode
-decode = Decode()
-
-
-_ASCII_re = re.compile(r'\A[\x00-\x7f]*\Z')
-
-def is_ascii_str(text):
-    return isinstance(text, str) and _ASCII_re.match(text)
-
-################################################################
-
-class XMLEntityEscaper(object):
-    def __init__(self, codepoint2name, name2codepoint):
-        self.codepoint2entity = dict([(c, u'&%s;' % n)
-                                      for c,n in codepoint2name.iteritems()])
-        self.name2codepoint = name2codepoint
-
-    def escape_entities(self, text):
-        """Replace characters with their character entity references.
-
-        Only characters corresponding to a named entity are replaced.
-        """
-        return unicode(text).translate(self.codepoint2entity)
-
-    def __escape(self, m):
-        codepoint = ord(m.group())
-        try:
-            return self.codepoint2entity[codepoint]
-        except (KeyError, IndexError):
-            return '&#x%X;' % codepoint
-
-
-    __escapable = re.compile(r'["&<>]|[^\x00-\x7f]')
-
-    def escape(self, text):
-        """Replace characters with their character references.
-
-        Replace characters by their named entity references.
-        Non-ASCII characters, if they do not have a named entity reference,
-        are replaced by numerical character references.
-
-        The return value is guaranteed to be ASCII.
-        """
-        return self.__escapable.sub(self.__escape, unicode(text)
-                                    ).encode('ascii')
-
-    # XXX: This regexp will not match all valid XML entity names__.
-    # (It punts on details involving involving CombiningChars and Extenders.)
-    #
-    # .. __: http://www.w3.org/TR/2000/REC-xml-20001006#NT-EntityRef
-    __characterrefs = re.compile(r'''& (?:
-                                          \#(\d+)
-                                          | \#x([\da-f]+)
-                                          | ( (?!\d) [:\w] [-.:\w]+ )
-                                          ) ;''',
-                                 re.X | re.UNICODE)
-
-    def __unescape(self, m):
-        dval, hval, name = m.groups()
-        if dval:
-            codepoint = int(dval)
-        elif hval:
-            codepoint = int(hval, 16)
-        else:
-            codepoint = self.name2codepoint.get(name, 0xfffd)
-            # U+FFFD = "REPLACEMENT CHARACTER"
-        if codepoint < 128:
-            return chr(codepoint)
-        return unichr(codepoint)
-
-    def unescape(self, text):
-        """Unescape character references.
-
-        All character references (both entity references and numerical
-        character references) are unescaped.
-        """
-        return self.__characterrefs.sub(self.__unescape, text)
-
-
-_html_entities_escaper = XMLEntityEscaper(htmlentitydefs.codepoint2name,
-                                          htmlentitydefs.name2codepoint)
-
-html_entities_escape = _html_entities_escaper.escape_entities
-html_entities_unescape = _html_entities_escaper.unescape
-
-
-def htmlentityreplace_errors(ex):
-    """An encoding error handler.
-
-    This python `codecs`_ error handler replaces unencodable
-    characters with HTML entities, or, if no HTML entity exists for
-    the character, XML character references.
-
-    >>> u'The cost was \u20ac12.'.encode('latin1', 'htmlentityreplace')
-    'The cost was €12.'
-    """
-    if isinstance(ex, UnicodeEncodeError):
-        # Handle encoding errors
-        bad_text = ex.object[ex.start:ex.end]
-        text = _html_entities_escaper.escape(bad_text)
-        return (unicode(text), ex.end)
-    raise ex
-
-codecs.register_error('htmlentityreplace', htmlentityreplace_errors)
-
-
-# TODO: options to make this dynamic per-compilation will be added in a later
-# release
-DEFAULT_ESCAPES = {
-    'x':'filters.xml_escape',
-    'h':'filters.html_escape',
-    'u':'filters.url_escape',
-    'trim':'filters.trim',
-    'entity':'filters.html_entities_escape',
-    'unicode':'unicode',
-    'decode':'decode',
-    'str':'str',
-    'n':'n'
-}
-
-if util.py3k:
-    DEFAULT_ESCAPES.update({
-        'unicode':'str'
-    })
-
-NON_UNICODE_ESCAPES = DEFAULT_ESCAPES.copy()
-NON_UNICODE_ESCAPES['h'] = 'filters.legacy_html_escape'
-
diff --git a/lib/mako-0.7.2/mako/lexer.py b/lib/mako-0.7.2/mako/lexer.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/lexer.py
+++ /dev/null
@@ -1,442 +0,0 @@
-# mako/lexer.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""provides the Lexer class for parsing template strings into parse trees."""
-
-import re, codecs
-from mako import parsetree, exceptions, util
-from mako.pygen import adjust_whitespace
-
-_regexp_cache = {}
-
-class Lexer(object):
-    def __init__(self, text, filename=None,
-                        disable_unicode=False,
-                        input_encoding=None, preprocessor=None):
-        self.text = text
-        self.filename = filename
-        self.template = parsetree.TemplateNode(self.filename)
-        self.matched_lineno = 1
-        self.matched_charpos = 0
-        self.lineno = 1
-        self.match_position = 0
-        self.tag = []
-        self.control_line = []
-        self.ternary_stack = []
-        self.disable_unicode = disable_unicode
-        self.encoding = input_encoding
-
-        if util.py3k and disable_unicode:
-            raise exceptions.UnsupportedError(
-                                    "Mako for Python 3 does not "
-                                    "support disabling Unicode")
-
-        if preprocessor is None:
-            self.preprocessor = []
-        elif not hasattr(preprocessor, '__iter__'):
-            self.preprocessor = [preprocessor]
-        else:
-            self.preprocessor = preprocessor
-
-    @property
-    def exception_kwargs(self):
-        return {'source':self.text,
-                'lineno':self.matched_lineno,
-                'pos':self.matched_charpos,
-                'filename':self.filename}
-
-    def match(self, regexp, flags=None):
-        """compile the given regexp, cache the reg, and call match_reg()."""
-
-        try:
-            reg = _regexp_cache[(regexp, flags)]
-        except KeyError:
-            if flags:
-                reg = re.compile(regexp, flags)
-            else:
-                reg = re.compile(regexp)
-            _regexp_cache[(regexp, flags)] = reg
-
-        return self.match_reg(reg)
-
-    def match_reg(self, reg):
-        """match the given regular expression object to the current text
-        position.
-
-        if a match occurs, update the current text and line position.
-
-        """
-
-        mp = self.match_position
-
-        match = reg.match(self.text, self.match_position)
-        if match:
-            (start, end) = match.span()
-            if end == start:
-                self.match_position = end + 1
-            else:
-                self.match_position = end
-            self.matched_lineno = self.lineno
-            lines = re.findall(r"\n", self.text[mp:self.match_position])
-            cp = mp - 1
-            while (cp >= 0 and cp<self.textlength and self.text[cp] != '\n'):
-                cp -=1
-            self.matched_charpos = mp - cp
-            self.lineno += len(lines)
-            #print "MATCHED:", match.group(0), "LINE START:",
-            # self.matched_lineno, "LINE END:", self.lineno
-        #print "MATCH:", regexp, "\n", self.text[mp : mp + 15], \
-        #          (match and "TRUE" or "FALSE")
-        return match
-
-    def parse_until_text(self, *text):
-        startpos = self.match_position
-        text_re = r'|'.join(text)
-        brace_level = 0
-        while True:
-            match = self.match(r'#.*\n')
-            if match:
-                continue
-            match = self.match(r'(\"\"\"|\'\'\'|\"|\')((?<!\\)\\\1|.)*?\1',
-                               re.S)
-            if match:
-                continue
-            match = self.match(r'(%s)' % text_re)
-            if match:
-                if match.group(1) == '}' and brace_level > 0:
-                    brace_level -= 1
-                    continue
-                return \
-                    self.text[startpos:\
-                              self.match_position-len(match.group(1))],\
-                    match.group(1)
-            match = self.match(r"(.*?)(?=\"|\'|#|%s)" % text_re, re.S)
-            if match:
-                brace_level += match.group(1).count('{')
-                brace_level -= match.group(1).count('}')
-                continue
-            raise exceptions.SyntaxException(
-                        "Expected: %s" %
-                        ','.join(text),
-                        **self.exception_kwargs)
-
-    def append_node(self, nodecls, *args, **kwargs):
-        kwargs.setdefault('source', self.text)
-        kwargs.setdefault('lineno', self.matched_lineno)
-        kwargs.setdefault('pos', self.matched_charpos)
-        kwargs['filename'] = self.filename
-        node = nodecls(*args, **kwargs)
-        if len(self.tag):
-            self.tag[-1].nodes.append(node)
-        else:
-            self.template.nodes.append(node)
-        # build a set of child nodes for the control line
-        # (used for loop variable detection)
-        # also build a set of child nodes on ternary control lines
-        # (used for determining if a pass needs to be auto-inserted
-        if self.control_line:
-            control_frame = self.control_line[-1]
-            control_frame.nodes.append(node)
-            if not (isinstance(node, parsetree.ControlLine) and
-                    control_frame.is_ternary(node.keyword)):
-                if self.ternary_stack and self.ternary_stack[-1]:
-                    self.ternary_stack[-1][-1].nodes.append(node)
-        if isinstance(node, parsetree.Tag):
-            if len(self.tag):
-                node.parent = self.tag[-1]
-            self.tag.append(node)
-        elif isinstance(node, parsetree.ControlLine):
-            if node.isend:
-                self.control_line.pop()
-                self.ternary_stack.pop()
-            elif node.is_primary:
-                self.control_line.append(node)
-                self.ternary_stack.append([])
-            elif self.control_line and \
-                    self.control_line[-1].is_ternary(node.keyword):
-                self.ternary_stack[-1].append(node)
-            elif self.control_line and \
-                    not self.control_line[-1].is_ternary(node.keyword):
-                raise exceptions.SyntaxException(
-                          "Keyword '%s' not a legal ternary for keyword '%s'" %
-                          (node.keyword, self.control_line[-1].keyword),
-                          **self.exception_kwargs)
-
-    _coding_re = re.compile(r'#.*coding[:=]\s*([-\w.]+).*\r?\n')
-
-    def decode_raw_stream(self, text, decode_raw, known_encoding, filename):
-        """given string/unicode or bytes/string, determine encoding
-           from magic encoding comment, return body as unicode
-           or raw if decode_raw=False
-
-        """
-        if isinstance(text, unicode):
-            m = self._coding_re.match(text)
-            encoding = m and m.group(1) or known_encoding or 'ascii'
-            return encoding, text
-
-        if text.startswith(codecs.BOM_UTF8):
-            text = text[len(codecs.BOM_UTF8):]
-            parsed_encoding = 'utf-8'
-            m = self._coding_re.match(text.decode('utf-8', 'ignore'))
-            if m is not None and m.group(1) != 'utf-8':
-                raise exceptions.CompileException(
-                                "Found utf-8 BOM in file, with conflicting "
-                                "magic encoding comment of '%s'" % m.group(1),
-                                text.decode('utf-8', 'ignore'),
-                                0, 0, filename)
-        else:
-            m = self._coding_re.match(text.decode('utf-8', 'ignore'))
-            if m:
-                parsed_encoding = m.group(1)
-            else:
-                parsed_encoding = known_encoding or 'ascii'
-
-        if decode_raw:
-            try:
-                text = text.decode(parsed_encoding)
-            except UnicodeDecodeError, e:
-                raise exceptions.CompileException(
-                           "Unicode decode operation of encoding '%s' failed" %
-                           parsed_encoding,
-                           text.decode('utf-8', 'ignore'),
-                           0, 0, filename)
-
-        return parsed_encoding, text
-
-    def parse(self):
-        self.encoding, self.text = self.decode_raw_stream(self.text,
-                                        not self.disable_unicode,
-                                        self.encoding,
-                                        self.filename,)
-
-        for preproc in self.preprocessor:
-            self.text = preproc(self.text)
-
-        # push the match marker past the
-        # encoding comment.
-        self.match_reg(self._coding_re)
-
-        self.textlength = len(self.text)
-
-        while (True):
-            if self.match_position > self.textlength:
-                break
-
-            if self.match_end():
-                break
-            if self.match_expression():
-                continue
-            if self.match_control_line():
-                continue
-            if self.match_comment():
-                continue
-            if self.match_tag_start():
-                continue
-            if self.match_tag_end():
-                continue
-            if self.match_python_block():
-                continue
-            if self.match_text():
-                continue
-
-            if self.match_position > self.textlength:
-                break
-            raise exceptions.CompileException("assertion failed")
-
-        if len(self.tag):
-            raise exceptions.SyntaxException("Unclosed tag: <%%%s>" %
-                                                self.tag[-1].keyword,
-                                                **self.exception_kwargs)
-        if len(self.control_line):
-            raise exceptions.SyntaxException(
-                                      "Unterminated control keyword: '%s'" %
-                                      self.control_line[-1].keyword,
-                                      self.text,
-                                      self.control_line[-1].lineno,
-                                      self.control_line[-1].pos, self.filename)
-        return self.template
-
-    def match_tag_start(self):
-        match = self.match(r'''
-            \<%     # opening tag
-
-            ([\w\.\:]+)   # keyword
-
-            ((?:\s+\w+|\s*=\s*|".*?"|'.*?')*)  # attrname, = \
-                                               #        sign, string expression
-
-            \s*     # more whitespace
-
-            (/)?>   # closing
-
-            ''',
-
-            re.I | re.S | re.X)
-
-        if match:
-            keyword, attr, isend = match.groups()
-            self.keyword = keyword
-            attributes = {}
-            if attr:
-                for att in re.findall(
-                           r"\s*(\w+)\s*=\s*(?:'([^']*)'|\"([^\"]*)\")", attr):
-                    key, val1, val2 = att
-                    text = val1 or val2
-                    text = text.replace('\r\n', '\n')
-                    attributes[key] = text
-            self.append_node(parsetree.Tag, keyword, attributes)
-            if isend:
-                self.tag.pop()
-            else:
-                if keyword == 'text':
-                    match = self.match(r'(.*?)(?=\</%text>)',  re.S)
-                    if not match:
-                        raise exceptions.SyntaxException(
-                                            "Unclosed tag: <%%%s>" %
-                                            self.tag[-1].keyword,
-                                            **self.exception_kwargs)
-                    self.append_node(parsetree.Text, match.group(1))
-                    return self.match_tag_end()
-            return True
-        else:
-            return False
-
-    def match_tag_end(self):
-        match = self.match(r'\</%[\t ]*(.+?)[\t ]*>')
-        if match:
-            if not len(self.tag):
-                raise exceptions.SyntaxException(
-                                   "Closing tag without opening tag: </%%%s>" %
-                                    match.group(1),
-                                    **self.exception_kwargs)
-            elif self.tag[-1].keyword != match.group(1):
-                raise exceptions.SyntaxException(
-                             "Closing tag </%%%s> does not match tag: <%%%s>" %
-                             (match.group(1), self.tag[-1].keyword),
-                             **self.exception_kwargs)
-            self.tag.pop()
-            return True
-        else:
-            return False
-
-    def match_end(self):
-        match = self.match(r'\Z', re.S)
-        if match:
-            string = match.group()
-            if string:
-                return string
-            else:
-                return True
-        else:
-            return False
-
-    def match_text(self):
-        match = self.match(r"""
-                (.*?)         # anything, followed by:
-                (
-                 (?<=\n)(?=[ \t]*(?=%|\#\#)) # an eval or line-based
-                                             # comment preceded by a
-                                             # consumed newline and whitespace
-                 |
-                 (?=\${)      # an expression
-                 |
-                 (?=\#\*)     # multiline comment
-                 |
-                 (?=</?[%&])  # a substitution or block or call start or end
-                              # - don't consume
-                 |
-                 (\\\r?\n)    # an escaped newline  - throw away
-                 |
-                 \Z           # end of string
-                )""", re.X | re.S)
-
-        if match:
-            text = match.group(1)
-            if text:
-                self.append_node(parsetree.Text, text)
-            return True
-        else:
-            return False
-
-    def match_python_block(self):
-        match = self.match(r"<%(!)?")
-        if match:
-            line, pos = self.matched_lineno, self.matched_charpos
-            text, end = self.parse_until_text(r'%>')
-            # the trailing newline helps
-            # compiler.parse() not complain about indentation
-            text = adjust_whitespace(text) + "\n"
-            self.append_node(
-                            parsetree.Code,
-                            text,
-                            match.group(1)=='!', lineno=line, pos=pos)
-            return True
-        else:
-            return False
-
-    def match_expression(self):
-        match = self.match(r"\${")
-        if match:
-            line, pos = self.matched_lineno, self.matched_charpos
-            text, end = self.parse_until_text(r'\|', r'}')
-            if end == '|':
-                escapes, end = self.parse_until_text(r'}')
-            else:
-                escapes = ""
-            text = text.replace('\r\n', '\n')
-            self.append_node(
-                            parsetree.Expression,
-                            text, escapes.strip(),
-                            lineno=line, pos=pos)
-            return True
-        else:
-            return False
-
-    def match_control_line(self):
-        match = self.match(
-                      r"(?<=^)[\t ]*(%(?!%)|##)[\t ]*((?:(?:\\r?\n)|[^\r\n])*)"
-                      r"(?:\r?\n|\Z)", re.M)
-        if match:
-            operator = match.group(1)
-            text = match.group(2)
-            if operator == '%':
-                m2 = re.match(r'(end)?(\w+)\s*(.*)', text)
-                if not m2:
-                    raise exceptions.SyntaxException(
-                                "Invalid control line: '%s'" %
-                                text,
-                                **self.exception_kwargs)
-                isend, keyword = m2.group(1, 2)
-                isend = (isend is not None)
-
-                if isend:
-                    if not len(self.control_line):
-                        raise exceptions.SyntaxException(
-                                "No starting keyword '%s' for '%s'" %
-                                (keyword, text),
-                                **self.exception_kwargs)
-                    elif self.control_line[-1].keyword != keyword:
-                        raise exceptions.SyntaxException(
-                                "Keyword '%s' doesn't match keyword '%s'" %
-                                (text, self.control_line[-1].keyword),
-                                **self.exception_kwargs)
-                self.append_node(parsetree.ControlLine, keyword, isend, text)
-            else:
-                self.append_node(parsetree.Comment, text)
-            return True
-        else:
-            return False
-
-    def match_comment(self):
-        """matches the multiline version of a comment"""
-        match = self.match(r"<%doc>(.*?)</%doc>", re.S)
-        if match:
-            self.append_node(parsetree.Comment, match.group(1))
-            return True
-        else:
-            return False
-
diff --git a/lib/mako-0.7.2/mako/lookup.py b/lib/mako-0.7.2/mako/lookup.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/lookup.py
+++ /dev/null
@@ -1,354 +0,0 @@
-# mako/lookup.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-import os, stat, posixpath, re
-from mako import exceptions, util
-from mako.template import Template
-
-try:
-    import threading
-except:
-    import dummy_threading as threading
-
-class TemplateCollection(object):
-    """Represent a collection of :class:`.Template` objects,
-    identifiable via URI.
-
-    A :class:`.TemplateCollection` is linked to the usage of
-    all template tags that address other templates, such
-    as ``<%include>``, ``<%namespace>``, and ``<%inherit>``.
-    The ``file`` attribute of each of those tags refers
-    to a string URI that is passed to that :class:`.Template`
-    object's :class:`.TemplateCollection` for resolution.
-
-    :class:`.TemplateCollection` is an abstract class,
-    with the usual default implementation being :class:`.TemplateLookup`.
-
-     """
-
-    def has_template(self, uri):
-        """Return ``True`` if this :class:`.TemplateLookup` is
-        capable of returning a :class:`.Template` object for the
-        given ``uri``.
-
-        :param uri: String URI of the template to be resolved.
-
-        """
-        try:
-            self.get_template(uri)
-            return True
-        except exceptions.TemplateLookupException:
-            return False
-
-    def get_template(self, uri, relativeto=None):
-        """Return a :class:`.Template` object corresponding to the given
-        ``uri``.
-
-        The default implementation raises
-        :class:`.NotImplementedError`. Implementations should
-        raise :class:`.TemplateLookupException` if the given ``uri``
-        cannot be resolved.
-
-        :param uri: String URI of the template to be resolved.
-        :param relativeto: if present, the given ``uri`` is assumed to
-         be relative to this URI.
-
-        """
-        raise NotImplementedError()
-
-    def filename_to_uri(self, uri, filename):
-        """Convert the given ``filename`` to a URI relative to
-           this :class:`.TemplateCollection`."""
-
-        return uri
-
-    def adjust_uri(self, uri, filename):
-        """Adjust the given ``uri`` based on the calling ``filename``.
-
-        When this method is called from the runtime, the
-        ``filename`` parameter is taken directly to the ``filename``
-        attribute of the calling template. Therefore a custom
-        :class:`.TemplateCollection` subclass can place any string
-        identifier desired in the ``filename`` parameter of the
-        :class:`.Template` objects it constructs and have them come back
-        here.
-
-        """
-        return uri
-
-class TemplateLookup(TemplateCollection):
-    """Represent a collection of templates that locates template source files
-    from the local filesystem.
-
-    The primary argument is the ``directories`` argument, the list of
-    directories to search:
-
-    .. sourcecode:: python
-
-        lookup = TemplateLookup(["/path/to/templates"])
-        some_template = lookup.get_template("/index.html")
-
-    The :class:`.TemplateLookup` can also be given :class:`.Template` objects
-    programatically using :meth:`.put_string` or :meth:`.put_template`:
-
-    .. sourcecode:: python
-
-        lookup = TemplateLookup()
-        lookup.put_string("base.html", '''
-            <html><body>${self.next()}</body></html>
-        ''')
-        lookup.put_string("hello.html", '''
-            <%include file='base.html'/>
-
-            Hello, world !
-        ''')
-
-
-    :param directories: A list of directory names which will be
-     searched for a particular template URI. The URI is appended
-     to each directory and the filesystem checked.
-
-    :param collection_size: Approximate size of the collection used
-     to store templates. If left at its default of ``-1``, the size
-     is unbounded, and a plain Python dictionary is used to
-     relate URI strings to :class:`.Template` instances.
-     Otherwise, a least-recently-used cache object is used which
-     will maintain the size of the collection approximately to
-     the number given.
-
-    :param filesystem_checks: When at its default value of ``True``,
-     each call to :meth:`.TemplateLookup.get_template()` will
-     compare the filesystem last modified time to the time in
-     which an existing :class:`.Template` object was created.
-     This allows the :class:`.TemplateLookup` to regenerate a
-     new :class:`.Template` whenever the original source has
-     been updated. Set this to ``False`` for a very minor
-     performance increase.
-
-    :param modulename_callable: A callable which, when present,
-     is passed the path of the source file as well as the
-     requested URI, and then returns the full path of the
-     generated Python module file. This is used to inject
-     alternate schemes for Python module location. If left at
-     its default of ``None``, the built in system of generation
-     based on ``module_directory`` plus ``uri`` is used.
-
-    All other keyword parameters available for
-    :class:`.Template` are mirrored here. When new
-    :class:`.Template` objects are created, the keywords
-    established with this :class:`.TemplateLookup` are passed on
-    to each new :class:`.Template`.
-
-    """
-
-    def __init__(self,
-                        directories=None,
-                        module_directory=None,
-                        filesystem_checks=True,
-                        collection_size=-1,
-                        format_exceptions=False,
-                        error_handler=None,
-                        disable_unicode=False,
-                        bytestring_passthrough=False,
-                        output_encoding=None,
-                        encoding_errors='strict',
-
-                        cache_args=None,
-                        cache_impl='beaker',
-                        cache_enabled=True,
-                        cache_type=None,
-                        cache_dir=None,
-                        cache_url=None,
-
-                        modulename_callable=None,
-                        module_writer=None,
-                        default_filters=None,
-                        buffer_filters=(),
-                        strict_undefined=False,
-                        imports=None,
-                        enable_loop=True,
-                        input_encoding=None,
-                        preprocessor=None):
-
-        self.directories = [posixpath.normpath(d) for d in
-                            util.to_list(directories, ())
-                            ]
-        self.module_directory = module_directory
-        self.modulename_callable = modulename_callable
-        self.filesystem_checks = filesystem_checks
-        self.collection_size = collection_size
-
-        if cache_args is None:
-            cache_args = {}
-        # transfer deprecated cache_* args
-        if cache_dir:
-            cache_args.setdefault('dir', cache_dir)
-        if cache_url:
-            cache_args.setdefault('url', cache_url)
-        if cache_type:
-            cache_args.setdefault('type', cache_type)
-
-        self.template_args = {
-            'format_exceptions':format_exceptions,
-            'error_handler':error_handler,
-            'disable_unicode':disable_unicode,
-            'bytestring_passthrough':bytestring_passthrough,
-            'output_encoding':output_encoding,
-            'cache_impl':cache_impl,
-            'encoding_errors':encoding_errors,
-            'input_encoding':input_encoding,
-            'module_directory':module_directory,
-            'module_writer':module_writer,
-            'cache_args':cache_args,
-            'cache_enabled':cache_enabled,
-            'default_filters':default_filters,
-            'buffer_filters':buffer_filters,
-            'strict_undefined':strict_undefined,
-            'imports':imports,
-            'enable_loop':enable_loop,
-            'preprocessor':preprocessor}
-
-        if collection_size == -1:
-            self._collection = {}
-            self._uri_cache = {}
-        else:
-            self._collection = util.LRUCache(collection_size)
-            self._uri_cache = util.LRUCache(collection_size)
-        self._mutex = threading.Lock()
-
-    def get_template(self, uri):
-        """Return a :class:`.Template` object corresponding to the given
-        ``uri``.
-
-        .. note:: The ``relativeto`` argument is not supported here at the moment.
-
-        """
-
-        try:
-            if self.filesystem_checks:
-                return self._check(uri, self._collection[uri])
-            else:
-                return self._collection[uri]
-        except KeyError:
-            u = re.sub(r'^\/+', '', uri)
-            for dir in self.directories:
-                srcfile = posixpath.normpath(posixpath.join(dir, u))
-                if os.path.isfile(srcfile):
-                    return self._load(srcfile, uri)
-            else:
-                raise exceptions.TopLevelLookupException(
-                                    "Cant locate template for uri %r" % uri)
-
-    def adjust_uri(self, uri, relativeto):
-        """Adjust the given ``uri`` based on the given relative URI."""
-
-        key = (uri, relativeto)
-        if key in self._uri_cache:
-            return self._uri_cache[key]
-
-        if uri[0] != '/':
-            if relativeto is not None:
-                v = self._uri_cache[key] = posixpath.join(
-                                            posixpath.dirname(relativeto), uri)
-            else:
-                v = self._uri_cache[key] = '/' + uri
-        else:
-            v = self._uri_cache[key] = uri
-        return v
-
-
-    def filename_to_uri(self, filename):
-        """Convert the given ``filename`` to a URI relative to
-           this :class:`.TemplateCollection`."""
-
-        try:
-            return self._uri_cache[filename]
-        except KeyError:
-            value = self._relativeize(filename)
-            self._uri_cache[filename] = value
-            return value
-
-    def _relativeize(self, filename):
-        """Return the portion of a filename that is 'relative'
-           to the directories in this lookup.
-
-        """
-
-        filename = posixpath.normpath(filename)
-        for dir in self.directories:
-            if filename[0:len(dir)] == dir:
-                return filename[len(dir):]
-        else:
-            return None
-
-    def _load(self, filename, uri):
-        self._mutex.acquire()
-        try:
-            try:
-                # try returning from collection one
-                # more time in case concurrent thread already loaded
-                return self._collection[uri]
-            except KeyError:
-                pass
-            try:
-                if self.modulename_callable is not None:
-                    module_filename = self.modulename_callable(filename, uri)
-                else:
-                    module_filename = None
-                self._collection[uri] = template = Template(
-                                        uri=uri,
-                                        filename=posixpath.normpath(filename),
-                                        lookup=self,
-                                        module_filename=module_filename,
-                                        **self.template_args)
-                return template
-            except:
-                # if compilation fails etc, ensure
-                # template is removed from collection,
-                # re-raise
-                self._collection.pop(uri, None)
-                raise
-        finally:
-            self._mutex.release()
-
-    def _check(self, uri, template):
-        if template.filename is None:
-            return template
-
-        try:
-            template_stat = os.stat(template.filename)
-            if template.module._modified_time < \
-                        template_stat[stat.ST_MTIME]:
-                self._collection.pop(uri, None)
-                return self._load(template.filename, uri)
-            else:
-                return template
-        except OSError:
-            self._collection.pop(uri, None)
-            raise exceptions.TemplateLookupException(
-                                "Cant locate template for uri %r" % uri)
-
-
-    def put_string(self, uri, text):
-        """Place a new :class:`.Template` object into this
-        :class:`.TemplateLookup`, based on the given string of
-        ``text``.
-
-        """
-        self._collection[uri] = Template(
-                                    text,
-                                    lookup=self,
-                                    uri=uri,
-                                    **self.template_args)
-
-    def put_template(self, uri, template):
-        """Place a new :class:`.Template` object into this
-        :class:`.TemplateLookup`, based on the given
-        :class:`.Template` object.
-
-        """
-        self._collection[uri] = template
-
diff --git a/lib/mako-0.7.2/mako/parsetree.py b/lib/mako-0.7.2/mako/parsetree.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/parsetree.py
+++ /dev/null
@@ -1,589 +0,0 @@
-# mako/parsetree.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""defines the parse tree components for Mako templates."""
-
-from mako import exceptions, ast, util, filters
-import re
-
-class Node(object):
-    """base class for a Node in the parse tree."""
-
-    def __init__(self, source, lineno, pos, filename):
-        self.source = source
-        self.lineno = lineno
-        self.pos = pos
-        self.filename = filename
-
-    @property
-    def exception_kwargs(self):
-        return {'source':self.source, 'lineno':self.lineno,
-                'pos':self.pos, 'filename':self.filename}
-
-    def get_children(self):
-        return []
-
-    def accept_visitor(self, visitor):
-        def traverse(node):
-            for n in node.get_children():
-                n.accept_visitor(visitor)
-
-        method = getattr(visitor, "visit" + self.__class__.__name__, traverse)
-        method(self)
-
-class TemplateNode(Node):
-    """a 'container' node that stores the overall collection of nodes."""
-
-    def __init__(self, filename):
-        super(TemplateNode, self).__init__('', 0, 0, filename)
-        self.nodes = []
-        self.page_attributes = {}
-
-    def get_children(self):
-        return self.nodes
-
-    def __repr__(self):
-        return "TemplateNode(%s, %r)" % (
-                    util.sorted_dict_repr(self.page_attributes),
-                    self.nodes)
-
-class ControlLine(Node):
-    """defines a control line, a line-oriented python line or end tag.
-
-    e.g.::
-
-        % if foo:
-            (markup)
-        % endif
-
-    """
-
-    has_loop_context = False
-
-    def __init__(self, keyword, isend, text, **kwargs):
-        super(ControlLine, self).__init__(**kwargs)
-        self.text = text
-        self.keyword = keyword
-        self.isend = isend
-        self.is_primary = keyword in ['for', 'if', 'while', 'try', 'with']
-        self.nodes = []
-        if self.isend:
-            self._declared_identifiers = []
-            self._undeclared_identifiers = []
-        else:
-            code = ast.PythonFragment(text, **self.exception_kwargs)
-            self._declared_identifiers = code.declared_identifiers
-            self._undeclared_identifiers = code.undeclared_identifiers
-
-    def get_children(self):
-        return self.nodes
-
-    def declared_identifiers(self):
-        return self._declared_identifiers
-
-    def undeclared_identifiers(self):
-        return self._undeclared_identifiers
-
-    def is_ternary(self, keyword):
-        """return true if the given keyword is a ternary keyword
-        for this ControlLine"""
-
-        return keyword in {
-            'if':set(['else', 'elif']),
-            'try':set(['except', 'finally']),
-            'for':set(['else'])
-        }.get(self.keyword, [])
-
-    def __repr__(self):
-        return "ControlLine(%r, %r, %r, %r)" % (
-            self.keyword,
-            self.text,
-            self.isend,
-            (self.lineno, self.pos)
-        )
-
-class Text(Node):
-    """defines plain text in the template."""
-
-    def __init__(self, content, **kwargs):
-        super(Text, self).__init__(**kwargs)
-        self.content = content
-
-    def __repr__(self):
-        return "Text(%r, %r)" % (self.content, (self.lineno, self.pos))
-
-class Code(Node):
-    """defines a Python code block, either inline or module level.
-
-    e.g.::
-
-        inline:
-        <%
-            x = 12
-        %>
-
-        module level:
-        <%!
-            import logger
-        %>
-
-    """
-
-    def __init__(self, text, ismodule, **kwargs):
-        super(Code, self).__init__(**kwargs)
-        self.text = text
-        self.ismodule = ismodule
-        self.code = ast.PythonCode(text, **self.exception_kwargs)
-
-    def declared_identifiers(self):
-        return self.code.declared_identifiers
-
-    def undeclared_identifiers(self):
-        return self.code.undeclared_identifiers
-
-    def __repr__(self):
-        return "Code(%r, %r, %r)" % (
-            self.text,
-            self.ismodule,
-            (self.lineno, self.pos)
-        )
-
-class Comment(Node):
-    """defines a comment line.
-
-    # this is a comment
-
-    """
-
-    def __init__(self, text, **kwargs):
-        super(Comment, self).__init__(**kwargs)
-        self.text = text
-
-    def __repr__(self):
-        return "Comment(%r, %r)" % (self.text, (self.lineno, self.pos))
-
-class Expression(Node):
-    """defines an inline expression.
-
-    ${x+y}
-
-    """
-
-    def __init__(self, text, escapes, **kwargs):
-        super(Expression, self).__init__(**kwargs)
-        self.text = text
-        self.escapes = escapes
-        self.escapes_code = ast.ArgumentList(escapes, **self.exception_kwargs)
-        self.code = ast.PythonCode(text, **self.exception_kwargs)
-
-    def declared_identifiers(self):
-        return []
-
-    def undeclared_identifiers(self):
-        # TODO: make the "filter" shortcut list configurable at parse/gen time
-        return self.code.undeclared_identifiers.union(
-                self.escapes_code.undeclared_identifiers.difference(
-                    set(filters.DEFAULT_ESCAPES.keys())
-                )
-            ).difference(self.code.declared_identifiers)
-
-    def __repr__(self):
-        return "Expression(%r, %r, %r)" % (
-            self.text,
-            self.escapes_code.args,
-            (self.lineno, self.pos)
-        )
-
-class _TagMeta(type):
-    """metaclass to allow Tag to produce a subclass according to
-    its keyword"""
-
-    _classmap = {}
-
-    def __init__(cls, clsname, bases, dict):
-        if cls.__keyword__ is not None:
-            cls._classmap[cls.__keyword__] = cls
-            super(_TagMeta, cls).__init__(clsname, bases, dict)
-
-    def __call__(cls, keyword, attributes, **kwargs):
-        if ":" in keyword:
-            ns, defname = keyword.split(':')
-            return type.__call__(CallNamespaceTag, ns, defname,
-                                        attributes, **kwargs)
-
-        try:
-            cls = _TagMeta._classmap[keyword]
-        except KeyError:
-            raise exceptions.CompileException(
-                "No such tag: '%s'" % keyword,
-                source=kwargs['source'],
-                lineno=kwargs['lineno'],
-                pos=kwargs['pos'],
-                filename=kwargs['filename']
-            )
-        return type.__call__(cls, keyword, attributes, **kwargs)
-
-class Tag(Node):
-    """abstract base class for tags.
-
-    <%sometag/>
-
-    <%someothertag>
-        stuff
-    </%someothertag>
-
-    """
-
-    __metaclass__ = _TagMeta
-    __keyword__ = None
-
-    def __init__(self, keyword, attributes, expressions,
-                        nonexpressions, required, **kwargs):
-        """construct a new Tag instance.
-
-        this constructor not called directly, and is only called
-        by subclasses.
-
-        :param keyword: the tag keyword
-
-        :param attributes: raw dictionary of attribute key/value pairs
-
-        :param expressions: a set of identifiers that are legal attributes,
-         which can also contain embedded expressions
-
-        :param nonexpressions: a set of identifiers that are legal
-         attributes, which cannot contain embedded expressions
-
-        :param \**kwargs:
-         other arguments passed to the Node superclass (lineno, pos)
-
-        """
-        super(Tag, self).__init__(**kwargs)
-        self.keyword = keyword
-        self.attributes = attributes
-        self._parse_attributes(expressions, nonexpressions)
-        missing = [r for r in required if r not in self.parsed_attributes]
-        if len(missing):
-            raise exceptions.CompileException(
-                "Missing attribute(s): %s" %
-                    ",".join([repr(m) for m in missing]),
-                **self.exception_kwargs)
-        self.parent = None
-        self.nodes = []
-
-    def is_root(self):
-        return self.parent is None
-
-    def get_children(self):
-        return self.nodes
-
-    def _parse_attributes(self, expressions, nonexpressions):
-        undeclared_identifiers = set()
-        self.parsed_attributes = {}
-        for key in self.attributes:
-            if key in expressions:
-                expr = []
-                for x in re.compile(r'(\${.+?})',
-                                    re.S).split(self.attributes[key]):
-                    m = re.compile(r'^\${(.+?)}$', re.S).match(x)
-                    if m:
-                        code = ast.PythonCode(m.group(1).rstrip(),
-                                **self.exception_kwargs)
-                        # we aren't discarding "declared_identifiers" here,
-                        # which we do so that list comprehension-declared
-                        # variables aren't counted.   As yet can't find a
-                        # condition that requires it here.
-                        undeclared_identifiers = \
-                            undeclared_identifiers.union(
-                                    code.undeclared_identifiers)
-                        expr.append('(%s)' % m.group(1))
-                    else:
-                        if x:
-                            expr.append(repr(x))
-                self.parsed_attributes[key] = " + ".join(expr) or repr('')
-            elif key in nonexpressions:
-                if re.search(r'\${.+?}', self.attributes[key]):
-                    raise exceptions.CompileException(
-                           "Attibute '%s' in tag '%s' does not allow embedded "
-                           "expressions"  % (key, self.keyword),
-                           **self.exception_kwargs)
-                self.parsed_attributes[key] = repr(self.attributes[key])
-            else:
-                raise exceptions.CompileException(
-                                    "Invalid attribute for tag '%s': '%s'" %
-                                    (self.keyword, key),
-                                    **self.exception_kwargs)
-        self.expression_undeclared_identifiers = undeclared_identifiers
-
-    def declared_identifiers(self):
-        return []
-
-    def undeclared_identifiers(self):
-        return self.expression_undeclared_identifiers
-
-    def __repr__(self):
-        return "%s(%r, %s, %r, %r)" % (self.__class__.__name__,
-                                    self.keyword,
-                                    util.sorted_dict_repr(self.attributes),
-                                    (self.lineno, self.pos),
-                                    self.nodes
-                                )
-
-class IncludeTag(Tag):
-    __keyword__ = 'include'
-
-    def __init__(self, keyword, attributes, **kwargs):
-        super(IncludeTag, self).__init__(
-                                    keyword,
-                                    attributes,
-                                    ('file', 'import', 'args'),
-                                    (), ('file',), **kwargs)
-        self.page_args = ast.PythonCode(
-                                "__DUMMY(%s)" % attributes.get('args', ''),
-                                 **self.exception_kwargs)
-
-    def declared_identifiers(self):
-        return []
-
-    def undeclared_identifiers(self):
-        identifiers = self.page_args.undeclared_identifiers.\
-                            difference(set(["__DUMMY"])).\
-                            difference(self.page_args.declared_identifiers)
-        return identifiers.union(super(IncludeTag, self).
-                                    undeclared_identifiers())
-
-class NamespaceTag(Tag):
-    __keyword__ = 'namespace'
-
-    def __init__(self, keyword, attributes, **kwargs):
-        super(NamespaceTag, self).__init__(
-                                        keyword, attributes,
-                                        ('file',),
-                                        ('name','inheritable',
-                                        'import','module'),
-                                        (), **kwargs)
-
-        self.name = attributes.get('name', '__anon_%s' % hex(abs(id(self))))
-        if not 'name' in attributes and not 'import' in attributes:
-            raise exceptions.CompileException(
-                "'name' and/or 'import' attributes are required "
-                "for <%namespace>",
-                **self.exception_kwargs)
-        if 'file' in attributes and 'module' in attributes:
-            raise exceptions.CompileException(
-                "<%namespace> may only have one of 'file' or 'module'",
-                **self.exception_kwargs
-            )
-
-    def declared_identifiers(self):
-        return []
-
-class TextTag(Tag):
-    __keyword__ = 'text'
-
-    def __init__(self, keyword, attributes, **kwargs):
-        super(TextTag, self).__init__(
-                                    keyword,
-                                    attributes, (),
-                                    ('filter'), (), **kwargs)
-        self.filter_args = ast.ArgumentList(
-                                    attributes.get('filter', ''),
-                                    **self.exception_kwargs)
-
-class DefTag(Tag):
-    __keyword__ = 'def'
-
-    def __init__(self, keyword, attributes, **kwargs):
-        expressions = ['buffered', 'cached'] + [
-                c for c in attributes if c.startswith('cache_')]
-
-
-        super(DefTag, self).__init__(
-                keyword,
-                attributes,
-                expressions,
-                ('name','filter', 'decorator'),
-                ('name',),
-                **kwargs)
-        name = attributes['name']
-        if re.match(r'^[\w_]+$',name):
-            raise exceptions.CompileException(
-                                "Missing parenthesis in %def",
-                                **self.exception_kwargs)
-        self.function_decl = ast.FunctionDecl("def " + name + ":pass",
-                                                    **self.exception_kwargs)
-        self.name = self.function_decl.funcname
-        self.decorator = attributes.get('decorator', '')
-        self.filter_args = ast.ArgumentList(
-                                attributes.get('filter', ''),
-                                **self.exception_kwargs)
-
-    is_anonymous = False
-    is_block = False
-
-    @property
-    def funcname(self):
-        return self.function_decl.funcname
-
-    def get_argument_expressions(self, **kw):
-        return self.function_decl.get_argument_expressions(**kw)
-
-    def declared_identifiers(self):
-        return self.function_decl.argnames
-
-    def undeclared_identifiers(self):
-        res = []
-        for c in self.function_decl.defaults:
-            res += list(ast.PythonCode(c, **self.exception_kwargs).
-                                    undeclared_identifiers)
-        return set(res).union(
-            self.filter_args.\
-                            undeclared_identifiers.\
-                            difference(filters.DEFAULT_ESCAPES.keys())
-        ).union(
-            self.expression_undeclared_identifiers
-        ).difference(
-            self.function_decl.argnames
-        )
-
-class BlockTag(Tag):
-    __keyword__ = 'block'
-
-    def __init__(self, keyword, attributes, **kwargs):
-        expressions = ['buffered', 'cached', 'args'] + [
-                 c for c in attributes if c.startswith('cache_')]
-
-        super(BlockTag, self).__init__(
-                keyword,
-                attributes,
-                expressions,
-                ('name','filter', 'decorator'),
-                (),
-                **kwargs)
-        name = attributes.get('name')
-        if name and not re.match(r'^[\w_]+$',name):
-            raise exceptions.CompileException(
-                               "%block may not specify an argument signature",
-                               **self.exception_kwargs)
-        if not name and attributes.get('args', None):
-            raise exceptions.CompileException(
-                                "Only named %blocks may specify args",
-                                **self.exception_kwargs
-                                )
-        self.body_decl = ast.FunctionArgs(attributes.get('args', ''),
-                                            **self.exception_kwargs)
-
-        self.name = name
-        self.decorator = attributes.get('decorator', '')
-        self.filter_args = ast.ArgumentList(
-                                attributes.get('filter', ''),
-                                **self.exception_kwargs)
-
-
-    is_block = True
-
-    @property
-    def is_anonymous(self):
-        return self.name is None
-
-    @property
-    def funcname(self):
-        return self.name or "__M_anon_%d" % (self.lineno, )
-
-    def get_argument_expressions(self, **kw):
-        return self.body_decl.get_argument_expressions(**kw)
-
-    def declared_identifiers(self):
-        return self.body_decl.argnames
-
-    def undeclared_identifiers(self):
-        return (self.filter_args.\
-                            undeclared_identifiers.\
-                            difference(filters.DEFAULT_ESCAPES.keys())
-                ).union(self.expression_undeclared_identifiers)
-
-
-
-class CallTag(Tag):
-    __keyword__ = 'call'
-
-    def __init__(self, keyword, attributes, **kwargs):
-        super(CallTag, self).__init__(keyword, attributes,
-                                    ('args'), ('expr',), ('expr',), **kwargs)
-        self.expression = attributes['expr']
-        self.code = ast.PythonCode(self.expression, **self.exception_kwargs)
-        self.body_decl = ast.FunctionArgs(attributes.get('args', ''),
-                                            **self.exception_kwargs)
-
-    def declared_identifiers(self):
-        return self.code.declared_identifiers.union(self.body_decl.argnames)
-
-    def undeclared_identifiers(self):
-        return self.code.undeclared_identifiers.\
-                    difference(self.code.declared_identifiers)
-
-class CallNamespaceTag(Tag):
-
-    def __init__(self, namespace, defname, attributes, **kwargs):
-        super(CallNamespaceTag, self).__init__(
-                    namespace + ":" + defname,
-                    attributes,
-                    tuple(attributes.keys()) + ('args', ),
-                    (),
-                    (),
-                    **kwargs)
-
-        self.expression = "%s.%s(%s)" % (
-                                namespace,
-                                defname,
-                                ",".join(["%s=%s" % (k, v) for k, v in
-                                            self.parsed_attributes.iteritems()
-                                            if k != 'args'])
-                            )
-        self.code = ast.PythonCode(self.expression, **self.exception_kwargs)
-        self.body_decl = ast.FunctionArgs(
-                                    attributes.get('args', ''),
-                                    **self.exception_kwargs)
-
-    def declared_identifiers(self):
-        return self.code.declared_identifiers.union(self.body_decl.argnames)
-
-    def undeclared_identifiers(self):
-        return self.code.undeclared_identifiers.\
-                    difference(self.code.declared_identifiers)
-
-class InheritTag(Tag):
-    __keyword__ = 'inherit'
-
-    def __init__(self, keyword, attributes, **kwargs):
-        super(InheritTag, self).__init__(
-                                keyword, attributes,
-                                ('file',), (), ('file',), **kwargs)
-
-class PageTag(Tag):
-    __keyword__ = 'page'
-
-    def __init__(self, keyword, attributes, **kwargs):
-        expressions =   ['cached', 'args', 'expression_filter', 'enable_loop'] + [
-                    c for c in attributes if c.startswith('cache_')]
-
-        super(PageTag, self).__init__(
-                keyword,
-                attributes,
-                expressions,
-                (),
-                (),
-                **kwargs)
-        self.body_decl = ast.FunctionArgs(attributes.get('args', ''),
-                                            **self.exception_kwargs)
-        self.filter_args = ast.ArgumentList(
-                                attributes.get('expression_filter', ''),
-                                **self.exception_kwargs)
-
-    def declared_identifiers(self):
-        return self.body_decl.argnames
-
-
diff --git a/lib/mako-0.7.2/mako/pygen.py b/lib/mako-0.7.2/mako/pygen.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/pygen.py
+++ /dev/null
@@ -1,283 +0,0 @@
-# mako/pygen.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""utilities for generating and formatting literal Python code."""
-
-import re, string
-from StringIO import StringIO
-from mako import exceptions
-
-class PythonPrinter(object):
-    def __init__(self, stream):
-        # indentation counter
-        self.indent = 0
-
-        # a stack storing information about why we incremented
-        # the indentation counter, to help us determine if we
-        # should decrement it
-        self.indent_detail = []
-
-        # the string of whitespace multiplied by the indent
-        # counter to produce a line
-        self.indentstring = "    "
-
-        # the stream we are writing to
-        self.stream = stream
-
-        # a list of lines that represents a buffered "block" of code,
-        # which can be later printed relative to an indent level
-        self.line_buffer = []
-
-        self.in_indent_lines = False
-
-        self._reset_multi_line_flags()
-
-    def write(self, text):
-        self.stream.write(text)
-
-    def write_indented_block(self, block):
-        """print a line or lines of python which already contain indentation.
-
-        The indentation of the total block of lines will be adjusted to that of
-        the current indent level."""
-        self.in_indent_lines = False
-        for l in re.split(r'\r?\n', block):
-            self.line_buffer.append(l)
-
-    def writelines(self, *lines):
-        """print a series of lines of python."""
-        for line in lines:
-            self.writeline(line)
-
-    def writeline(self, line):
-        """print a line of python, indenting it according to the current
-        indent level.
-
-        this also adjusts the indentation counter according to the
-        content of the line.
-
-        """
-
-        if not self.in_indent_lines:
-            self._flush_adjusted_lines()
-            self.in_indent_lines = True
-
-        if (line is None or
-            re.match(r"^\s*#",line) or
-            re.match(r"^\s*$", line)
-            ):
-            hastext = False
-        else:
-            hastext = True
-
-        is_comment = line and len(line) and line[0] == '#'
-
-        # see if this line should decrease the indentation level
-        if (not is_comment and
-            (not hastext or self._is_unindentor(line))
-            ):
-
-            if self.indent > 0:
-                self.indent -=1
-                # if the indent_detail stack is empty, the user
-                # probably put extra closures - the resulting
-                # module wont compile.
-                if len(self.indent_detail) == 0:
-                    raise exceptions.SyntaxException(
-                                    "Too many whitespace closures")
-                self.indent_detail.pop()
-
-        if line is None:
-            return
-
-        # write the line
-        self.stream.write(self._indent_line(line) + "\n")
-
-        # see if this line should increase the indentation level.
-        # note that a line can both decrase (before printing) and
-        # then increase (after printing) the indentation level.
-
-        if re.search(r":[ \t]*(?:#.*)?$", line):
-            # increment indentation count, and also
-            # keep track of what the keyword was that indented us,
-            # if it is a python compound statement keyword
-            # where we might have to look for an "unindent" keyword
-            match = re.match(r"^\s*(if|try|elif|while|for|with)", line)
-            if match:
-                # its a "compound" keyword, so we will check for "unindentors"
-                indentor = match.group(1)
-                self.indent +=1
-                self.indent_detail.append(indentor)
-            else:
-                indentor = None
-                # its not a "compound" keyword.  but lets also
-                # test for valid Python keywords that might be indenting us,
-                # else assume its a non-indenting line
-                m2 = re.match(r"^\s*(def|class|else|elif|except|finally)",
-                              line)
-                if m2:
-                    self.indent += 1
-                    self.indent_detail.append(indentor)
-
-    def close(self):
-        """close this printer, flushing any remaining lines."""
-        self._flush_adjusted_lines()
-
-    def _is_unindentor(self, line):
-        """return true if the given line is an 'unindentor',
-        relative to the last 'indent' event received.
-
-        """
-
-        # no indentation detail has been pushed on; return False
-        if len(self.indent_detail) == 0:
-            return False
-
-        indentor = self.indent_detail[-1]
-
-        # the last indent keyword we grabbed is not a
-        # compound statement keyword; return False
-        if indentor is None:
-            return False
-
-        # if the current line doesnt have one of the "unindentor" keywords,
-        # return False
-        match = re.match(r"^\s*(else|elif|except|finally).*\:", line)
-        if not match:
-            return False
-
-        # whitespace matches up, we have a compound indentor,
-        # and this line has an unindentor, this
-        # is probably good enough
-        return True
-
-        # should we decide that its not good enough, heres
-        # more stuff to check.
-        #keyword = match.group(1)
-
-        # match the original indent keyword
-        #for crit in [
-        #   (r'if|elif', r'else|elif'),
-        #   (r'try', r'except|finally|else'),
-        #   (r'while|for', r'else'),
-        #]:
-        #   if re.match(crit[0], indentor) and re.match(crit[1], keyword):
-        #        return True
-
-        #return False
-
-    def _indent_line(self, line, stripspace=''):
-        """indent the given line according to the current indent level.
-
-        stripspace is a string of space that will be truncated from the
-        start of the line before indenting."""
-
-        return re.sub(r"^%s" % stripspace, self.indentstring
-                      * self.indent, line)
-
-    def _reset_multi_line_flags(self):
-        """reset the flags which would indicate we are in a backslashed
-        or triple-quoted section."""
-
-        self.backslashed, self.triplequoted = False, False
-
-    def _in_multi_line(self, line):
-        """return true if the given line is part of a multi-line block,
-        via backslash or triple-quote."""
-
-        # we are only looking for explicitly joined lines here, not
-        # implicit ones (i.e. brackets, braces etc.).  this is just to
-        # guard against the possibility of modifying the space inside of
-        # a literal multiline string with unfortunately placed
-        # whitespace
-
-        current_state = (self.backslashed or self.triplequoted)
-
-        if re.search(r"\\$", line):
-            self.backslashed = True
-        else:
-            self.backslashed = False
-
-        triples = len(re.findall(r"\"\"\"|\'\'\'", line))
-        if triples == 1 or triples % 2 != 0:
-            self.triplequoted = not self.triplequoted
-
-        return current_state
-
-    def _flush_adjusted_lines(self):
-        stripspace = None
-        self._reset_multi_line_flags()
-
-        for entry in self.line_buffer:
-            if self._in_multi_line(entry):
-                self.stream.write(entry + "\n")
-            else:
-                entry = entry.expandtabs()
-                if stripspace is None and re.search(r"^[ \t]*[^# \t]", entry):
-                    stripspace = re.match(r"^([ \t]*)", entry).group(1)
-                self.stream.write(self._indent_line(entry, stripspace) + "\n")
-
-        self.line_buffer = []
-        self._reset_multi_line_flags()
-
-
-def adjust_whitespace(text):
-    """remove the left-whitespace margin of a block of Python code."""
-
-    state = [False, False]
-    (backslashed, triplequoted) = (0, 1)
-
-    def in_multi_line(line):
-        start_state = (state[backslashed] or state[triplequoted])
-
-        if re.search(r"\\$", line):
-            state[backslashed] = True
-        else:
-            state[backslashed] = False
-
-        def match(reg, t):
-            m = re.match(reg, t)
-            if m:
-                return m, t[len(m.group(0)):]
-            else:
-                return None, t
-
-        while line:
-            if state[triplequoted]:
-                m, line = match(r"%s" % state[triplequoted], line)
-                if m:
-                    state[triplequoted] = False
-                else:
-                    m, line = match(r".*?(?=%s|$)" % state[triplequoted], line)
-            else:
-                m, line = match(r'#', line)
-                if m:
-                    return start_state
-
-                m, line = match(r"\"\"\"|\'\'\'", line)
-                if m:
-                    state[triplequoted] = m.group(0)
-                    continue
-
-                m, line = match(r".*?(?=\"\"\"|\'\'\'|#|$)", line)
-
-        return start_state
-
-    def _indent_line(line, stripspace = ''):
-        return re.sub(r"^%s" % stripspace, '', line)
-
-    lines = []
-    stripspace = None
-
-    for line in re.split(r'\r?\n', text):
-        if in_multi_line(line):
-            lines.append(line)
-        else:
-            line = line.expandtabs()
-            if stripspace is None and re.search(r"^[ \t]*[^# \t]", line):
-                stripspace = re.match(r"^([ \t]*)", line).group(1)
-            lines.append(_indent_line(line, stripspace))
-    return "\n".join(lines)
diff --git a/lib/mako-0.7.2/mako/pyparser.py b/lib/mako-0.7.2/mako/pyparser.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/pyparser.py
+++ /dev/null
@@ -1,535 +0,0 @@
-# mako/pyparser.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""Handles parsing of Python code.
-
-Parsing to AST is done via _ast on Python > 2.5, otherwise the compiler
-module is used.
-"""
-
-from StringIO import StringIO
-from mako import exceptions, util
-import operator
-
-if util.py3k:
-    # words that cannot be assigned to (notably
-    # smaller than the total keys in __builtins__)
-    reserved = set(['True', 'False', 'None', 'print'])
-
-    # the "id" attribute on a function node
-    arg_id = operator.attrgetter('arg')
-else:
-    # words that cannot be assigned to (notably
-    # smaller than the total keys in __builtins__)
-    reserved = set(['True', 'False', 'None'])
-
-    # the "id" attribute on a function node
-    arg_id = operator.attrgetter('id')
-
-
-try:
-    import _ast
-    util.restore__ast(_ast)
-    import _ast_util
-except ImportError:
-    _ast = None
-    from compiler import parse as compiler_parse
-    from compiler import visitor
-
-
-def parse(code, mode='exec', **exception_kwargs):
-    """Parse an expression into AST"""
-
-
-    try:
-        if _ast:
-            return _ast_util.parse(code, '<unknown>', mode)
-        else:
-            if isinstance(code, unicode):
-                code = code.encode('ascii', 'backslashreplace')
-            return compiler_parse(code, mode)
-    except Exception, e:
-        raise exceptions.SyntaxException(
-                    "(%s) %s (%r)" % (
-                        e.__class__.__name__,
-                        e,
-                        code[0:50]
-                    ), **exception_kwargs)
-
-
-if _ast:
-    class FindIdentifiers(_ast_util.NodeVisitor):
-
-        def __init__(self, listener, **exception_kwargs):
-            self.in_function = False
-            self.in_assign_targets = False
-            self.local_ident_stack = set()
-            self.listener = listener
-            self.exception_kwargs = exception_kwargs
-
-        def _add_declared(self, name):
-            if not self.in_function:
-                self.listener.declared_identifiers.add(name)
-            else:
-                self.local_ident_stack.add(name)
-
-        def visit_ClassDef(self, node):
-            self._add_declared(node.name)
-
-        def visit_Assign(self, node):
-
-            # flip around the visiting of Assign so the expression gets
-            # evaluated first, in the case of a clause like "x=x+5" (x
-            # is undeclared)
-
-            self.visit(node.value)
-            in_a = self.in_assign_targets
-            self.in_assign_targets = True
-            for n in node.targets:
-                self.visit(n)
-            self.in_assign_targets = in_a
-
-        if util.py3k:
-
-            # ExceptHandler is in Python 2, but this block only works in
-            # Python 3 (and is required there)
-
-            def visit_ExceptHandler(self, node):
-                if node.name is not None:
-                    self._add_declared(node.name)
-                if node.type is not None:
-                    self.listener.undeclared_identifiers.add(node.type.id)
-                for statement in node.body:
-                    self.visit(statement)
-
-        def visit_Lambda(self, node, *args):
-            self._visit_function(node, True)
-
-        def visit_FunctionDef(self, node):
-            self._add_declared(node.name)
-            self._visit_function(node, False)
-
-        def _visit_function(self, node, islambda):
-
-            # push function state onto stack.  dont log any more
-            # identifiers as "declared" until outside of the function,
-            # but keep logging identifiers as "undeclared". track
-            # argument names in each function header so they arent
-            # counted as "undeclared"
-
-            inf = self.in_function
-            self.in_function = True
-
-            local_ident_stack = self.local_ident_stack
-            self.local_ident_stack = local_ident_stack.union([
-                arg_id(arg) for arg in node.args.args
-            ])
-            if islambda:
-                self.visit(node.body)
-            else:
-                for n in node.body:
-                    self.visit(n)
-            self.in_function = inf
-            self.local_ident_stack = local_ident_stack
-
-        def visit_For(self, node):
-
-            # flip around visit
-
-            self.visit(node.iter)
-            self.visit(node.target)
-            for statement in node.body:
-                self.visit(statement)
-            for statement in node.orelse:
-                self.visit(statement)
-
-        def visit_Name(self, node):
-            if isinstance(node.ctx, _ast.Store):
-                # this is eqiuvalent to visit_AssName in 
-                # compiler
-                self._add_declared(node.id)
-            elif node.id not in reserved and node.id \
-                not in self.listener.declared_identifiers and node.id \
-                not in self.local_ident_stack:
-                self.listener.undeclared_identifiers.add(node.id)
-
-        def visit_Import(self, node):
-            for name in node.names:
-                if name.asname is not None:
-                    self._add_declared(name.asname)
-                else:
-                    self._add_declared(name.name.split('.')[0])
-
-        def visit_ImportFrom(self, node):
-            for name in node.names:
-                if name.asname is not None:
-                    self._add_declared(name.asname)
-                else:
-                    if name.name == '*':
-                        raise exceptions.CompileException(
-                          "'import *' is not supported, since all identifier "
-                          "names must be explicitly declared.  Please use the "
-                          "form 'from <modulename> import <name1>, <name2>, "
-                          "...' instead.", **self.exception_kwargs)
-                    self._add_declared(name.name)
-
-
-    class FindTuple(_ast_util.NodeVisitor):
-
-        def __init__(self, listener, code_factory, **exception_kwargs):
-            self.listener = listener
-            self.exception_kwargs = exception_kwargs
-            self.code_factory = code_factory
-
-        def visit_Tuple(self, node):
-            for n in node.elts:
-                p = self.code_factory(n, **self.exception_kwargs)
-                self.listener.codeargs.append(p)
-                self.listener.args.append(ExpressionGenerator(n).value())
-                self.listener.declared_identifiers = \
-                    self.listener.declared_identifiers.union(
-                                                    p.declared_identifiers)
-                self.listener.undeclared_identifiers = \
-                    self.listener.undeclared_identifiers.union(
-                                                    p.undeclared_identifiers)
-
-
-    class ParseFunc(_ast_util.NodeVisitor):
-
-        def __init__(self, listener, **exception_kwargs):
-            self.listener = listener
-            self.exception_kwargs = exception_kwargs
-
-        def visit_FunctionDef(self, node):
-            self.listener.funcname = node.name
-            argnames = [arg_id(arg) for arg in node.args.args]
-            if node.args.vararg:
-                argnames.append(node.args.vararg)
-            if node.args.kwarg:
-                argnames.append(node.args.kwarg)
-            self.listener.argnames = argnames
-            self.listener.defaults = node.args.defaults  # ast
-            self.listener.varargs = node.args.vararg
-            self.listener.kwargs = node.args.kwarg
-
-
-    class ExpressionGenerator(object):
-
-        def __init__(self, astnode):
-            self.generator = _ast_util.SourceGenerator(' ' * 4)
-            self.generator.visit(astnode)
-
-        def value(self):
-            return ''.join(self.generator.result)
-else:
-    class FindIdentifiers(object):
-
-        def __init__(self, listener, **exception_kwargs):
-            self.in_function = False
-            self.local_ident_stack = set()
-            self.listener = listener
-            self.exception_kwargs = exception_kwargs
-
-        def _add_declared(self, name):
-            if not self.in_function:
-                self.listener.declared_identifiers.add(name)
-            else:
-                self.local_ident_stack.add(name)
-
-        def visitClass(self, node, *args):
-            self._add_declared(node.name)
-
-        def visitAssName(self, node, *args):
-            self._add_declared(node.name)
-
-        def visitAssign(self, node, *args):
-
-            # flip around the visiting of Assign so the expression gets
-            # evaluated first, in the case of a clause like "x=x+5" (x
-            # is undeclared)
-            self.visit(node.expr, *args)
-            for n in node.nodes:
-                self.visit(n, *args)
-
-        def visitLambda(self, node, *args):
-            self._visit_function(node, args)
-
-        def visitFunction(self, node, *args):
-            self._add_declared(node.name)
-            self._visit_function(node, args)
-
-        def _visit_function(self, node, args):
-
-            # push function state onto stack.  dont log any more
-            # identifiers as "declared" until outside of the function,
-            # but keep logging identifiers as "undeclared". track
-            # argument names in each function header so they arent
-            # counted as "undeclared"
-
-            inf = self.in_function
-            self.in_function = True
-
-            local_ident_stack = self.local_ident_stack
-            self.local_ident_stack = local_ident_stack.union([
-                arg for arg in node.argnames
-            ])
-
-            for n in node.getChildNodes():
-                self.visit(n, *args)
-            self.in_function = inf
-            self.local_ident_stack = local_ident_stack
-
-        def visitFor(self, node, *args):
-
-            # flip around visit
-
-            self.visit(node.list, *args)
-            self.visit(node.assign, *args)
-            self.visit(node.body, *args)
-
-        def visitName(self, node, *args):
-            if node.name not in reserved and node.name \
-                not in self.listener.declared_identifiers and node.name \
-                not in self.local_ident_stack:
-                self.listener.undeclared_identifiers.add(node.name)
-
-        def visitImport(self, node, *args):
-            for mod, alias in node.names:
-                if alias is not None:
-                    self._add_declared(alias)
-                else:
-                    self._add_declared(mod.split('.')[0])
-
-        def visitFrom(self, node, *args):
-            for mod, alias in node.names:
-                if alias is not None:
-                    self._add_declared(alias)
-                else:
-                    if mod == '*':
-                        raise exceptions.CompileException(
-                        "'import *' is not supported, since all identifier "
-                        "names must be explicitly declared.  Please use the "
-                        "form 'from <modulename> import <name1>, <name2>, "
-                        "...' instead.", **self.exception_kwargs)
-                    self._add_declared(mod)
-
-        def visit(self, expr):
-            visitor.walk(expr, self)  # , walker=walker())
-
-
-    class FindTuple(object):
-
-        def __init__(self, listener, code_factory, **exception_kwargs):
-            self.listener = listener
-            self.exception_kwargs = exception_kwargs
-            self.code_factory = code_factory
-
-        def visitTuple(self, node, *args):
-            for n in node.nodes:
-                p = self.code_factory(n, **self.exception_kwargs)
-                self.listener.codeargs.append(p)
-                self.listener.args.append(ExpressionGenerator(n).value())
-                self.listener.declared_identifiers = \
-                    self.listener.declared_identifiers.union(
-                                                      p.declared_identifiers)
-                self.listener.undeclared_identifiers = \
-                    self.listener.undeclared_identifiers.union(
-                                                      p.undeclared_identifiers)
-
-        def visit(self, expr):
-            visitor.walk(expr, self)  # , walker=walker())
-
-
-    class ParseFunc(object):
-
-        def __init__(self, listener, **exception_kwargs):
-            self.listener = listener
-            self.exception_kwargs = exception_kwargs
-
-        def visitFunction(self, node, *args):
-            self.listener.funcname = node.name
-            self.listener.argnames = node.argnames
-            self.listener.defaults = node.defaults
-            self.listener.varargs = node.varargs
-            self.listener.kwargs = node.kwargs
-
-        def visit(self, expr):
-            visitor.walk(expr, self)
-
-
-    class ExpressionGenerator(object):
-
-        """given an AST node, generates an equivalent literal Python
-        expression."""
-
-        def __init__(self, astnode):
-            self.buf = StringIO()
-            visitor.walk(astnode, self)  # , walker=walker())
-
-        def value(self):
-            return self.buf.getvalue()
-
-        def operator(self, op, node, *args):
-            self.buf.write('(')
-            self.visit(node.left, *args)
-            self.buf.write(' %s ' % op)
-            self.visit(node.right, *args)
-            self.buf.write(')')
-
-        def booleanop(self, op, node, *args):
-            self.visit(node.nodes[0])
-            for n in node.nodes[1:]:
-                self.buf.write(' ' + op + ' ')
-                self.visit(n, *args)
-
-        def visitConst(self, node, *args):
-            self.buf.write(repr(node.value))
-
-        def visitAssName(self, node, *args):
-
-            # TODO: figure out OP_ASSIGN, other OP_s
-
-            self.buf.write(node.name)
-
-        def visitName(self, node, *args):
-            self.buf.write(node.name)
-
-        def visitMul(self, node, *args):
-            self.operator('*', node, *args)
-
-        def visitAnd(self, node, *args):
-            self.booleanop('and', node, *args)
-
-        def visitOr(self, node, *args):
-            self.booleanop('or', node, *args)
-
-        def visitBitand(self, node, *args):
-            self.booleanop('&', node, *args)
-
-        def visitBitor(self, node, *args):
-            self.booleanop('|', node, *args)
-
-        def visitBitxor(self, node, *args):
-            self.booleanop('^', node, *args)
-
-        def visitAdd(self, node, *args):
-            self.operator('+', node, *args)
-
-        def visitGetattr(self, node, *args):
-            self.visit(node.expr, *args)
-            self.buf.write('.%s' % node.attrname)
-
-        def visitSub(self, node, *args):
-            self.operator('-', node, *args)
-
-        def visitNot(self, node, *args):
-            self.buf.write('not ')
-            self.visit(node.expr)
-
-        def visitDiv(self, node, *args):
-            self.operator('/', node, *args)
-
-        def visitFloorDiv(self, node, *args):
-            self.operator('//', node, *args)
-
-        def visitSubscript(self, node, *args):
-            self.visit(node.expr)
-            self.buf.write('[')
-            [self.visit(x) for x in node.subs]
-            self.buf.write(']')
-
-        def visitUnarySub(self, node, *args):
-            self.buf.write('-')
-            self.visit(node.expr)
-
-        def visitUnaryAdd(self, node, *args):
-            self.buf.write('-')
-            self.visit(node.expr)
-
-        def visitSlice(self, node, *args):
-            self.visit(node.expr)
-            self.buf.write('[')
-            if node.lower is not None:
-                self.visit(node.lower)
-            self.buf.write(':')
-            if node.upper is not None:
-                self.visit(node.upper)
-            self.buf.write(']')
-
-        def visitDict(self, node):
-            self.buf.write('{')
-            c = node.getChildren()
-            for i in range(0, len(c), 2):
-                self.visit(c[i])
-                self.buf.write(': ')
-                self.visit(c[i + 1])
-                if i < len(c) - 2:
-                    self.buf.write(', ')
-            self.buf.write('}')
-
-        def visitTuple(self, node):
-            self.buf.write('(')
-            c = node.getChildren()
-            for i in range(0, len(c)):
-                self.visit(c[i])
-                if i < len(c) - 1:
-                    self.buf.write(', ')
-            self.buf.write(')')
-
-        def visitList(self, node):
-            self.buf.write('[')
-            c = node.getChildren()
-            for i in range(0, len(c)):
-                self.visit(c[i])
-                if i < len(c) - 1:
-                    self.buf.write(', ')
-            self.buf.write(']')
-
-        def visitListComp(self, node):
-            self.buf.write('[')
-            self.visit(node.expr)
-            self.buf.write(' ')
-            for n in node.quals:
-                self.visit(n)
-            self.buf.write(']')
-
-        def visitListCompFor(self, node):
-            self.buf.write(' for ')
-            self.visit(node.assign)
-            self.buf.write(' in ')
-            self.visit(node.list)
-            for n in node.ifs:
-                self.visit(n)
-
-        def visitListCompIf(self, node):
-            self.buf.write(' if ')
-            self.visit(node.test)
-
-        def visitCompare(self, node):
-            self.visit(node.expr)
-            for tup in node.ops:
-                self.buf.write(tup[0])
-                self.visit(tup[1])
-
-        def visitCallFunc(self, node, *args):
-            self.visit(node.node)
-            self.buf.write('(')
-            if len(node.args):
-                self.visit(node.args[0])
-                for a in node.args[1:]:
-                    self.buf.write(', ')
-                    self.visit(a)
-            self.buf.write(')')
-
-
-    class walker(visitor.ASTVisitor):
-
-        def dispatch(self, node, *args):
-            print 'Node:', str(node)
-
-            # print "dir:", dir(node)
-
-            return visitor.ASTVisitor.dispatch(self, node, *args)
diff --git a/lib/mako-0.7.2/mako/runtime.py b/lib/mako-0.7.2/mako/runtime.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/runtime.py
+++ /dev/null
@@ -1,841 +0,0 @@
-# mako/runtime.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""provides runtime services for templates, including Context,
-Namespace, and various helper functions."""
-
-from mako import exceptions, util
-import __builtin__, inspect, sys
-
-
-class Context(object):
-    """Provides runtime namespace, output buffer, and various
-    callstacks for templates.
-
-    See :ref:`runtime_toplevel` for detail on the usage of
-    :class:`.Context`.
-
-     """
-
-    def __init__(self, buffer, **data):
-        self._buffer_stack = [buffer]
-
-        self._data = data
-
-        self._kwargs = data.copy()
-        self._with_template = None
-        self._outputting_as_unicode = None
-        self.namespaces = {}
-
-        # "capture" function which proxies to the
-        # generic "capture" function
-        self._data['capture'] = util.partial(capture, self)
-
-        # "caller" stack used by def calls with content
-        self.caller_stack = self._data['caller'] = CallerStack()
-
-    def _set_with_template(self, t):
-        self._with_template = t
-        illegal_names = t.reserved_names.intersection(self._data)
-        if illegal_names:
-            raise exceptions.NameConflictError(
-                "Reserved words passed to render(): %s" %
-                ", ".join(illegal_names))
-
-    @property
-    def lookup(self):
-        """Return the :class:`.TemplateLookup` associated
-        with this :class:`.Context`.
-
-        """
-        return self._with_template.lookup
-
-    @property
-    def kwargs(self):
-        """Return the dictionary of keyword arguments associated with this
-        :class:`.Context`.
-
-        """
-        return self._kwargs.copy()
-
-    def push_caller(self, caller):
-        """Push a ``caller`` callable onto the callstack for
-        this :class:`.Context`."""
-
-
-        self.caller_stack.append(caller)
-
-    def pop_caller(self):
-        """Pop a ``caller`` callable onto the callstack for this
-        :class:`.Context`."""
-
-        del self.caller_stack[-1]
-
-    def keys(self):
-        """Return a list of all names established in this :class:`.Context`."""
-
-        return self._data.keys()
-
-    def __getitem__(self, key):
-        if key in self._data:
-            return self._data[key]
-        else:
-            return __builtin__.__dict__[key]
-
-    def _push_writer(self):
-        """push a capturing buffer onto this Context and return
-        the new writer function."""
-
-        buf = util.FastEncodingBuffer()
-        self._buffer_stack.append(buf)
-        return buf.write
-
-    def _pop_buffer_and_writer(self):
-        """pop the most recent capturing buffer from this Context
-        and return the current writer after the pop.
-
-        """
-
-        buf = self._buffer_stack.pop()
-        return buf, self._buffer_stack[-1].write
-
-    def _push_buffer(self):
-        """push a capturing buffer onto this Context."""
-
-        self._push_writer()
-
-    def _pop_buffer(self):
-        """pop the most recent capturing buffer from this Context."""
-
-        return self._buffer_stack.pop()
-
-    def get(self, key, default=None):
-        """Return a value from this :class:`.Context`."""
-
-        return self._data.get(key,
-                __builtin__.__dict__.get(key, default)
-                )
-
-    def write(self, string):
-        """Write a string to this :class:`.Context` object's
-        underlying output buffer."""
-
-        self._buffer_stack[-1].write(string)
-
-    def writer(self):
-        """Return the current writer function."""
-
-        return self._buffer_stack[-1].write
-
-    def _copy(self):
-        c = Context.__new__(Context)
-        c._buffer_stack = self._buffer_stack
-        c._data = self._data.copy()
-        c._kwargs = self._kwargs
-        c._with_template = self._with_template
-        c._outputting_as_unicode = self._outputting_as_unicode
-        c.namespaces = self.namespaces
-        c.caller_stack = self.caller_stack
-        return c
-
-    def locals_(self, d):
-        """Create a new :class:`.Context` with a copy of this
-        :class:`.Context`'s current state, updated with the given dictionary."""
-
-        if len(d) == 0:
-            return self
-        c = self._copy()
-        c._data.update(d)
-        return c
-
-    def _clean_inheritance_tokens(self):
-        """create a new copy of this :class:`.Context`. with
-        tokens related to inheritance state removed."""
-
-        c = self._copy()
-        x = c._data
-        x.pop('self', None)
-        x.pop('parent', None)
-        x.pop('next', None)
-        return c
-
-class CallerStack(list):
-    def __init__(self):
-        self.nextcaller = None
-    def __nonzero__(self):
-        return self._get_caller() and True or False
-    def _get_caller(self):
-        # this method can be removed once
-        # codegen MAGIC_NUMBER moves past 7
-        return self[-1]
-    def __getattr__(self, key):
-        return getattr(self._get_caller(), key)
-    def _push_frame(self):
-        frame = self.nextcaller or None
-        self.append(frame)
-        self.nextcaller = None
-        return frame
-    def _pop_frame(self):
-        self.nextcaller = self.pop()
-
-
-class Undefined(object):
-    """Represents an undefined value in a template.
-
-    All template modules have a constant value
-    ``UNDEFINED`` present which is an instance of this
-    object.
-
-    """
-    def __str__(self):
-        raise NameError("Undefined")
-    def __nonzero__(self):
-        return False
-
-UNDEFINED = Undefined()
-
-class LoopStack(object):
-    """a stack for LoopContexts that implements the context manager protocol
-    to automatically pop off the top of the stack on context exit
-    """
-
-    def __init__(self):
-        self.stack = []
-
-    def _enter(self, iterable):
-        self._push(iterable)
-        return self._top
-
-    def _exit(self):
-        self._pop()
-        return self._top
-
-    @property
-    def _top(self):
-        if self.stack:
-            return self.stack[-1]
-        else:
-            return self
-
-    def _pop(self):
-        return self.stack.pop()
-
-    def _push(self, iterable):
-        new = LoopContext(iterable)
-        if self.stack:
-            new.parent = self.stack[-1]
-        return self.stack.append(new)
-
-    def __getattr__(self, key):
-        raise exceptions.RuntimeException("No loop context is established")
-
-    def __iter__(self):
-        return iter(self._top)
-
-
-class LoopContext(object):
-    """A magic loop variable.
-    Automatically accessible in any ``% for`` block.
-
-    See the section :ref:`loop_context` for usage
-    notes.
-
-    :attr:`parent` -> :class:`.LoopContext` or ``None``
-        The parent loop, if one exists.
-    :attr:`index` -> `int`
-        The 0-based iteration count.
-    :attr:`reverse_index` -> `int`
-        The number of iterations remaining.
-    :attr:`first` -> `bool`
-        ``True`` on the first iteration, ``False`` otherwise.
-    :attr:`last` -> `bool`
-        ``True`` on the last iteration, ``False`` otherwise.
-    :attr:`even` -> `bool`
-        ``True`` when ``index`` is even.
-    :attr:`odd` -> `bool`
-        ``True`` when ``index`` is odd.
-    """
-
-    def __init__(self, iterable):
-        self._iterable = iterable
-        self.index = 0
-        self.parent = None
-
-    def __iter__(self):
-        for i in self._iterable:
-            yield i
-            self.index += 1
-
-    @util.memoized_instancemethod
-    def __len__(self):
-        return len(self._iterable)
-
-    @property
-    def reverse_index(self):
-        return len(self) - self.index - 1
-
-    @property
-    def first(self):
-        return self.index == 0
-
-    @property
-    def last(self):
-        return self.index == len(self) - 1
-
-    @property
-    def even(self):
-        return not self.odd
-
-    @property
-    def odd(self):
-        return bool(self.index % 2)
-
-    def cycle(self, *values):
-        """Cycle through values as the loop progresses.
-        """
-        if not values:
-            raise ValueError("You must provide values to cycle through")
-        return values[self.index % len(values)]
-
-
-class _NSAttr(object):
-    def __init__(self, parent):
-        self.__parent = parent
-    def __getattr__(self, key):
-        ns = self.__parent
-        while ns:
-            if hasattr(ns.module, key):
-                return getattr(ns.module, key)
-            else:
-                ns = ns.inherits
-        raise AttributeError(key)
-
-class Namespace(object):
-    """Provides access to collections of rendering methods, which
-      can be local, from other templates, or from imported modules.
-
-      To access a particular rendering method referenced by a
-      :class:`.Namespace`, use plain attribute access:
-
-      .. sourcecode:: mako
-
-        ${some_namespace.foo(x, y, z)}
-
-      :class:`.Namespace` also contains several built-in attributes
-      described here.
-
-      """
-
-    def __init__(self, name, context,
-                            callables=None, inherits=None,
-                            populate_self=True, calling_uri=None):
-        self.name = name
-        self.context = context
-        self.inherits = inherits
-        if callables is not None:
-            self.callables = dict([(c.func_name, c) for c in callables])
-
-    callables = ()
-
-    module = None
-    """The Python module referenced by this :class:`.Namespace`.
-
-    If the namespace references a :class:`.Template`, then
-    this module is the equivalent of ``template.module``,
-    i.e. the generated module for the template.
-
-    """
-
-    template = None
-    """The :class:`.Template` object referenced by this
-        :class:`.Namespace`, if any.
-
-    """
-
-    context = None
-    """The :class:`.Context` object for this :class:`.Namespace`.
-
-    Namespaces are often created with copies of contexts that
-    contain slightly different data, particularly in inheritance
-    scenarios. Using the :class:`.Context` off of a :class:`.Namespace` one
-    can traverse an entire chain of templates that inherit from
-    one-another.
-
-    """
-
-    filename = None
-    """The path of the filesystem file used for this
-    :class:`.Namespace`'s module or template.
-
-    If this is a pure module-based
-    :class:`.Namespace`, this evaluates to ``module.__file__``. If a
-    template-based namespace, it evaluates to the original
-    template file location.
-
-    """
-
-    uri = None
-    """The URI for this :class:`.Namespace`'s template.
-
-    I.e. whatever was sent to :meth:`.TemplateLookup.get_template()`.
-
-    This is the equivalent of :attr:`.Template.uri`.
-
-    """
-
-    _templateuri = None
-
-    @util.memoized_property
-    def attr(self):
-        """Access module level attributes by name.
-
-        This accessor allows templates to supply "scalar"
-        attributes which are particularly handy in inheritance
-        relationships. See the example in
-        :ref:`inheritance_toplevel`.
-
-        """
-        return _NSAttr(self)
-
-    def get_namespace(self, uri):
-        """Return a :class:`.Namespace` corresponding to the given ``uri``.
-
-        If the given ``uri`` is a relative URI (i.e. it does not
-        contain a leading slash ``/``), the ``uri`` is adjusted to
-        be relative to the ``uri`` of the namespace itself. This
-        method is therefore mostly useful off of the built-in
-        ``local`` namespace, described in :ref:`namespace_local`.
-
-        In
-        most cases, a template wouldn't need this function, and
-        should instead use the ``<%namespace>`` tag to load
-        namespaces. However, since all ``<%namespace>`` tags are
-        evaluated before the body of a template ever runs,
-        this method can be used to locate namespaces using
-        expressions that were generated within the body code of
-        the template, or to conditionally use a particular
-        namespace.
-
-        """
-        key = (self, uri)
-        if key in self.context.namespaces:
-            return self.context.namespaces[key]
-        else:
-            ns = TemplateNamespace(uri, self.context._copy(),
-                                templateuri=uri,
-                                calling_uri=self._templateuri)
-            self.context.namespaces[key] = ns
-            return ns
-
-    def get_template(self, uri):
-        """Return a :class:`.Template` from the given ``uri``.
-
-        The ``uri`` resolution is relative to the ``uri`` of this :class:`.Namespace`
-        object's :class:`.Template`.
-
-        """
-        return _lookup_template(self.context, uri, self._templateuri)
-
-    def get_cached(self, key, **kwargs):
-        """Return a value from the :class:`.Cache` referenced by this
-        :class:`.Namespace` object's :class:`.Template`.
-
-        The advantage to this method versus direct access to the
-        :class:`.Cache` is that the configuration parameters
-        declared in ``<%page>`` take effect here, thereby calling
-        up the same configured backend as that configured
-        by ``<%page>``.
-
-        """
-
-        return self.cache.get(key, **kwargs)
-
-    @property
-    def cache(self):
-        """Return the :class:`.Cache` object referenced
-        by this :class:`.Namespace` object's
-        :class:`.Template`.
-
-        """
-        return self.template.cache
-
-    def include_file(self, uri, **kwargs):
-        """Include a file at the given ``uri``."""
-
-        _include_file(self.context, uri, self._templateuri, **kwargs)
-
-    def _populate(self, d, l):
-        for ident in l:
-            if ident == '*':
-                for (k, v) in self._get_star():
-                    d[k] = v
-            else:
-                d[ident] = getattr(self, ident)
-
-    def _get_star(self):
-        if self.callables:
-            for key in self.callables:
-                yield (key, self.callables[key])
-
-    def __getattr__(self, key):
-        if key in self.callables:
-            val = self.callables[key]
-        elif self.inherits:
-            val = getattr(self.inherits, key)
-        else:
-            raise AttributeError(
-                    "Namespace '%s' has no member '%s'" %
-                    (self.name, key))
-        setattr(self, key, val)
-        return val
-
-class TemplateNamespace(Namespace):
-    """A :class:`.Namespace` specific to a :class:`.Template` instance."""
-
-    def __init__(self, name, context, template=None, templateuri=None,
-                            callables=None, inherits=None,
-                            populate_self=True, calling_uri=None):
-        self.name = name
-        self.context = context
-        self.inherits = inherits
-        if callables is not None:
-            self.callables = dict([(c.func_name, c) for c in callables])
-
-        if templateuri is not None:
-            self.template = _lookup_template(context, templateuri,
-                                                calling_uri)
-            self._templateuri = self.template.module._template_uri
-        elif template is not None:
-            self.template = template
-            self._templateuri = template.module._template_uri
-        else:
-            raise TypeError("'template' argument is required.")
-
-        if populate_self:
-            lclcallable, lclcontext = \
-                        _populate_self_namespace(context, self.template,
-                                                    self_ns=self)
-
-    @property
-    def module(self):
-        """The Python module referenced by this :class:`.Namespace`.
-
-        If the namespace references a :class:`.Template`, then
-        this module is the equivalent of ``template.module``,
-        i.e. the generated module for the template.
-
-        """
-        return self.template.module
-
-    @property
-    def filename(self):
-        """The path of the filesystem file used for this
-        :class:`.Namespace`'s module or template.
-        """
-        return self.template.filename
-
-    @property
-    def uri(self):
-        """The URI for this :class:`.Namespace`'s template.
-
-        I.e. whatever was sent to :meth:`.TemplateLookup.get_template()`.
-
-        This is the equivalent of :attr:`.Template.uri`.
-
-        """
-        return self.template.uri
-
-    def _get_star(self):
-        if self.callables:
-            for key in self.callables:
-                yield (key, self.callables[key])
-        def get(key):
-            callable_ = self.template._get_def_callable(key)
-            return util.partial(callable_, self.context)
-        for k in self.template.module._exports:
-            yield (k, get(k))
-
-    def __getattr__(self, key):
-        if key in self.callables:
-            val = self.callables[key]
-        elif self.template.has_def(key):
-            callable_ = self.template._get_def_callable(key)
-            val = util.partial(callable_, self.context)
-        elif self.inherits:
-            val = getattr(self.inherits, key)
-
-        else:
-            raise AttributeError(
-                    "Namespace '%s' has no member '%s'" %
-                    (self.name, key))
-        setattr(self, key, val)
-        return val
-
-class ModuleNamespace(Namespace):
-    """A :class:`.Namespace` specific to a Python module instance."""
-
-    def __init__(self, name, context, module,
-                            callables=None, inherits=None,
-                            populate_self=True, calling_uri=None):
-        self.name = name
-        self.context = context
-        self.inherits = inherits
-        if callables is not None:
-            self.callables = dict([(c.func_name, c) for c in callables])
-
-        mod = __import__(module)
-        for token in module.split('.')[1:]:
-            mod = getattr(mod, token)
-        self.module = mod
-
-    @property
-    def filename(self):
-        """The path of the filesystem file used for this
-        :class:`.Namespace`'s module or template.
-        """
-        return self.module.__file__
-
-    def _get_star(self):
-        if self.callables:
-            for key in self.callables:
-                yield (key, self.callables[key])
-        def get(key):
-            callable_ = getattr(self.module, key)
-            return util.partial(callable_, self.context)
-        for k in dir(self.module):
-            if k[0] != '_':
-                yield (k, get(k))
-
-    def __getattr__(self, key):
-        if key in self.callables:
-            val = self.callables[key]
-        elif hasattr(self.module, key):
-            callable_ = getattr(self.module, key)
-            val = util.partial(callable_, self.context)
-        elif self.inherits:
-            val = getattr(self.inherits, key)
-        else:
-            raise AttributeError(
-                    "Namespace '%s' has no member '%s'" %
-                    (self.name, key))
-        setattr(self, key, val)
-        return val
-
-def supports_caller(func):
-    """Apply a caller_stack compatibility decorator to a plain
-    Python function.
-
-    See the example in :ref:`namespaces_python_modules`.
-
-    """
-
-    def wrap_stackframe(context,  *args, **kwargs):
-        context.caller_stack._push_frame()
-        try:
-            return func(context, *args, **kwargs)
-        finally:
-            context.caller_stack._pop_frame()
-    return wrap_stackframe
-
-def capture(context, callable_, *args, **kwargs):
-    """Execute the given template def, capturing the output into
-    a buffer.
-
-    See the example in :ref:`namespaces_python_modules`.
-
-    """
-
-    if not callable(callable_):
-        raise exceptions.RuntimeException(
-                           "capture() function expects a callable as "
-                           "its argument (i.e. capture(func, *args, **kwargs))"
-                        )
-    context._push_buffer()
-    try:
-        callable_(*args, **kwargs)
-    finally:
-        buf = context._pop_buffer()
-    return buf.getvalue()
-
-def _decorate_toplevel(fn):
-    def decorate_render(render_fn):
-        def go(context, *args, **kw):
-            def y(*args, **kw):
-                return render_fn(context, *args, **kw)
-            try:
-                y.__name__ = render_fn.__name__[7:]
-            except TypeError:
-                # < Python 2.4
-                pass
-            return fn(y)(context, *args, **kw)
-        return go
-    return decorate_render
-
-def _decorate_inline(context, fn):
-    def decorate_render(render_fn):
-        dec = fn(render_fn)
-        def go(*args, **kw):
-            return dec(context, *args, **kw)
-        return go
-    return decorate_render
-
-def _include_file(context, uri, calling_uri, **kwargs):
-    """locate the template from the given uri and include it in
-    the current output."""
-
-    template = _lookup_template(context, uri, calling_uri)
-    (callable_, ctx) = _populate_self_namespace(
-                                context._clean_inheritance_tokens(),
-                                template)
-    callable_(ctx, **_kwargs_for_include(callable_, context._data, **kwargs))
-
-def _inherit_from(context, uri, calling_uri):
-    """called by the _inherit method in template modules to set
-    up the inheritance chain at the start of a template's
-    execution."""
-
-    if uri is None:
-        return None
-    template = _lookup_template(context, uri, calling_uri)
-    self_ns = context['self']
-    ih = self_ns
-    while ih.inherits is not None:
-        ih = ih.inherits
-    lclcontext = context.locals_({'next':ih})
-    ih.inherits = TemplateNamespace("self:%s" % template.uri,
-                                lclcontext,
-                                template = template,
-                                populate_self=False)
-    context._data['parent'] = lclcontext._data['local'] = ih.inherits
-    callable_ = getattr(template.module, '_mako_inherit', None)
-    if callable_ is not None:
-        ret = callable_(template, lclcontext)
-        if ret:
-            return ret
-
-    gen_ns = getattr(template.module, '_mako_generate_namespaces', None)
-    if gen_ns is not None:
-        gen_ns(context)
-    return (template.callable_, lclcontext)
-
-def _lookup_template(context, uri, relativeto):
-    lookup = context._with_template.lookup
-    if lookup is None:
-        raise exceptions.TemplateLookupException(
-                            "Template '%s' has no TemplateLookup associated" %
-                            context._with_template.uri)
-    uri = lookup.adjust_uri(uri, relativeto)
-    try:
-        return lookup.get_template(uri)
-    except exceptions.TopLevelLookupException, e:
-        raise exceptions.TemplateLookupException(str(e))
-
-def _populate_self_namespace(context, template, self_ns=None):
-    if self_ns is None:
-        self_ns = TemplateNamespace('self:%s' % template.uri,
-                                context, template=template,
-                                populate_self=False)
-    context._data['self'] = context._data['local'] = self_ns
-    if hasattr(template.module, '_mako_inherit'):
-        ret = template.module._mako_inherit(template, context)
-        if ret:
-            return ret
-    return (template.callable_, context)
-
-def _render(template, callable_, args, data, as_unicode=False):
-    """create a Context and return the string
-    output of the given template and template callable."""
-
-    if as_unicode:
-        buf = util.FastEncodingBuffer(unicode=True)
-    elif template.bytestring_passthrough:
-        buf = util.StringIO()
-    else:
-        buf = util.FastEncodingBuffer(
-                        unicode=as_unicode,
-                        encoding=template.output_encoding,
-                        errors=template.encoding_errors)
-    context = Context(buf, **data)
-    context._outputting_as_unicode = as_unicode
-    context._set_with_template(template)
-
-    _render_context(template, callable_, context, *args,
-                            **_kwargs_for_callable(callable_, data))
-    return context._pop_buffer().getvalue()
-
-def _kwargs_for_callable(callable_, data):
-    argspec = util.inspect_func_args(callable_)
-    # for normal pages, **pageargs is usually present
-    if argspec[2]:
-        return data
-
-    # for rendering defs from the top level, figure out the args
-    namedargs = argspec[0] + [v for v in argspec[1:3] if v is not None]
-    kwargs = {}
-    for arg in namedargs:
-        if arg != 'context' and arg in data and arg not in kwargs:
-            kwargs[arg] = data[arg]
-    return kwargs
-
-def _kwargs_for_include(callable_, data, **kwargs):
-    argspec = util.inspect_func_args(callable_)
-    namedargs = argspec[0] + [v for v in argspec[1:3] if v is not None]
-    for arg in namedargs:
-        if arg != 'context' and arg in data and arg not in kwargs:
-            kwargs[arg] = data[arg]
-    return kwargs
-
-def _render_context(tmpl, callable_, context, *args, **kwargs):
-    import mako.template as template
-    # create polymorphic 'self' namespace for this
-    # template with possibly updated context
-    if not isinstance(tmpl, template.DefTemplate):
-        # if main render method, call from the base of the inheritance stack
-        (inherit, lclcontext) = _populate_self_namespace(context, tmpl)
-        _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
-    else:
-        # otherwise, call the actual rendering method specified
-        (inherit, lclcontext) = _populate_self_namespace(context, tmpl.parent)
-        _exec_template(callable_, context, args=args, kwargs=kwargs)
-
-def _exec_template(callable_, context, args=None, kwargs=None):
-    """execute a rendering callable given the callable, a
-    Context, and optional explicit arguments
-
-    the contextual Template will be located if it exists, and
-    the error handling options specified on that Template will
-    be interpreted here.
-    """
-    template = context._with_template
-    if template is not None and \
-            (template.format_exceptions or template.error_handler):
-        error = None
-        try:
-            callable_(context, *args, **kwargs)
-        except Exception, e:
-            _render_error(template, context, e)
-        except:
-            e = sys.exc_info()[0]
-            _render_error(template, context, e)
-    else:
-        callable_(context, *args, **kwargs)
-
-def _render_error(template, context, error):
-    if template.error_handler:
-        result = template.error_handler(context, error)
-        if not result:
-            raise error
-    else:
-        error_template = exceptions.html_error_template()
-        if context._outputting_as_unicode:
-            context._buffer_stack[:] = [util.FastEncodingBuffer(unicode=True)]
-        else:
-            context._buffer_stack[:] = [util.FastEncodingBuffer(
-                                            error_template.output_encoding,
-                                            error_template.encoding_errors)]
-
-        context._set_with_template(error_template)
-        error_template.render_context(context, error=error)
diff --git a/lib/mako-0.7.2/mako/template.py b/lib/mako-0.7.2/mako/template.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/template.py
+++ /dev/null
@@ -1,650 +0,0 @@
-# mako/template.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""Provides the Template class, a facade for parsing, generating and executing
-template strings, as well as template runtime operations."""
-
-from mako.lexer import Lexer
-from mako import runtime, util, exceptions, codegen, cache
-import os, re, shutil, stat, sys, tempfile, types, weakref
-
-
-class Template(object):
-    """Represents a compiled template.
-
-    :class:`.Template` includes a reference to the original
-    template source (via the :attr:`.source` attribute)
-    as well as the source code of the
-    generated Python module (i.e. the :attr:`.code` attribute),
-    as well as a reference to an actual Python module.
-
-    :class:`.Template` is constructed using either a literal string
-    representing the template text, or a filename representing a filesystem
-    path to a source file.
-
-    :param text: textual template source.  This argument is mutually
-     exclusive versus the ``filename`` parameter.
-
-    :param filename: filename of the source template.  This argument is
-     mutually exclusive versus the ``text`` parameter.
-
-    :param buffer_filters: string list of filters to be applied
-     to the output of ``%def``\ s which are buffered, cached, or otherwise
-     filtered, after all filters
-     defined with the ``%def`` itself have been applied. Allows the
-     creation of default expression filters that let the output
-     of return-valued ``%def``\ s "opt out" of that filtering via
-     passing special attributes or objects.
-
-    :param bytestring_passthrough: When ``True``, and ``output_encoding`` is
-     set to ``None``, and :meth:`.Template.render` is used to render,
-     the `StringIO` or `cStringIO` buffer will be used instead of the
-     default "fast" buffer.   This allows raw bytestrings in the
-     output stream, such as in expressions, to pass straight
-     through to the buffer.  This flag is forced
-     to ``True`` if ``disable_unicode`` is also configured.
-
-     .. versionadded:: 0.4
-        Added to provide the same behavior as that of the previous series.
-
-    :param cache_args: Dictionary of cache configuration arguments that
-     will be passed to the :class:`.CacheImpl`.   See :ref:`caching_toplevel`.
-
-    :param cache_dir:
-
-     .. deprecated:: 0.6
-        Use the ``'dir'`` argument in the ``cache_args`` dictionary.
-        See :ref:`caching_toplevel`.
-
-    :param cache_enabled: Boolean flag which enables caching of this
-     template.  See :ref:`caching_toplevel`.
-
-    :param cache_impl: String name of a :class:`.CacheImpl` caching
-     implementation to use.   Defaults to ``'beaker'``.
-
-    :param cache_type:
-
-     .. deprecated:: 0.6
-        Use the ``'type'`` argument in the ``cache_args`` dictionary.
-        See :ref:`caching_toplevel`.
-
-    :param cache_url:
-
-     .. deprecated:: 0.6
-        Use the ``'url'`` argument in the ``cache_args`` dictionary.
-        See :ref:`caching_toplevel`.
-
-    :param default_filters: List of string filter names that will
-     be applied to all expressions.  See :ref:`filtering_default_filters`.
-
-    :param disable_unicode: Disables all awareness of Python Unicode
-     objects.  See :ref:`unicode_disabled`.
-
-    :param enable_loop: When ``True``, enable the ``loop`` context variable.
-     This can be set to ``False`` to support templates that may
-     be making usage of the name "``loop``".   Individual templates can
-     re-enable the "loop" context by placing the directive
-     ``enable_loop="True"`` inside the ``<%page>`` tag -- see
-     :ref:`migrating_loop`.
-
-    :param encoding_errors: Error parameter passed to ``encode()`` when
-     string encoding is performed. See :ref:`usage_unicode`.
-
-    :param error_handler: Python callable which is called whenever
-     compile or runtime exceptions occur. The callable is passed
-     the current context as well as the exception. If the
-     callable returns ``True``, the exception is considered to
-     be handled, else it is re-raised after the function
-     completes. Is used to provide custom error-rendering
-     functions.
-
-    :param format_exceptions: if ``True``, exceptions which occur during
-     the render phase of this template will be caught and
-     formatted into an HTML error page, which then becomes the
-     rendered result of the :meth:`.render` call. Otherwise,
-     runtime exceptions are propagated outwards.
-
-    :param imports: String list of Python statements, typically individual
-     "import" lines, which will be placed into the module level
-     preamble of all generated Python modules. See the example
-     in :ref:`filtering_default_filters`.
-
-    :param input_encoding: Encoding of the template's source code.  Can
-     be used in lieu of the coding comment. See
-     :ref:`usage_unicode` as well as :ref:`unicode_toplevel` for
-     details on source encoding.
-
-    :param lookup: a :class:`.TemplateLookup` instance that will be used
-     for all file lookups via the ``<%namespace>``,
-     ``<%include>``, and ``<%inherit>`` tags. See
-     :ref:`usage_templatelookup`.
-
-    :param module_directory: Filesystem location where generated
-     Python module files will be placed.
-
-    :param module_filename: Overrides the filename of the generated
-     Python module file. For advanced usage only.
-
-    :param module_writer: A callable which overrides how the Python
-     module is written entirely.  The callable is passed the
-     encoded source content of the module and the destination
-     path to be written to.   The default behavior of module writing
-     uses a tempfile in conjunction with a file move in order
-     to make the operation atomic.   So a user-defined module
-     writing function that mimics the default behavior would be:
-
-     .. sourcecode:: python
-
-         import tempfile
-         import os
-         import shutil
-
-         def module_writer(source, outputpath):
-             (dest, name) = \\
-                 tempfile.mkstemp(
-                     dir=os.path.dirname(outputpath)
-                 )
-
-             os.write(dest, source)
-             os.close(dest)
-             shutil.move(name, outputpath)
-
-         from mako.template import Template
-         mytemplate = Template(
-                         file="index.html",
-                         module_directory="/path/to/modules",
-                         module_writer=module_writer
-                     )
-
-     The function is provided for unusual configurations where
-     certain platform-specific permissions or other special
-     steps are needed.
-
-    :param output_encoding: The encoding to use when :meth:`.render`
-     is called.
-     See :ref:`usage_unicode` as well as :ref:`unicode_toplevel`.
-
-    :param preprocessor: Python callable which will be passed
-     the full template source before it is parsed. The return
-     result of the callable will be used as the template source
-     code.
-
-    :param strict_undefined: Replaces the automatic usage of
-     ``UNDEFINED`` for any undeclared variables not located in
-     the :class:`.Context` with an immediate raise of
-     ``NameError``. The advantage is immediate reporting of
-     missing variables which include the name.
-
-     .. versionadded:: 0.3.6
-
-    :param uri: string URI or other identifier for this template.
-     If not provided, the ``uri`` is generated from the filesystem
-     path, or from the in-memory identity of a non-file-based
-     template. The primary usage of the ``uri`` is to provide a key
-     within :class:`.TemplateLookup`, as well as to generate the
-     file path of the generated Python module file, if
-     ``module_directory`` is specified.
-
-    """
-
-    def __init__(self,
-                    text=None,
-                    filename=None,
-                    uri=None,
-                    format_exceptions=False,
-                    error_handler=None,
-                    lookup=None,
-                    output_encoding=None,
-                    encoding_errors='strict',
-                    module_directory=None,
-                    cache_args=None,
-                    cache_impl='beaker',
-                    cache_enabled=True,
-                    cache_type=None,
-                    cache_dir=None,
-                    cache_url=None,
-                    module_filename=None,
-                    input_encoding=None,
-                    disable_unicode=False,
-                    module_writer=None,
-                    bytestring_passthrough=False,
-                    default_filters=None,
-                    buffer_filters=(),
-                    strict_undefined=False,
-                    imports=None,
-                    enable_loop=True,
-                    preprocessor=None):
-        if uri:
-            self.module_id = re.sub(r'\W', "_", uri)
-            self.uri = uri
-        elif filename:
-            self.module_id = re.sub(r'\W', "_", filename)
-            drive, path = os.path.splitdrive(filename)
-            path = os.path.normpath(path).replace(os.path.sep, "/")
-            self.uri = path
-        else:
-            self.module_id = "memory:" + hex(id(self))
-            self.uri = self.module_id
-
-        u_norm = self.uri
-        if u_norm.startswith("/"):
-            u_norm = u_norm[1:]
-        u_norm = os.path.normpath(u_norm)
-        if u_norm.startswith(".."):
-            raise exceptions.TemplateLookupException(
-                    "Template uri \"%s\" is invalid - "
-                    "it cannot be relative outside "
-                    "of the root path." % self.uri)
-
-        self.input_encoding = input_encoding
-        self.output_encoding = output_encoding
-        self.encoding_errors = encoding_errors
-        self.disable_unicode = disable_unicode
-        self.bytestring_passthrough = bytestring_passthrough or disable_unicode
-        self.enable_loop = enable_loop
-        self.strict_undefined = strict_undefined
-        self.module_writer = module_writer
-
-        if util.py3k and disable_unicode:
-            raise exceptions.UnsupportedError(
-                                    "Mako for Python 3 does not "
-                                    "support disabling Unicode")
-        elif output_encoding and disable_unicode:
-            raise exceptions.UnsupportedError(
-                                    "output_encoding must be set to "
-                                    "None when disable_unicode is used.")
-        if default_filters is None:
-            if util.py3k or self.disable_unicode:
-                self.default_filters = ['str']
-            else:
-                self.default_filters = ['unicode']
-        else:
-            self.default_filters = default_filters
-        self.buffer_filters = buffer_filters
-
-        self.imports = imports
-        self.preprocessor = preprocessor
-
-        # if plain text, compile code in memory only
-        if text is not None:
-            (code, module) = _compile_text(self, text, filename)
-            self._code = code
-            self._source = text
-            ModuleInfo(module, None, self, filename, code, text)
-        elif filename is not None:
-            # if template filename and a module directory, load
-            # a filesystem-based module file, generating if needed
-            if module_filename is not None:
-                path = module_filename
-            elif module_directory is not None:
-                path = os.path.abspath(
-                        os.path.join(
-                            os.path.normpath(module_directory),
-                            u_norm + ".py"
-                            )
-                        )
-            else:
-                path = None
-            module = self._compile_from_file(path, filename)
-        else:
-            raise exceptions.RuntimeException(
-                                "Template requires text or filename")
-
-        self.module = module
-        self.filename = filename
-        self.callable_ = self.module.render_body
-        self.format_exceptions = format_exceptions
-        self.error_handler = error_handler
-        self.lookup = lookup
-
-        self.module_directory = module_directory
-
-        self._setup_cache_args(
-            cache_impl, cache_enabled, cache_args,
-            cache_type, cache_dir, cache_url
-        )
-
-    @util.memoized_property
-    def reserved_names(self):
-        if self.enable_loop:
-            return codegen.RESERVED_NAMES
-        else:
-            return codegen.RESERVED_NAMES.difference(['loop'])
-
-    def _setup_cache_args(self,
-                cache_impl, cache_enabled, cache_args,
-                cache_type, cache_dir, cache_url):
-        self.cache_impl = cache_impl
-        self.cache_enabled = cache_enabled
-        if cache_args:
-            self.cache_args = cache_args
-        else:
-            self.cache_args = {}
-
-        # transfer deprecated cache_* args
-        if cache_type:
-            self.cache_args['type'] = cache_type
-        if cache_dir:
-            self.cache_args['dir'] = cache_dir
-        if cache_url:
-            self.cache_args['url'] = cache_url
-
-    def _compile_from_file(self, path, filename):
-        if path is not None:
-            util.verify_directory(os.path.dirname(path))
-            filemtime = os.stat(filename)[stat.ST_MTIME]
-            if not os.path.exists(path) or \
-                        os.stat(path)[stat.ST_MTIME] < filemtime:
-                data = util.read_file(filename)
-                _compile_module_file(
-                            self,
-                            data,
-                            filename,
-                            path,
-                            self.module_writer)
-            module = util.load_module(self.module_id, path)
-            del sys.modules[self.module_id]
-            if module._magic_number != codegen.MAGIC_NUMBER:
-                data = util.read_file(filename)
-                _compile_module_file(
-                            self,
-                            data,
-                            filename,
-                            path,
-                            self.module_writer)
-                module = util.load_module(self.module_id, path)
-                del sys.modules[self.module_id]
-            ModuleInfo(module, path, self, filename, None, None)
-        else:
-            # template filename and no module directory, compile code
-            # in memory
-            data = util.read_file(filename)
-            code, module = _compile_text(
-                                self,
-                                data,
-                                filename)
-            self._source = None
-            self._code = code
-            ModuleInfo(module, None, self, filename, code, None)
-        return module
-
-    @property
-    def source(self):
-        """Return the template source code for this :class:`.Template`."""
-
-        return _get_module_info_from_callable(self.callable_).source
-
-    @property
-    def code(self):
-        """Return the module source code for this :class:`.Template`."""
-
-        return _get_module_info_from_callable(self.callable_).code
-
-    @util.memoized_property
-    def cache(self):
-        return cache.Cache(self)
-
-    @property
-    def cache_dir(self):
-        return self.cache_args['dir']
-    @property
-    def cache_url(self):
-        return self.cache_args['url']
-    @property
-    def cache_type(self):
-        return self.cache_args['type']
-
-    def render(self, *args, **data):
-        """Render the output of this template as a string.
-
-        If the template specifies an output encoding, the string
-        will be encoded accordingly, else the output is raw (raw
-        output uses `cStringIO` and can't handle multibyte
-        characters). A :class:`.Context` object is created corresponding
-        to the given data. Arguments that are explicitly declared
-        by this template's internal rendering method are also
-        pulled from the given ``*args``, ``**data`` members.
-
-        """
-        return runtime._render(self, self.callable_, args, data)
-
-    def render_unicode(self, *args, **data):
-        """Render the output of this template as a unicode object."""
-
-        return runtime._render(self,
-                                self.callable_,
-                                args,
-                                data,
-                                as_unicode=True)
-
-    def render_context(self, context, *args, **kwargs):
-        """Render this :class:`.Template` with the given context.
-
-        The data is written to the context's buffer.
-
-        """
-        if getattr(context, '_with_template', None) is None:
-            context._set_with_template(self)
-        runtime._render_context(self,
-                                self.callable_,
-                                context,
-                                *args,
-                                **kwargs)
-
-    def has_def(self, name):
-        return hasattr(self.module, "render_%s" % name)
-
-    def get_def(self, name):
-        """Return a def of this template as a :class:`.DefTemplate`."""
-
-        return DefTemplate(self, getattr(self.module, "render_%s" % name))
-
-    def _get_def_callable(self, name):
-        return getattr(self.module, "render_%s" % name)
-
-    @property
-    def last_modified(self):
-        return self.module._modified_time
-
-class ModuleTemplate(Template):
-    """A Template which is constructed given an existing Python module.
-
-        e.g.::
-
-        t = Template("this is a template")
-        f = file("mymodule.py", "w")
-        f.write(t.code)
-        f.close()
-
-        import mymodule
-
-        t = ModuleTemplate(mymodule)
-        print t.render()
-
-    """
-
-    def __init__(self, module,
-                        module_filename=None,
-                        template=None,
-                        template_filename=None,
-                        module_source=None,
-                        template_source=None,
-                        output_encoding=None,
-                        encoding_errors='strict',
-                        disable_unicode=False,
-                        bytestring_passthrough=False,
-                        format_exceptions=False,
-                        error_handler=None,
-                        lookup=None,
-                        cache_args=None,
-                        cache_impl='beaker',
-                        cache_enabled=True,
-                        cache_type=None,
-                        cache_dir=None,
-                        cache_url=None,
-    ):
-        self.module_id = re.sub(r'\W', "_", module._template_uri)
-        self.uri = module._template_uri
-        self.input_encoding = module._source_encoding
-        self.output_encoding = output_encoding
-        self.encoding_errors = encoding_errors
-        self.disable_unicode = disable_unicode
-        self.bytestring_passthrough = bytestring_passthrough or disable_unicode
-        self.enable_loop = module._enable_loop
-
-        if util.py3k and disable_unicode:
-            raise exceptions.UnsupportedError(
-                                    "Mako for Python 3 does not "
-                                    "support disabling Unicode")
-        elif output_encoding and disable_unicode:
-            raise exceptions.UnsupportedError(
-                                    "output_encoding must be set to "
-                                    "None when disable_unicode is used.")
-
-        self.module = module
-        self.filename = template_filename
-        ModuleInfo(module,
-                        module_filename,
-                        self,
-                        template_filename,
-                        module_source,
-                        template_source)
-
-        self.callable_ = self.module.render_body
-        self.format_exceptions = format_exceptions
-        self.error_handler = error_handler
-        self.lookup = lookup
-        self._setup_cache_args(
-            cache_impl, cache_enabled, cache_args,
-            cache_type, cache_dir, cache_url
-        )
-
-class DefTemplate(Template):
-    """A :class:`.Template` which represents a callable def in a parent
-    template."""
-
-    def __init__(self, parent, callable_):
-        self.parent = parent
-        self.callable_ = callable_
-        self.output_encoding = parent.output_encoding
-        self.module = parent.module
-        self.encoding_errors = parent.encoding_errors
-        self.format_exceptions = parent.format_exceptions
-        self.error_handler = parent.error_handler
-        self.enable_loop = parent.enable_loop
-        self.lookup = parent.lookup
-        self.bytestring_passthrough = parent.bytestring_passthrough
-
-    def get_def(self, name):
-        return self.parent.get_def(name)
-
-class ModuleInfo(object):
-    """Stores information about a module currently loaded into
-    memory, provides reverse lookups of template source, module
-    source code based on a module's identifier.
-
-     """
-    _modules = weakref.WeakValueDictionary()
-
-    def __init__(self,
-                    module,
-                    module_filename,
-                    template,
-                    template_filename,
-                    module_source,
-                    template_source):
-        self.module = module
-        self.module_filename = module_filename
-        self.template_filename = template_filename
-        self.module_source = module_source
-        self.template_source = template_source
-        self._modules[module.__name__] = template._mmarker = self
-        if module_filename:
-            self._modules[module_filename] = self
-
-    @property
-    def code(self):
-        if self.module_source is not None:
-            return self.module_source
-        else:
-            return util.read_file(self.module_filename)
-
-    @property
-    def source(self):
-        if self.template_source is not None:
-            if self.module._source_encoding and \
-                    not isinstance(self.template_source, unicode):
-                return self.template_source.decode(
-                                self.module._source_encoding)
-            else:
-                return self.template_source
-        else:
-            data = util.read_file(self.template_filename)
-            if self.module._source_encoding:
-                return data.decode(self.module._source_encoding)
-            else:
-                return data
-
-def _compile(template, text, filename, generate_magic_comment):
-    lexer = Lexer(text,
-                    filename,
-                    disable_unicode=template.disable_unicode,
-                    input_encoding=template.input_encoding,
-                    preprocessor=template.preprocessor)
-    node = lexer.parse()
-    source = codegen.compile(node,
-                            template.uri,
-                            filename,
-                            default_filters=template.default_filters,
-                            buffer_filters=template.buffer_filters,
-                            imports=template.imports,
-                            source_encoding=lexer.encoding,
-                            generate_magic_comment=generate_magic_comment,
-                            disable_unicode=template.disable_unicode,
-                            strict_undefined=template.strict_undefined,
-                            enable_loop=template.enable_loop,
-                            reserved_names=template.reserved_names)
-    return source, lexer
-
-def _compile_text(template, text, filename):
-    identifier = template.module_id
-    source, lexer = _compile(template, text, filename,
-                        generate_magic_comment=template.disable_unicode)
-
-    cid = identifier
-    if not util.py3k and isinstance(cid, unicode):
-        cid = cid.encode()
-    module = types.ModuleType(cid)
-    code = compile(source, cid, 'exec')
-    exec code in module.__dict__, module.__dict__
-    return (source, module)
-
-def _compile_module_file(template, text, filename, outputpath, module_writer):
-    identifier = template.module_id
-    source, lexer = _compile(template, text, filename,
-                        generate_magic_comment=True)
-
-    if isinstance(source, unicode):
-        source = source.encode(lexer.encoding or 'ascii')
-
-    if module_writer:
-        module_writer(source, outputpath)
-    else:
-        # make tempfiles in the same location as the ultimate
-        # location.   this ensures they're on the same filesystem,
-        # avoiding synchronization issues.
-        (dest, name) = tempfile.mkstemp(dir=os.path.dirname(outputpath))
-
-        os.write(dest, source)
-        os.close(dest)
-        shutil.move(name, outputpath)
-
-def _get_module_info_from_callable(callable_):
-    return _get_module_info(callable_.func_globals['__name__'])
-
-def _get_module_info(filename):
-    return ModuleInfo._modules[filename]
-
diff --git a/lib/mako-0.7.2/mako/util.py b/lib/mako-0.7.2/mako/util.py
deleted file mode 100644
--- a/lib/mako-0.7.2/mako/util.py
+++ /dev/null
@@ -1,436 +0,0 @@
-# mako/util.py
-# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
-#
-# This module is part of Mako and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-import imp
-import sys
-
-
-py3k = getattr(sys, 'py3kwarning', False) or sys.version_info >= (3, 0)
-py26 = sys.version_info >= (2, 6)
-py24 = sys.version_info >= (2, 4) and sys.version_info < (2, 5)
-jython = sys.platform.startswith('java')
-win32 = sys.platform.startswith('win')
-
-if py3k:
-    from io import StringIO
-else:
-    try:
-        from cStringIO import StringIO
-    except:
-        from StringIO import StringIO
-
-import codecs, re, weakref, os, time, operator
-import collections
-
-try:
-    import threading
-    import thread
-except ImportError:
-    import dummy_threading as threading
-    import dummy_thread as thread
-
-if win32 or jython:
-    time_func = time.clock
-else:
-    time_func = time.time
-
-def function_named(fn, name):
-    """Return a function with a given __name__.
-
-    Will assign to __name__ and return the original function if possible on
-    the Python implementation, otherwise a new function will be constructed.
-
-    """
-    fn.__name__ = name
-    return fn
-
-try:
-    from functools import partial
-except:
-    def partial(func, *args, **keywords):
-        def newfunc(*fargs, **fkeywords):
-            newkeywords = keywords.copy()
-            newkeywords.update(fkeywords)
-            return func(*(args + fargs), **newkeywords)
-        return newfunc
-
-if py24:
-    def all(iterable):
-        for i in iterable:
-            if not i:
-                return False
-        return True
-
-    def exception_name(exc):
-        try:
-            return exc.__class__.__name__
-        except AttributeError:
-            return exc.__name__
-else:
-    all = all
-
-    def exception_name(exc):
-        return exc.__class__.__name__
-
-
-class PluginLoader(object):
-    def __init__(self, group):
-        self.group = group
-        self.impls = {}
-
-    def load(self, name):
-        if name in self.impls:
-             return self.impls[name]()
-        else:
-            import pkg_resources
-            for impl in pkg_resources.iter_entry_points(
-                                self.group,
-                                name):
-                self.impls[name] = impl.load
-                return impl.load()
-            else:
-                raise exceptions.RuntimeException(
-                        "Can't load plugin %s %s" %
-                        (self.group, name))
-
-    def register(self, name, modulepath, objname):
-        def load():
-            mod = __import__(modulepath)
-            for token in modulepath.split(".")[1:]:
-                mod = getattr(mod, token)
-            return getattr(mod, objname)
-        self.impls[name] = load
-
-def verify_directory(dir):
-    """create and/or verify a filesystem directory."""
-
-    tries = 0
-
-    while not os.path.exists(dir):
-        try:
-            tries += 1
-            os.makedirs(dir, 0775)
-        except:
-            if tries > 5:
-                raise
-
-def to_list(x, default=None):
-    if x is None:
-        return default
-    if not isinstance(x, (list, tuple)):
-        return [x]
-    else:
-        return x
-
-
-class memoized_property(object):
-    """A read-only @property that is only evaluated once."""
-    def __init__(self, fget, doc=None):
-        self.fget = fget
-        self.__doc__ = doc or fget.__doc__
-        self.__name__ = fget.__name__
-
-    def __get__(self, obj, cls):
-        if obj is None:
-            return self
-        obj.__dict__[self.__name__] = result = self.fget(obj)
-        return result
-
-class memoized_instancemethod(object):
-    """Decorate a method memoize its return value.
-
-    Best applied to no-arg methods: memoization is not sensitive to
-    argument values, and will always return the same value even when
-    called with different arguments.
-
-    """
-    def __init__(self, fget, doc=None):
-        self.fget = fget
-        self.__doc__ = doc or fget.__doc__
-        self.__name__ = fget.__name__
-
-    def __get__(self, obj, cls):
-        if obj is None:
-            return self
-        def oneshot(*args, **kw):
-            result = self.fget(obj, *args, **kw)
-            memo = lambda *a, **kw: result
-            memo.__name__ = self.__name__
-            memo.__doc__ = self.__doc__
-            obj.__dict__[self.__name__] = memo
-            return result
-        oneshot.__name__ = self.__name__
-        oneshot.__doc__ = self.__doc__
-        return oneshot
-
-class SetLikeDict(dict):
-    """a dictionary that has some setlike methods on it"""
-    def union(self, other):
-        """produce a 'union' of this dict and another (at the key level).
-
-        values in the second dict take precedence over that of the first"""
-        x = SetLikeDict(**self)
-        x.update(other)
-        return x
-
-class FastEncodingBuffer(object):
-    """a very rudimentary buffer that is faster than StringIO,
-    but doesn't crash on unicode data like cStringIO."""
-
-    def __init__(self, encoding=None, errors='strict', unicode=False):
-        self.data = collections.deque()
-        self.encoding = encoding
-        if unicode:
-            self.delim = u''
-        else:
-            self.delim = ''
-        self.unicode = unicode
-        self.errors = errors
-        self.write = self.data.append
-
-    def truncate(self):
-        self.data = collections.deque()
-        self.write = self.data.append
-
-    def getvalue(self):
-        if self.encoding:
-            return self.delim.join(self.data).encode(self.encoding,
-                                                     self.errors)
-        else:
-            return self.delim.join(self.data)
-
-class LRUCache(dict):
-    """A dictionary-like object that stores a limited number of items,
-    discarding lesser used items periodically.
-
-    this is a rewrite of LRUCache from Myghty to use a periodic timestamp-based
-    paradigm so that synchronization is not really needed.  the size management
-    is inexact.
-    """
-
-    class _Item(object):
-        def __init__(self, key, value):
-            self.key = key
-            self.value = value
-            self.timestamp = time_func()
-        def __repr__(self):
-            return repr(self.value)
-
-    def __init__(self, capacity, threshold=.5):
-        self.capacity = capacity
-        self.threshold = threshold
-
-    def __getitem__(self, key):
-        item = dict.__getitem__(self, key)
-        item.timestamp = time_func()
-        return item.value
-
-    def values(self):
-        return [i.value for i in dict.values(self)]
-
-    def setdefault(self, key, value):
-        if key in self:
-            return self[key]
-        else:
-            self[key] = value
-            return value
-
-    def __setitem__(self, key, value):
-        item = dict.get(self, key)
-        if item is None:
-            item = self._Item(key, value)
-            dict.__setitem__(self, key, item)
-        else:
-            item.value = value
-        self._manage_size()
-
-    def _manage_size(self):
-        while len(self) > self.capacity + self.capacity * self.threshold:
-            bytime = sorted(dict.values(self),
-                            key=operator.attrgetter('timestamp'), reverse=True)
-            for item in bytime[self.capacity:]:
-                try:
-                    del self[item.key]
-                except KeyError:
-                    # if we couldn't find a key, most likely some other thread
-                    # broke in on us. loop around and try again
-                    break
-
-# Regexp to match python magic encoding line
-_PYTHON_MAGIC_COMMENT_re = re.compile(
-    r'[ \t\f]* \# .* coding[=:][ \t]*([-\w.]+)',
-    re.VERBOSE)
-
-def parse_encoding(fp):
-    """Deduce the encoding of a Python source file (binary mode) from magic
-    comment.
-
-    It does this in the same way as the `Python interpreter`__
-
-    .. __: http://docs.python.org/ref/encodings.html
-
-    The ``fp`` argument should be a seekable file object in binary mode.
-    """
-    pos = fp.tell()
-    fp.seek(0)
-    try:
-        line1 = fp.readline()
-        has_bom = line1.startswith(codecs.BOM_UTF8)
-        if has_bom:
-            line1 = line1[len(codecs.BOM_UTF8):]
-
-        m = _PYTHON_MAGIC_COMMENT_re.match(line1.decode('ascii', 'ignore'))
-        if not m:
-            try:
-                import parser
-                parser.suite(line1.decode('ascii', 'ignore'))
-            except (ImportError, SyntaxError):
-                # Either it's a real syntax error, in which case the source
-                # is not valid python source, or line2 is a continuation of
-                # line1, in which case we don't want to scan line2 for a magic
-                # comment.
-                pass
-            else:
-                line2 = fp.readline()
-                m = _PYTHON_MAGIC_COMMENT_re.match(
-                                               line2.decode('ascii', 'ignore'))
-
-        if has_bom:
-            if m:
-                raise SyntaxError, \
-                      "python refuses to compile code with both a UTF8" \
-                      " byte-order-mark and a magic encoding comment"
-            return 'utf_8'
-        elif m:
-            return m.group(1)
-        else:
-            return None
-    finally:
-        fp.seek(pos)
-
-def sorted_dict_repr(d):
-    """repr() a dictionary with the keys in order.
-
-    Used by the lexer unit test to compare parse trees based on strings.
-
-    """
-    keys = d.keys()
-    keys.sort()
-    return "{" + ", ".join(["%r: %r" % (k, d[k]) for k in keys]) + "}"
-
-def restore__ast(_ast):
-    """Attempt to restore the required classes to the _ast module if it
-    appears to be missing them
-    """
-    if hasattr(_ast, 'AST'):
-        return
-    _ast.PyCF_ONLY_AST = 2 << 9
-    m = compile("""\
-def foo(): pass
-class Bar(object): pass
-if False: pass
-baz = 'mako'
-1 + 2 - 3 * 4 / 5
-6 // 7 % 8 << 9 >> 10
-11 & 12 ^ 13 | 14
-15 and 16 or 17
--baz + (not +18) - ~17
-baz and 'foo' or 'bar'
-(mako is baz == baz) is not baz != mako
-mako > baz < mako >= baz <= mako
-mako in baz not in mako""", '<unknown>', 'exec', _ast.PyCF_ONLY_AST)
-    _ast.Module = type(m)
-
-    for cls in _ast.Module.__mro__:
-        if cls.__name__ == 'mod':
-            _ast.mod = cls
-        elif cls.__name__ == 'AST':
-            _ast.AST = cls
-
-    _ast.FunctionDef = type(m.body[0])
-    _ast.ClassDef = type(m.body[1])
-    _ast.If = type(m.body[2])
-
-    _ast.Name = type(m.body[3].targets[0])
-    _ast.Store = type(m.body[3].targets[0].ctx)
-    _ast.Str = type(m.body[3].value)
-
-    _ast.Sub = type(m.body[4].value.op)
-    _ast.Add = type(m.body[4].value.left.op)
-    _ast.Div = type(m.body[4].value.right.op)
-    _ast.Mult = type(m.body[4].value.right.left.op)
-
-    _ast.RShift = type(m.body[5].value.op)
-    _ast.LShift = type(m.body[5].value.left.op)
-    _ast.Mod = type(m.body[5].value.left.left.op)
-    _ast.FloorDiv = type(m.body[5].value.left.left.left.op)
-
-    _ast.BitOr = type(m.body[6].value.op)
-    _ast.BitXor = type(m.body[6].value.left.op)
-    _ast.BitAnd = type(m.body[6].value.left.left.op)
-
-    _ast.Or = type(m.body[7].value.op)
-    _ast.And = type(m.body[7].value.values[0].op)
-
-    _ast.Invert = type(m.body[8].value.right.op)
-    _ast.Not = type(m.body[8].value.left.right.op)
-    _ast.UAdd = type(m.body[8].value.left.right.operand.op)
-    _ast.USub = type(m.body[8].value.left.left.op)
-
-    _ast.Or = type(m.body[9].value.op)
-    _ast.And = type(m.body[9].value.values[0].op)
-
-    _ast.IsNot = type(m.body[10].value.ops[0])
-    _ast.NotEq = type(m.body[10].value.ops[1])
-    _ast.Is = type(m.body[10].value.left.ops[0])
-    _ast.Eq = type(m.body[10].value.left.ops[1])
-
-    _ast.Gt = type(m.body[11].value.ops[0])
-    _ast.Lt = type(m.body[11].value.ops[1])
-    _ast.GtE = type(m.body[11].value.ops[2])
-    _ast.LtE = type(m.body[11].value.ops[3])
-
-    _ast.In = type(m.body[12].value.ops[0])
-    _ast.NotIn = type(m.body[12].value.ops[1])
-
-
-try:
-    from inspect import CO_VARKEYWORDS, CO_VARARGS
-    def inspect_func_args(fn):
-        co = fn.func_code
-
-        nargs = co.co_argcount
-        names = co.co_varnames
-        args = list(names[:nargs])
-
-        varargs = None
-        if co.co_flags & CO_VARARGS:
-            varargs = co.co_varnames[nargs]
-            nargs = nargs + 1
-        varkw = None
-        if co.co_flags & CO_VARKEYWORDS:
-            varkw = co.co_varnames[nargs]
-
-        return args, varargs, varkw, fn.func_defaults
-except ImportError:
-    import inspect
-    def inspect_func_args(fn):
-        return inspect.getargspec(fn)
-
-def read_file(path, mode='rb'):
-    fp = open(path, mode)
-    try:
-        data = fp.read()
-        return data
-    finally:
-        fp.close()
-
-def load_module(module_id, path):
-    fp = open(path, 'rb')
-    try:
-        return imp.load_source(module_id, path, fp)
-    finally:
-        fp.close()
diff --git a/lib/mako-0.7.2/scripts/mako-render b/lib/mako-0.7.2/scripts/mako-render
deleted file mode 100644
--- a/lib/mako-0.7.2/scripts/mako-render
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env python
-
-def render(data, kw):
-    from mako.template import Template
-    from mako.lookup import TemplateLookup
-
-    lookup = TemplateLookup(["."])
-    return Template(data, lookup=lookup).render(**kw)
-
-def varsplit(var):
-    if "=" not in var:
-        return (var, "")
-    return var.split("=", 1)
-
-def main(argv=None):
-    from os.path import isfile
-    from sys import stdin
-
-    if argv is None:
-        import sys
-        argv = sys.argv
-
-    from optparse import OptionParser
-
-    parser = OptionParser("usage: %prog [FILENAME]")
-    parser.add_option("--var", default=[], action="append",
-                  help="variable (can be used multiple times, use name=value)")
-
-    opts, args = parser.parse_args(argv[1:])
-    if len(args) not in (0, 1):
-        parser.error("wrong number of arguments") # Will exit
-
-    if (len(args) == 0) or (args[0] == "-"):
-        fo = stdin
-    else:
-        filename = args[0]
-        if not isfile(filename):
-            raise SystemExit("error: can't find %s" % filename)
-        fo = open(filename)
-
-    kw = dict([varsplit(var) for var in opts.var])
-    data = fo.read()
-    print render(data, kw)
-
-if __name__ == "__main__":
-    main()
diff --git a/lib/mako-0.7.2/setup.cfg b/lib/mako-0.7.2/setup.cfg
deleted file mode 100644
--- a/lib/mako-0.7.2/setup.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-[egg_info]
-tag_build = 
-tag_date = 0
-tag_svn_revision = 0
-
diff --git a/lib/mako-0.7.2/setup.py b/lib/mako-0.7.2/setup.py
deleted file mode 100644
--- a/lib/mako-0.7.2/setup.py
+++ /dev/null
@@ -1,62 +0,0 @@
-from setuptools import setup, find_packages
-import os
-import re
-import sys
-
-extra = {}
-if sys.version_info >= (3, 0):
-    extra.update(
-        use_2to3=True,
-    )
-
-v = open(os.path.join(os.path.dirname(__file__), 'mako', '__init__.py'))
-VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
-v.close()
-
-readme = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
-
-setup(name='Mako',
-      version=VERSION,
-      description="A super-fast templating language that borrows the \
- best ideas from the existing templating languages.",
-      long_description=readme,
-      classifiers=[
-      'Development Status :: 5 - Production/Stable',
-      'Environment :: Web Environment',
-      'Intended Audience :: Developers',
-      'Programming Language :: Python',
-      'Programming Language :: Python :: 3',
-      "Programming Language :: Python :: Implementation :: CPython",
-      "Programming Language :: Python :: Implementation :: PyPy",
-      'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
-      ],
-      keywords='templates',
-      author='Mike Bayer',
-      author_email='mike at zzzcomputing.com',
-      url='http://www.makotemplates.org/',
-      license='MIT',
-      packages=find_packages('.', exclude=['examples*', 'test*']),
-      scripts=['scripts/mako-render'],
-      tests_require = ['nose >= 0.11'],
-      test_suite = "nose.collector",
-      zip_safe=False,
-      install_requires=[
-          'MarkupSafe>=0.9.2',
-      ],
-      extras_require = {'beaker':['Beaker>=1.1']},
-      entry_points="""
-      [python.templating.engines]
-      mako = mako.ext.turbogears:TGPlugin
- 
-      [pygments.lexers]
-      mako = mako.ext.pygmentplugin:MakoLexer
-      html+mako = mako.ext.pygmentplugin:MakoHtmlLexer
-      xml+mako = mako.ext.pygmentplugin:MakoXmlLexer
-      js+mako = mako.ext.pygmentplugin:MakoJavascriptLexer
-      css+mako = mako.ext.pygmentplugin:MakoCssLexer
-
-      [babel.extractors]
-      mako = mako.ext.babelplugin:extract
-      """,
-      **extra
-)
diff --git a/lib/mako-0.7.2/test/__init__.py b/lib/mako-0.7.2/test/__init__.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/__init__.py
+++ /dev/null
@@ -1,135 +0,0 @@
-from mako.template import Template
-import unittest, os
-from mako.util import py3k
-from mako.util import function_named
-import re
-from mako.cache import CacheImpl, register_plugin
-from nose import SkipTest
-
-
-template_base = os.path.join(os.path.dirname(__file__), 'templates')
-module_base = os.path.join(template_base, 'modules')
-
-class TemplateTest(unittest.TestCase):
-
-    def _file_template(self, filename, **kw):
-        filepath = self._file_path(filename)
-        return Template(uri=filename, filename=filepath,
-                            module_directory=module_base, **kw)
-
-    def _file_path(self, filename):
-        name, ext = os.path.splitext(filename)
-
-        if py3k:
-            py3k_path = os.path.join(template_base, name + "_py3k" + ext)
-            if os.path.exists(py3k_path):
-                return py3k_path
-
-        return os.path.join(template_base, filename)
-
-    def _do_file_test(self, filename, expected, filters=None,
-                        unicode_=True, template_args=None, **kw):
-        t1 = self._file_template(filename, **kw)
-        self._do_test(t1, expected, filters=filters,
-                        unicode_=unicode_, template_args=template_args)
-
-    def _do_memory_test(self, source, expected, filters=None,
-                        unicode_=True, template_args=None, **kw):
-        t1 = Template(text=source, **kw)
-        self._do_test(t1, expected, filters=filters,
-                        unicode_=unicode_, template_args=template_args)
-
-    def _do_test(self, template, expected, filters=None, template_args=None, unicode_=True):
-        if template_args is None:
-            template_args = {}
-        if unicode_:
-            output = template.render_unicode(**template_args)
-        else:
-            output = template.render(**template_args)
-
-        if filters:
-            output = filters(output)
-        eq_(output, expected)
-
-def eq_(a, b, msg=None):
-    """Assert a == b, with repr messaging on failure."""
-    assert a == b, msg or "%r != %r" % (a, b)
-
-def teardown():
-    import shutil
-    shutil.rmtree(module_base, True)
-
-def assert_raises(except_cls, callable_, *args, **kw):
-    try:
-        callable_(*args, **kw)
-        success = False
-    except except_cls, e:
-        success = True
-
-    # assert outside the block so it works for AssertionError too !
-    assert success, "Callable did not raise an exception"
-
-def assert_raises_message(except_cls, msg, callable_, *args, **kwargs):
-    try:
-        callable_(*args, **kwargs)
-        assert False, "Callable did not raise an exception"
-    except except_cls, e:
-        assert re.search(msg, str(e)), "%r !~ %s" % (msg, e)
-        print str(e)
-
-def skip_if(predicate, reason=None):
-    """Skip a test if predicate is true."""
-    reason = reason or predicate.__name__
-
-    def decorate(fn):
-        fn_name = fn.__name__
-        def maybe(*args, **kw):
-            if predicate():
-                msg = "'%s' skipped: %s" % (
-                    fn_name, reason)
-                raise SkipTest(msg)
-            else:
-                return fn(*args, **kw)
-        return function_named(maybe, fn_name)
-    return decorate
-
-def requires_pygments_14(fn):
-    try:
-        import pygments
-        version = pygments.__version__
-    except:
-        version = "0"
-    return skip_if(lambda: version < "1.4")(fn)
-
-def requires_no_pygments(fn):
-    try:
-        import pygments
-    except:
-        pygments = None
-    return skip_if(lambda: pygments is not None)(fn)
-
-class PlainCacheImpl(CacheImpl):
-    """Simple memory cache impl so that tests which
-    use caching can run without beaker.  """
-
-    def __init__(self, cache):
-        self.cache = cache
-        self.data = {}
-
-    def get_or_create(self, key, creation_function, **kw):
-        if key in self.data:
-            return self.data[key]
-        else:
-            self.data[key] = data = creation_function(**kw)
-            return data
-
-    def put(self, key, value, **kw):
-        self.data[key] = value
-
-    def get(self, key, **kw):
-        return self.data[key]
-
-    def invalidate(self, key, **kw):
-        del self.data[key]
-
-register_plugin("plain", __name__, "PlainCacheImpl")
diff --git a/lib/mako-0.7.2/test/foo/__init__.py b/lib/mako-0.7.2/test/foo/__init__.py
deleted file mode 100644
diff --git a/lib/mako-0.7.2/test/foo/test_ns.py b/lib/mako-0.7.2/test/foo/test_ns.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/foo/test_ns.py
+++ /dev/null
@@ -1,7 +0,0 @@
-def foo1(context):
-    context.write("this is foo1.")
-    return ''
- 
-def foo2(context, x):
-    context.write("this is foo2, x is " + x)
-    return ''
\ No newline at end of file
diff --git a/lib/mako-0.7.2/test/sample_module_namespace.py b/lib/mako-0.7.2/test/sample_module_namespace.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/sample_module_namespace.py
+++ /dev/null
@@ -1,7 +0,0 @@
-def foo1(context):
-    context.write("this is foo1.")
-    return ''
- 
-def foo2(context, x):
-    context.write("this is foo2, x is " + x)
-    return ''
\ No newline at end of file
diff --git a/lib/mako-0.7.2/test/templates/badbom.html b/lib/mako-0.7.2/test/templates/badbom.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/badbom.html
+++ /dev/null
@@ -1,2 +0,0 @@
-## -*- coding: ascii -*-
-Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »
\ No newline at end of file
diff --git a/lib/mako-0.7.2/test/templates/bom.html b/lib/mako-0.7.2/test/templates/bom.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/bom.html
+++ /dev/null
@@ -1,1 +0,0 @@
-Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »
\ No newline at end of file
diff --git a/lib/mako-0.7.2/test/templates/bommagic.html b/lib/mako-0.7.2/test/templates/bommagic.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/bommagic.html
+++ /dev/null
@@ -1,2 +0,0 @@
-## -*- coding: utf-8 -*-
-Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »
\ No newline at end of file
diff --git a/lib/mako-0.7.2/test/templates/chs_unicode.html b/lib/mako-0.7.2/test/templates/chs_unicode.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/chs_unicode.html
+++ /dev/null
@@ -1,11 +0,0 @@
-## -*- encoding:utf8 -*-
-<%
- msg = u'新中国的主席'
-%>
-
-<%def name="welcome(who, place=u'北京')">
-Welcome ${who} to ${place}.
-</%def>
-
-${name} 是 ${msg}<br/>
-${welcome(u'你')}
diff --git a/lib/mako-0.7.2/test/templates/chs_unicode_py3k.html b/lib/mako-0.7.2/test/templates/chs_unicode_py3k.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/chs_unicode_py3k.html
+++ /dev/null
@@ -1,11 +0,0 @@
-## -*- encoding:utf8 -*-
-<%
- msg = '新中国的主席'
-%>
-
-<%def name="welcome(who, place='北京')">
-Welcome ${who} to ${place}.
-</%def>
-
-${name} 是 ${msg}<br/>
-${welcome('你')}
diff --git a/lib/mako-0.7.2/test/templates/chs_utf8.html b/lib/mako-0.7.2/test/templates/chs_utf8.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/chs_utf8.html
+++ /dev/null
@@ -1,17 +0,0 @@
-## -*- encoding:utf8 -*-
-<%
- msg = '新中国的主席'
-%>
-
-<%def name="welcome(who, place='北京')">
-Welcome ${who} to ${place}.
-</%def>
-
-<%def name="welcome_buffered(who, place='北京')" buffered="True">
-Welcome ${who} to ${place}.
-</%def>
-
-${name} 是 ${msg}<br/>
-${welcome('你')}
-${welcome_buffered('你')}
-
diff --git a/lib/mako-0.7.2/test/templates/crlf.html b/lib/mako-0.7.2/test/templates/crlf.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/crlf.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<html>
-
-<%page args="a=['foo',
-                'bar']"/>
-
-like the name says.
-
-    % for x in [1,2,3]:
-        ${x}\
-    % endfor
-
-${trumpeter == 'Miles' and trumpeter or \
-      'Dizzy'}
-
-<%def name="hi()">
-    hi!
-</%def>
-
-</html>
diff --git a/lib/mako-0.7.2/test/templates/foo/modtest.html.py b/lib/mako-0.7.2/test/templates/foo/modtest.html.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/foo/modtest.html.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from mako import runtime, filters, cache
-UNDEFINED = runtime.UNDEFINED
-__M_dict_builtin = dict
-__M_locals_builtin = locals
-_magic_number = 5
-_modified_time = 1267565427.7968459
-_template_filename='/Users/classic/dev/mako/test/templates/modtest.html'
-_template_uri='/modtest.html'
-_template_cache=cache.Cache(__name__, _modified_time)
-_source_encoding=None
-_exports = []
-
-
-def render_body(context,**pageargs):
-    context.caller_stack._push_frame()
-    try:
-        __M_locals = __M_dict_builtin(pageargs=pageargs)
-        __M_writer = context.writer()
-        # SOURCE LINE 1
-        __M_writer(u'this is a test')
-        return ''
-    finally:
-        context.caller_stack._pop_frame()
-
-
diff --git a/lib/mako-0.7.2/test/templates/gettext.mako b/lib/mako-0.7.2/test/templates/gettext.mako
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/gettext.mako
+++ /dev/null
@@ -1,89 +0,0 @@
-<%page args="x, y=_('Page arg 1'), z=_('Page arg 2')"/>
-<%!
-import random
-def gettext(message): return message
-_ = gettext
-def ungettext(s, p, c):
-    if c == 1:
-        return s
-    return p
-top = gettext('Begin')
-%>
-<%
-   # TRANSLATOR: Hi there!
-   hithere = _('Hi there!')
-
-   # TRANSLATOR: you should not be seeing this in the .po
-   rows = [[v for v in range(0,10)] for row in range(0,10)]
-
-   hello = _('Hello')
-%>
-<div id="header">
-  ${_('Welcome')}
-</div>
-<table>
-    % for row in (hithere, hello, _('Yo')):
-        ${makerow(row)}
-    % endfor
-    ${makerow(count=2)}
-</table>
-
-
-<div id="main">
-
-## TRANSLATOR: Ensure so and
-## so, thanks
-  ${_('The')} fuzzy ${ungettext('bunny', 'bunnies', random.randint(1, 2))}
-</div>
-
-<div id="footer">
-  ## TRANSLATOR: Good bye
-  ${_('Goodbye')}
-</div>
- 
-<%def name="makerow(row=_('Babel'), count=1)">
-    <!-- ${ungettext('hella', 'hellas', count)} -->
-    % for i in range(count):
-      <tr>
-      % for name in row:
-          <td>${name}</td>\
-      % endfor
-      </tr>
-    % endfor
-</%def>
-
-<%def name="comment()">
-  <!-- ${caller.body()} -->
-</%def>
-
-<%block name="foo">
-    ## TRANSLATOR: Ensure so and
-    ## so, thanks
-      ${_('The')} fuzzy ${ungettext('bunny', 'bunnies', random.randint(1, 2))}
-</%block>
-
-<%call expr="comment">
-  P.S.
-  ## TRANSLATOR: HTML comment
-  ${_('Goodbye, really!')}
-</%call>
-
-<!-- ${_('P.S. byebye')} -->
-
-<div id="end">
-  <a href="#top">
-    ## TRANSLATOR: you won't see this either
- 
-    ${_('Top')}
-  </a>
-</div>
-
-<%def name="panel()">
-
-${_(u'foo')} <%self:block_tpl title="123", name="_(u'baz')">
-
-${_(u'bar')}
-
-</%self:block_tpl>
-
-</%def>
diff --git a/lib/mako-0.7.2/test/templates/index.html b/lib/mako-0.7.2/test/templates/index.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/index.html
+++ /dev/null
@@ -1,1 +0,0 @@
-this is index
\ No newline at end of file
diff --git a/lib/mako-0.7.2/test/templates/internationalization.html b/lib/mako-0.7.2/test/templates/internationalization.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/internationalization.html
+++ /dev/null
@@ -1,920 +0,0 @@
-<div class="rst-docs">
- 
-  <h1 class="pudge-member-page-heading">Internationalization, Localization and Unicode</h1>
- 
-  <table rules="none" frame="void" class="docinfo">
-<col class="docinfo-name"></col>
-<col class="docinfo-content"></col>
-<tbody valign="top">
-<tr><th class="docinfo-name">Author:</th>
-<td>James Gardner</td></tr>
-<tr class="field"><th class="docinfo-name">updated:</th><td class="field-body">2006-12-11</td>
-</tr>
-</tbody>
-</table>
-
-  <div class="note">
-<p class="first admonition-title">Note</p>
-<p>This is a work in progress. We hope the internationalization, localization
-and Unicode support in Pylons is now robust and flexible but we would
-appreciate hearing about any issues we have. Just drop a line to the
-pylons-discuss mailing list on Google Groups.</p>
-<p class="last">This is the first draft of the full document including Unicode. Expect
-some typos and spelling mistakes!</p>
-</div>
-<div class="contents topic">
-<p class="topic-title first"><a id="table-of-contents" name="table-of-contents">Table of Contents</a></p>
-<ul class="auto-toc simple">
-<li><a href="#understanding-unicode" id="id1" name="id1" class="reference">1   Understanding Unicode</a><ul class="auto-toc">
-<li><a href="#what-is-unicode" id="id2" name="id2" class="reference">1.1   What is Unicode?</a></li>
-<li><a href="#unicode-in-python" id="id3" name="id3" class="reference">1.2   Unicode in Python</a></li>
-<li><a href="#unicode-literals-in-python-source-code" id="id4" name="id4" class="reference">1.3   Unicode Literals in Python Source Code</a></li>
-<li><a href="#input-and-output" id="id5" name="id5" class="reference">1.4   Input and Output</a></li>
-<li><a href="#unicode-filenames" id="id6" name="id6" class="reference">1.5   Unicode Filenames</a></li>
-</ul>
-</li>
-<li><a href="#applying-this-to-web-programming" id="id7" name="id7" class="reference">2   Applying this to Web Programming</a><ul class="auto-toc">
-<li><a href="#request-parameters" id="id8" name="id8" class="reference">2.1   Request Parameters</a></li>
-<li><a href="#templating" id="id9" name="id9" class="reference">2.2   Templating</a></li>
-<li><a href="#output-encoding" id="id10" name="id10" class="reference">2.3   Output Encoding</a></li>
-<li><a href="#databases" id="id11" name="id11" class="reference">2.4   Databases</a></li>
-</ul>
-</li>
-<li><a href="#internationalization-and-localization" id="id12" name="id12" class="reference">3   Internationalization and Localization</a><ul class="auto-toc">
-<li><a href="#getting-started" id="id13" name="id13" class="reference">3.1   Getting Started</a></li>
-<li><a href="#testing-the-application" id="id14" name="id14" class="reference">3.2   Testing the Application</a></li>
-<li><a href="#missing-translations" id="id15" name="id15" class="reference">3.3   Missing Translations</a></li>
-<li><a href="#translations-within-templates" id="id16" name="id16" class="reference">3.4   Translations Within Templates</a></li>
-<li><a href="#producing-a-python-egg" id="id17" name="id17" class="reference">3.5   Producing a Python Egg</a></li>
-<li><a href="#plural-forms" id="id18" name="id18" class="reference">3.6   Plural Forms</a></li>
-</ul>
-</li>
-<li><a href="#summary" id="id19" name="id19" class="reference">4   Summary</a></li>
-<li><a href="#further-reading" id="id20" name="id20" class="reference">5   Further Reading</a></li>
-</ul>
-</div>
-<p>Internationalization and localization are means of adapting software for
-non-native environments, especially for other nations and cultures.</p>
-<p>Parts of an application which might need to be localized might include:</p>
-<blockquote>
-<ul class="simple">
-<li>Language</li>
-<li>Date/time format</li>
-<li>Formatting of numbers e.g. decimal points, positioning of separators,
-character used as separator</li>
-<li>Time zones (UTC in internationalized environments)</li>
-<li>Currency</li>
-<li>Weights and measures</li>
-</ul>
-</blockquote>
-<p>The distinction between internationalization and localization is subtle but
-important. Internationalization is the adaptation of products for potential use
-virtually everywhere, while localization is the addition of special features
-for use in a specific locale.</p>
-<p>For example, in terms of language used in software, internationalization is the
-process of marking up all strings that might need to be translated whilst
-localization is the process of producing translations for a particular locale.</p>
-<p>Pylons provides built-in support to enable you to internationalize language but
-leaves you to handle any other aspects of internationalization which might be
-appropriate to your application.</p>
-<div class="note">
-<p class="first admonition-title">Note</p>
-<p class="last">Internationalization is often abbreviated as I18N (or i18n or I18n) where the
-number 18 refers to the number of letters omitted.
-Localization is often abbreviated L10n or l10n in the same manner. These
-abbreviations also avoid picking one spelling (internationalisation vs.
-internationalization, etc.) over the other.</p>
-</div>
-<p>In order to represent characters from multiple languages, you will need to use
-Unicode so this documentation will start with a description of why Unicode is
-useful, its history and how to use Unicode in Python.</p>
-<div class="section">
-<h1><a href="#id1" id="understanding-unicode" name="understanding-unicode" class="toc-backref">1   Understanding Unicode</a></h1>
-<p>If you've ever come across text in a foreign language that contains lots of
-<tt class="docutils literal"><span class="pre">????</span></tt> characters or have written some Python code and received a message
-such as <tt class="docutils literal"><span class="pre">UnicodeDecodeError:</span> <span class="pre">'ascii'</span> <span class="pre">codec</span> <span class="pre">can't</span> <span class="pre">decode</span> <span class="pre">byte</span> <span class="pre">0xff</span> <span class="pre">in</span> <span class="pre">position</span>
-<span class="pre">6:</span> <span class="pre">ordinal</span> <span class="pre">not</span> <span class="pre">in</span> <span class="pre">range(128)</span></tt> then you have run into a problem with character
-sets, encodings, Unicode and the like.</p>
-<p>The truth is that many developers are put off by Unicode because most of the
-time it is possible to muddle through rather than take the time to learn the
-basics. To make the problem worse if you have a system that manages to fudge
-the issues and just about work and then start trying to do things properly with
-Unicode it often highlights problems in other parts of your code.</p>
-<p>The good news is that Python has great Unicode support, so the rest of
-this article will show you how to correctly use Unicode in Pylons to avoid
-unwanted <tt class="docutils literal"><span class="pre">?</span></tt> characters and <tt class="docutils literal"><span class="pre">UnicodeDecodeErrors</span></tt>.</p>
-<div class="section">
-<h2><a href="#id2" id="what-is-unicode" name="what-is-unicode" class="toc-backref">1.1   What is Unicode?</a></h2>
-<p>When computers were first being used the characters that were most important
-were unaccented English letters. Each of these letters could be represented by
-a number between 32 and 127 and thus was born ASCII, a character set where
-space was 32, the letter "A" was 65 and everything could be stored in 7 bits.</p>
-<p>Most computers in those days were using 8-bit bytes so people quickly realized
-that they could use the codes 128-255 for their own purposes. Different people
-used the codes 128-255 to represent different characters and before long these
-different sets of characters were also standardized into <em>code pages</em>. This
-meant that if you needed some non-ASCII characters in a document you could also
-specify a codepage which would define which extra characters were available.
-For example Israel DOS used a code page called 862, while Greek users used 737.
-This just about worked for Western languages provided you didn't want to write
-an Israeli document with Greek characters but it didn't work at all for Asian
-languages where there are many more characters than can be represented in 8
-bits.</p>
-<p>Unicode is a character set that solves these problems by uniquely defining
-<em>every</em> character that is used anywhere in the world. Rather than defining a
-character as a particular combination of bits in the way ASCII does, each
-character is assigned a <em>code point</em>. For example the word <tt class="docutils literal"><span class="pre">hello</span></tt> is made
-from code points <tt class="docutils literal"><span class="pre">U+0048</span> <span class="pre">U+0065</span> <span class="pre">U+006C</span> <span class="pre">U+006C</span> <span class="pre">U+006F</span></tt>. The full list of code
-points can be found at <a href="http://www.unicode.org/charts/" class="reference">http://www.unicode.org/charts/</a>.</p>
-<p>There are lots of different ways of encoding Unicode code points into bits but
-the most popular encoding is UTF-8. Using UTF-8, every code point from 0-127 is
-stored in a single byte. Only code points 128 and above are stored using 2, 3,
-in fact, up to 6 bytes. This has the useful side effect that English text looks
-exactly the same in UTF-8 as it did in ASCII, because for every
-ASCII character with hexadecimal value 0xXY, the corresponding Unicode
-code point is U+00XY. This backwards compatibility is why if you are developing
-an application that is only used by English speakers you can often get away
-without handling characters properly and still expect things to work most of
-the time. Of course, if you use a different encoding such as UTF-16 this
-doesn't apply since none of the code points are encoded to 8 bits.</p>
-<p>The important things to note from the discussion so far are that:</p>
-<ul>
-<li><p class="first">Unicode can represent pretty much any character in any writing system in
-widespread use today</p>
-</li>
-<li><p class="first">Unicode uses code points to represent characters and the way these map to bits
-in memory depends on the encoding</p>
-</li>
-<li><dl class="first docutils">
-<dt>The most popular encoding is UTF-8 which has  several convenient properties:</dt>
-<dd><ol class="first last arabic simple">
-<li>It can handle any Unicode code point</li>
-<li>A Unicode string is turned into a string of bytes containing no embedded
-zero bytes. This avoids byte-ordering issues, and means UTF-8 strings can be
-processed by C functions such as strcpy() and sent through protocols that can't
-handle zero bytes</li>
-<li>A string of ASCII text is also valid UTF-8 text</li>
-<li>UTF-8 is fairly compact; the majority of code points are turned into two
-bytes, and values less than 128 occupy only a single byte.</li>
-<li>If bytes are corrupted or lost, it's possible to determine the start of
-the next UTF-8-encoded code point and resynchronize.</li>
-</ol>
-</dd>
-</dl>
-</li>
-</ul>
-<div class="note">
-<p class="first admonition-title">Note</p>
-<p class="last">Since Unicode 3.1, some extensions have even been defined so that the
-defined range is now U+000000 to U+10FFFF (21 bits), and formally, the
-character set is defined as 31-bits to allow for future expansion. It is a myth
-that there are 65,536 Unicode code points and that every Unicode letter can
-really be squeezed into two bytes. It is also incorrect to think that UTF-8 can
-represent less characters than UTF-16. UTF-8 simply uses a variable number of
-bytes for a character, sometimes just one byte (8 bits).</p>
-</div>
-</div>
-<div class="section">
-<h2><a href="#id3" id="unicode-in-python" name="unicode-in-python" class="toc-backref">1.2   Unicode in Python</a></h2>
-<p>In Python Unicode strings are expressed as instances of the built-in
-<tt class="docutils literal"><span class="pre">unicode</span></tt> type. Under the hood, Python represents Unicode strings as either
-16 or 32 bit integers, depending on how the Python interpreter was compiled.</p>
-<p>The <tt class="docutils literal"><span class="pre">unicode()</span></tt> constructor has the signature <tt class="docutils literal"><span class="pre">unicode(string[,</span> <span class="pre">encoding,</span>
-<span class="pre">errors])</span></tt>. All of its arguments should be 8-bit strings. The first argument is
-converted to Unicode using the specified encoding; if you leave off the
-encoding argument, the ASCII encoding is used for the conversion, so characters
-greater than 127 will be treated as errors:</p>
-<pre class="literal-block">
->>> unicode('hello')
-u'hello'
->>> s = unicode('hello')
->>> type(s)
-<type 'unicode'>
->>> unicode('hello' + chr(255))
-Traceback (most recent call last):
-  File "<stdin>", line 1, in ?
-UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 6:
-                    ordinal not in range(128)
-</pre>
-<p>The <tt class="docutils literal"><span class="pre">errors</span></tt> argument specifies what to do if the string can't be decoded to
-ascii. Legal values for this argument are <tt class="docutils literal"><span class="pre">'strict'</span></tt> (raise a
-<tt class="docutils literal"><span class="pre">UnicodeDecodeError</span></tt> exception), <tt class="docutils literal"><span class="pre">'replace'</span></tt> (replace the character that
-can't be decoded with another one), or <tt class="docutils literal"><span class="pre">'ignore'</span></tt> (just leave the character
-out of the Unicode result).</p>
-<blockquote>
-<pre class="doctest-block">
->>> unicode('\x80abc', errors='strict')
-Traceback (most recent call last):
-  File "<stdin>", line 1, in ?
-UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0:
-                    ordinal not in range(128)
->>> unicode('\x80abc', errors='replace')
-u'\ufffdabc'
->>> unicode('\x80abc', errors='ignore')
-u'abc'
-</pre>
-</blockquote>
-<p>It is important to understand the difference between <em>encoding</em> and <em>decoding</em>.
-Unicode strings are considered to be the Unicode code points but any
-representation of the Unicode string has to be encoded to something else, for
-example UTF-8 or ASCII. So when you are converting an ASCII or UTF-8 string to
-Unicode you are <em>decoding</em> it and when you are converting from Unicode to UTF-8
-or ASCII you are <em>encoding</em> it. This is why the error in the example above says
-that the ASCII codec cannot decode the byte <tt class="docutils literal"><span class="pre">0x80</span></tt> from ASCII to Unicode
-because it is not in the range(128) or 0-127. In fact <tt class="docutils literal"><span class="pre">0x80</span></tt> is hex for 128
-which the first number outside the ASCII range. However if we tell Python that
-the character <tt class="docutils literal"><span class="pre">0x80</span></tt> is encoded with the <tt class="docutils literal"><span class="pre">'latin-1'</span></tt>, <tt class="docutils literal"><span class="pre">'iso_8859_1'</span></tt> or
-<tt class="docutils literal"><span class="pre">'8859'</span></tt> character sets (which incidentally are different names for the same
-thing) we get the result we expected:</p>
-<textarea name="code" class="python">
->>> unicode('\x80', encoding='latin-1')
-u'\x80'
-</textarea><div class="note">
-<p class="first admonition-title">Note</p>
-<p class="last">The character encodings Python supports are listed at
-<a href="http://docs.python.org/lib/standard-encodings.html" class="reference">http://docs.python.org/lib/standard-encodings.html</a></p>
-</div>
-<p>Unicode objects in Python have most of the same methods that normal Python
-strings provide. Python will try to use the <tt class="docutils literal"><span class="pre">'ascii'</span></tt> codec to convert
-strings to Unicode if you do an operation on both types:</p>
-<textarea name="code" class="python">
->>> a = 'hello'
->>> b = unicode(' world!')
->>> print a + b
-u'hello world!'
-</textarea><p>You can encode a Unicode string using a particular encoding like this:</p>
-<textarea name="code" class="python">
->>> u'Hello World!'.encode('UTF-8')
-'Hello World!'
-</textarea></div>
-<div class="section">
-<h2><a href="#id4" id="unicode-literals-in-python-source-code" name="unicode-literals-in-python-source-code" class="toc-backref">1.3   Unicode Literals in Python Source Code</a></h2>
-<p>In Python source code, Unicode literals are written as strings prefixed with
-the 'u' or 'U' character:</p>
-<textarea name="code" class="python">
->>> u'abcdefghijk'
->>> U'lmnopqrstuv'
-</textarea><p>You can also use <tt class="docutils literal"><span class="pre">"</span></tt>, <tt class="docutils literal"><span class="pre">"""`</span></tt> or <tt class="docutils literal"><span class="pre">'''</span></tt> versions too. For example:</p>
-<textarea name="code" class="python">
->>> u"""This
-... is a really long
-... Unicode string"""
-</textarea><p>Specific code points can be written using the <tt class="docutils literal"><span class="pre">\u</span></tt> escape sequence, which is
-followed by four hex digits giving the code point. If you use <tt class="docutils literal"><span class="pre">\U</span></tt> instead
-you specify 8 hex digits instead of 4. Unicode literals can also use the same
-escape sequences as 8-bit strings, including <tt class="docutils literal"><span class="pre">\x</span></tt>, but <tt class="docutils literal"><span class="pre">\x</span></tt> only takes two
-hex digits so it can't express all the available code points. You can add
-characters to Unicode strings using the <tt class="docutils literal"><span class="pre">unichr()</span></tt> built-in function and find
-out what the ordinal is with <tt class="docutils literal"><span class="pre">ord()</span></tt>.</p>
-<p>Here is an example demonstrating the different alternatives:</p>
-<textarea name="code" class="python">
->>> s = u"\x66\u0072\u0061\U0000006e" + unichr(231) + u"ais"
->>> #     ^^^^ two-digit hex escape
->>> #         ^^^^^^ four-digit Unicode escape
->>> #                     ^^^^^^^^^^ eight-digit Unicode escape
->>> for c in s:  print ord(c),
-...
-97 102 114 97 110 231 97 105 115
->>> print s
-franÁais
-</textarea><p>Using escape sequences for code points greater than 127 is fine in small doses
-but Python 2.4 and above support writing Unicode literals in any encoding as
-long as you declare the encoding being used by including a special comment as
-either the first or second line of the source file:</p>
-<textarea name="code" class="python">
-#!/usr/bin/env python
-# -*- coding: latin-1 -*-
-
-u = u'abcdÈ'
-print ord(u[-1])
-</textarea><p>If you don't include such a comment, the default encoding used will be ASCII.
-Versions of Python before 2.4 were Euro-centric and assumed Latin-1 as a
-default encoding for string literals; in Python 2.4, characters greater than
-127 still work but result in a warning. For example, the following program has
-no encoding declaration:</p>
-<textarea name="code" class="python">
-#!/usr/bin/env python
-u = u'abcdÈ'
-print ord(u[-1])
-</textarea><p>When you run it with Python 2.4, it will output the following warning:</p>
-<pre class="literal-block">
-sys:1: DeprecationWarning: Non-ASCII character '\xe9' in file testas.py on line
-2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for de
-tails
-</pre>
-<p>and then the following output:</p>
-<pre class="literal-block">
-233
-</pre>
-<p>For real world use it is recommended that you use the UTF-8 encoding for your
-file but you must be sure that your text editor actually saves the file as
-UTF-8 otherwise the Python interpreter will try to parse UTF-8 characters but
-they will actually be stored as something else.</p>
-<div class="note">
-<p class="first admonition-title">Note</p>
-<p class="last">Windows users who use the <a href="http://www.scintilla.org/SciTE.html" class="reference">SciTE</a>
-editor can specify the encoding of their file from the menu using the
-<tt class="docutils literal"><span class="pre">File->Encoding</span></tt>.</p>
-</div>
-<div class="note">
-<p class="first admonition-title">Note</p>
-<p class="last">If you are working with Unicode in detail you might also be interested in
-the <tt class="docutils literal"><span class="pre">unicodedata</span></tt> module which can be used to find out Unicode properties
-such as a character's name, category, numeric value and the like.</p>
-</div>
-</div>
-<div class="section">
-<h2><a href="#id5" id="input-and-output" name="input-and-output" class="toc-backref">1.4   Input and Output</a></h2>
-<p>We now know how to use Unicode in Python source code but input and output can
-also be different using Unicode. Of course, some libraries natively support
-Unicode and if these libraries return Unicode objects you will not have to do
-anything special to support them. XML parsers and SQL databases frequently
-support Unicode for example.</p>
-<p>If you remember from the discussion earlier, Unicode data consists of code
-points. In order to send Unicode data via a socket or write it to a file you
-usually need to encode it to a series of bytes and then decode the data back to
-Unicode when reading it. You can of course perform the encoding manually
-reading a byte at the time but since encodings such as UTF-8 can have variable
-numbers of bytes per character it is usually much easier to use Python's
-built-in support in the form of the <tt class="docutils literal"><span class="pre">codecs</span></tt> module.</p>
-<p>The codecs module includes a version of the <tt class="docutils literal"><span class="pre">open()</span></tt> function that
-returns a file-like object that assumes the file's contents are in a specified
-encoding and accepts Unicode parameters for methods such as <tt class="docutils literal"><span class="pre">.read()</span></tt> and
-<tt class="docutils literal"><span class="pre">.write()</span></tt>.</p>
-<p>The function's parameters are open(filename, mode='rb', encoding=None,
-errors='strict', buffering=1). <tt class="docutils literal"><span class="pre">mode</span></tt> can be 'r', 'w', or 'a', just like the
-corresponding parameter to the regular built-in <tt class="docutils literal"><span class="pre">open()</span></tt> function. You can
-add a <tt class="docutils literal"><span class="pre">+</span></tt> character to update the file. <tt class="docutils literal"><span class="pre">buffering</span></tt> is similar to the
-standard function's parameter. <tt class="docutils literal"><span class="pre">encoding</span></tt> is a string giving the encoding to
-use, if not specified or specified as <tt class="docutils literal"><span class="pre">None</span></tt>, a regular Python file object
-that accepts 8-bit strings is returned.  Otherwise, a wrapper object is
-returned, and data written to or read from the wrapper object will be converted
-as needed. <tt class="docutils literal"><span class="pre">errors</span></tt> specifies the action for encoding errors and can be one
-of the usual values of <tt class="docutils literal"><span class="pre">'strict'</span></tt>, <tt class="docutils literal"><span class="pre">'ignore'</span></tt>, or <tt class="docutils literal"><span class="pre">'replace'</span></tt> which we
-saw right at the begining of this document when we were encoding strings in
-Python source files.</p>
-<p>Here is an example of how to read Unicode from a UTF-8 encoded file:</p>
-<textarea name="code" class="python">
-import codecs
-f = codecs.open('unicode.txt', encoding='utf-8')
-for line in f:
-    print repr(line)
-</textarea><p>It's also possible to open files in update mode, allowing both reading and writing:</p>
-<textarea name="code" class="python">
-f = codecs.open('unicode.txt', encoding='utf-8', mode='w+')
-f.write(u"\x66\u0072\u0061\U0000006e" + unichr(231) + u"ais")
-f.seek(0)
-print repr(f.readline()[:1])
-f.close()
-</textarea><p>Notice that we used the <tt class="docutils literal"><span class="pre">repr()</span></tt> function to display the Unicode data. This
-is very useful because if you tried to print the Unicode data directly, Python
-would need to encode it before it could be sent the console and depending on
-which characters were present and the character set used by the console, an
-error might be raised. This is avoided if you use <tt class="docutils literal"><span class="pre">repr()</span></tt>.</p>
-<p>The Unicode character <tt class="docutils literal"><span class="pre">U+FEFF</span></tt> is used as a byte-order mark or BOM, and is often
-written as the first character of a file in order to assist with auto-detection
-of the file's byte ordering. Some encodings, such as UTF-16, expect a BOM to be
-present at the start of a file, but with others such as UTF-8 it isn't necessary.</p>
-<p>When such an encoding is used, the BOM will be automatically written as the
-first character and will be silently dropped when the file is read. There are
-variants of these encodings, such as 'utf-16-le' and 'utf-16-be' for
-little-endian and big-endian encodings, that specify one particular byte
-ordering and don't skip the BOM.</p>
-<div class="note">
-<p class="first admonition-title">Note</p>
-<p class="last">Some editors including SciTE will put a byte order mark (BOM) in the text
-file when saved as UTF-8, which is strange because UTF-8 doesn't need BOMs.</p>
-</div>
-</div>
-<div class="section">
-<h2><a href="#id6" id="unicode-filenames" name="unicode-filenames" class="toc-backref">1.5   Unicode Filenames</a></h2>
-<p>Most modern operating systems support the use of Unicode filenames. The
-filenames are transparently converted to the underlying filesystem encoding.
-The type of encoding depends on the operating system.</p>
-<p>On Windows 9x, the encoding is <tt class="docutils literal"><span class="pre">mbcs</span></tt>.</p>
-<p>On Mac OS X, the encoding is <tt class="docutils literal"><span class="pre">utf-8</span></tt>.</p>
-<p>On Unix, the encoding is the user's preference according to the
-result of nl_langinfo(CODESET), or None if the nl_langinfo(CODESET) failed.</p>
-<p>On Windows NT+, file names are Unicode natively, so no conversion is performed.
-getfilesystemencoding still returns <tt class="docutils literal"><span class="pre">mbcs</span></tt>, as this is the encoding that
-applications should use when they explicitly want to convert Unicode strings to
-byte strings that are equivalent when used as file names.</p>
-<p><tt class="docutils literal"><span class="pre">mbcs</span></tt> is a special encoding for Windows that effectively means "use
-whichever encoding is appropriate". In Python 2.3 and above you can find out
-the system encoding with <tt class="docutils literal"><span class="pre">sys.getfilesystemencoding()</span></tt>.</p>
-<p>Most file and directory functions and methods support Unicode. For example:</p>
-<textarea name="code" class="python">
-filename = u"\x66\u0072\u0061\U0000006e" + unichr(231) + u"ais"
-f = open(filename, 'w')
-f.write('Some data\n')
-f.close()
-</textarea><p>Other functions such as <tt class="docutils literal"><span class="pre">os.listdir()</span></tt> will return Unicode if you pass a
-Unicode argument and will try to return strings if you pass an ordinary 8 bit
-string. For example running this example as <tt class="docutils literal"><span class="pre">test.py</span></tt>:</p>
-<textarea name="code" class="python">
-filename = u"Sample " + unichar(5000)
-f = open(filename, 'w')
-f.close()
-
-import os
-print os.listdir('.')
-print os.listdir(u'.')
-</textarea><p>will produce the following output:</p>
-<blockquote>
-['Sample?', 'test.py']
-[u'Sampleu1388', u'test.py']</blockquote>
-</div>
-</div>
-<div class="section">
-<h1><a href="#id7" id="applying-this-to-web-programming" name="applying-this-to-web-programming" class="toc-backref">2   Applying this to Web Programming</a></h1>
-<p>So far we've seen how to use encoding in source files and seen how to decode
-text to Unicode and encode it back to text. We've also seen that Unicode
-objects can be manipulated in similar ways to strings and we've seen how to
-perform input and output operations on files. Next we are going to look at how
-best to use Unicode in a web app.</p>
-<p>The main rule is this:</p>
-<pre class="literal-block">
-Your application should use Unicode for all strings internally, decoding
-any input to Unicode as soon as it enters the application and encoding the
-Unicode to UTF-8 or another encoding only on output.
-</pre>
-<p>If you fail to do this you will find that <tt class="docutils literal"><span class="pre">UnicodeDecodeError</span></tt> s will start
-popping up in unexpected places when Unicode strings are used with normal 8-bit
-strings because Python's default encoding is ASCII and it will try to decode
-the text to ASCII and fail. It is always better to do any encoding or decoding
-at the edges of your application otherwise you will end up patching lots of
-different parts of your application unnecessarily as and when errors pop up.</p>
-<p>Unless you have a very good reason not to it is wise to use UTF-8 as the
-default encoding since it is so widely supported.</p>
-<p>The second rule is:</p>
-<pre class="literal-block">
-Always test your application with characters above 127 and above 255
-wherever possible.
-</pre>
-<p>If you fail to do this you might think your application is working fine, but as
-soon as your users do put in non-ASCII characters you will have problems.
-Using arabic is always a good test and www.google.ae is a good source of sample
-text.</p>
-<p>The third rule is:</p>
-<pre class="literal-block">
-Always do any checking of a string for illegal characters once it's in the
-form that will be used or stored, otherwise the illegal characters might be
-disguised.
-</pre>
-<p>For example, let's say you have a content management system that takes a
-Unicode filename, and you want to disallow paths with a '/' character. You
-might write this code:</p>
-<textarea name="code" class="python">
-def read_file(filename, encoding):
-    if '/' in filename:
-        raise ValueError("'/' not allowed in filenames")
-    unicode_name = filename.decode(encoding)
-    f = open(unicode_name, 'r')
-    # ... return contents of file ...
-</textarea><p>This is INCORRECT. If an attacker could specify the 'base64' encoding, they
-could pass <tt class="docutils literal"><span class="pre">L2V0Yy9wYXNzd2Q=</span></tt> which is the base-64 encoded form of the string
-<tt class="docutils literal"><span class="pre">'/etc/passwd'</span></tt> which is a file you clearly don't want an attacker to get
-hold of.  The above code looks for <tt class="docutils literal"><span class="pre">/</span></tt> characters in the encoded form and
-misses the dangerous character in the resulting decoded form.</p>
-<p>Those are the three basic rules so now we will look at some of the places you
-might want to perform Unicode decoding in a Pylons application.</p>
-<div class="section">
-<h2><a href="#id8" id="request-parameters" name="request-parameters" class="toc-backref">2.1   Request Parameters</a></h2>
-<p>Currently the Pylons input values come from <tt class="docutils literal"><span class="pre">request.params</span></tt> but these are
-not decoded to Unicode by default because not all input should be assumed to be
-Unicode data.</p>
-<p>If you would like However you can use the two functions below:</p>
-<textarea name="code" class="python">
-def decode_multi_dict(md, encoding="UTF-8", errors="strict"):
-    """Given a MultiDict, decode all its parts from the given encoding.
-
-    This modifies the MultiDict in place.
-
-    encoding, strict
-      These are passed to the decode function.
-
-    """
-    items = md.items()
-    md.clear()
-    for (k, v) in items:
-        md.add(k.decode(encoding, errors),
-               v.decode(encoding, errors))
-
-
-def decode_request(request, encoding="UTF-8", errors="strict"):
-    """Given a request object, decode GET and POST in place.
-
-    This implicitly takes care of params as well.
-
-    """
-    decode_multi_dict(request.GET, encoding, errors)
-    decode_multi_dict(request.POST, encoding, errors)
-</textarea><p>These can then be used as follows:</p>
-<textarea name="code" class="python">
-unicode_params = decode_request(request.params)
-</textarea><p>This code is discussed in <a href="http://pylonshq.com/project/pylonshq/ticket/135" class="reference">ticket 135</a> but shouldn't be used with
-file uploads since these shouldn't ordinarily be decoded to Unicode.</p>
-</div>
-<div class="section">
-<h2><a href="#id9" id="templating" name="templating" class="toc-backref">2.2   Templating</a></h2>
-<p>Pylons uses Myghty as its default templating language and Myghty 1.1 and above
-fully support Unicode. The Myghty documentation explains how to use Unicode and
-you at <a href="http://www.myghty.org/docs/unicode.myt" class="reference">http://www.myghty.org/docs/unicode.myt</a> but the important idea is that
-you can Unicode literals pretty much anywhere you can use normal 8-bit strings
-including in <tt class="docutils literal"><span class="pre">m.write()</span></tt> and <tt class="docutils literal"><span class="pre">m.comp()</span></tt>. You can also pass Unicode data to
-Pylons' <tt class="docutils literal"><span class="pre">render_response()</span></tt> and <tt class="docutils literal"><span class="pre">Response()</span></tt> callables.</p>
-<p>Any Unicode data output by Myghty is automatically decoded to whichever
-encoding you have chosen. The default is UTF-8 but you can choose which
-encoding to use by editing your project's <tt class="docutils literal"><span class="pre">config/environment.py</span></tt> file and
-adding an option like this:</p>
-<textarea name="code" class="python">
-# Add your own Myghty config options here, note that all config options will override
-# any Pylons config options
-
-myghty['output_encoding'] = 'UTF-8'
-</textarea><p>replacing <tt class="docutils literal"><span class="pre">UTF-8</span></tt> with the encoding you wish to use.</p>
-<p>If you need to disable Unicode support altogether you can set this:</p>
-<textarea name="code" class="python">
-myghty['disable_unicode'] = True
-</textarea><p>but again, you would have to have a good reason to want to do this.</p>
-</div>
-<div class="section">
-<h2><a href="#id10" id="output-encoding" name="output-encoding" class="toc-backref">2.3   Output Encoding</a></h2>
-<p>Web pages should be generated with a specific encoding, most likely UTF-8. At
-the very least, that means you should specify the following in the <tt class="docutils literal"><span class="pre"><head></span></tt>
-section:</p>
-<pre class="literal-block">
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-</pre>
-<p>You should also set the charset in the <tt class="docutils literal"><span class="pre">Content-Type</span></tt> header:</p>
-<textarea name="code" class="python">
-respones = Response(...)
-response.headers['Content-type'] = 'text/html; charset=utf-8'
-</textarea><p>If you specify that your output is UTF-8, generally the web browser will
-give you UTF-8. If you want the browser to submit data using a different
-character set, you can set the encoding by adding the <tt class="docutils literal"><span class="pre">accept-encoding</span></tt>
-tag to your form. Here is an example:</p>
-<pre class="literal-block">
-<form accept-encoding="US-ASCII" ...>
-</pre>
-<p>However, be forewarned that if the user tries to give you non-ASCII
-text, then:</p>
-<blockquote>
-<ul class="simple">
-<li>Firefox will translate the non-ASCII text into HTML entities.</li>
-<li>IE will ignore your suggested encoding and give you UTF-8 anyway.</li>
-</ul>
-</blockquote>
-<p>The lesson to be learned is that if you output UTF-8, you had better be
-prepared to accept UTF-8 by decoding the data in <tt class="docutils literal"><span class="pre">request.params</span></tt> as
-described in the section above entitled "Request Parameters".</p>
-<p>Another technique which is sometimes used to determine the character set is to
-use an algorithm to analyse the input and guess the encoding based on
-probabilities.</p>
-<p>For instance, if you get a file, and you don't know what encoding it is encoded
-in, you can often rename the file with a .txt extension and then try to open it
-in Firefox.  Then you can use the "View->Character Encoding" menu to try to
-auto-detect the encoding.</p>
-</div>
-<div class="section">
-<h2><a href="#id11" id="databases" name="databases" class="toc-backref">2.4   Databases</a></h2>
-<p>Your database driver should automatically convert from Unicode objects to a
-particular charset when writing and back again when reading. Again it is normal
-to use UTF-8 which is well supported.</p>
-<p>You should check your database's documentation for information on how it handles
-Unicode.</p>
-<p>For example MySQL's Unicode documentation is here
-<a href="http://dev.mysql.com/doc/refman/5.0/en/charset-unicode.html" class="reference">http://dev.mysql.com/doc/refman/5.0/en/charset-unicode.html</a></p>
-<p>Also note that you need to consider both the encoding of the database
-and the encoding used by the database driver.</p>
-<p>If you're using MySQL together with SQLAlchemy, see the following, as
-there are some bugs in MySQLdb that you'll need to work around:</p>
-<p><a href="http://www.mail-archive.com/sqlalchemy@googlegroups.com/msg00366.html" class="reference">http://www.mail-archive.com/sqlalchemy@googlegroups.com/msg00366.html</a></p>
-</div>
-</div>
-<div class="section">
-<h1><a href="#id12" id="internationalization-and-localization" name="internationalization-and-localization" class="toc-backref">3   Internationalization and Localization</a></h1>
-<p>By now you should have a good idea of what Unicode is, how to use it in Python
-and which areas of you application need to pay specific attention to decoding and
-encoding Unicode data.</p>
-<p>This final section will look at the issue of making your application work with
-multiple languages.</p>
-<div class="section">
-<h2><a href="#id13" id="getting-started" name="getting-started" class="toc-backref">3.1   Getting Started</a></h2>
-<p>Everywhere in your code where you want strings to be available in different
-languages you wrap them in the <tt class="docutils literal"><span class="pre">_()</span></tt> function. There
-are also a number of other translation functions which are documented in the API reference at
-<a href="http://pylonshq.com/docs/module-pylons.i18n.translation.html" class="reference">http://pylonshq.com/docs/module-pylons.i18n.translation.html</a></p>
-<div class="note">
-<p class="first admonition-title">Note</p>
-<p class="last">The <tt class="docutils literal"><span class="pre">_()</span></tt> function is a reference to the <tt class="docutils literal"><span class="pre">ugettext()</span></tt> function.
-<tt class="docutils literal"><span class="pre">_()</span></tt> is a convention for marking text to be translated and saves on keystrokes.
-<tt class="docutils literal"><span class="pre">ugettext()</span></tt> is the Unicode version of <tt class="docutils literal"><span class="pre">gettext()</span></tt>.</p>
-</div>
-<p>In our example we want the string <tt class="docutils literal"><span class="pre">'Hello'</span></tt> to appear in three different
-languages: English, French and Spanish. We also want to display the word
-<tt class="docutils literal"><span class="pre">'Hello'</span></tt> in the default language. We'll then go on to use some pural words
-too.</p>
-<p>Lets call our project <tt class="docutils literal"><span class="pre">translate_demo</span></tt>:</p>
-<pre class="literal-block">
-paster create --template=pylons translate_demo
-</pre>
-<p>Now lets add a friendly controller that says hello:</p>
-<pre class="literal-block">
-cd translate_demo
-paster controller hello
-</pre>
-<p>Edit <tt class="docutils literal"><span class="pre">controllers/hello.py</span></tt> controller to look like this making use of the
-<tt class="docutils literal"><span class="pre">_()</span></tt> function everywhere where the string <tt class="docutils literal"><span class="pre">Hello</span></tt> appears:</p>
-<textarea name="code" class="python">
-from translate_demo.lib.base import *
-
-class HelloController(BaseController):
-
-    def index(self):
-        resp = Response()
-        resp.write('Default: %s<br />' % _('Hello'))
-        for lang in ['fr','en','es']:
-            h.set_lang(lang)
-            resp.write("%s: %s<br />" % (h.get_lang(), _('Hello')))
-        return resp
-</textarea><p>When writing your controllers it is important not to piece sentences together manually because
-certain languages might need to invert the grammars. As an example this is bad:</p>
-<textarea name="code" class="python">
-# BAD!
-msg = _("He told her ")
-msg += _("not to go outside.")
-</textarea><p>but this is perfectly acceptable:</p>
-<textarea name="code" class="python">
-# GOOD
-msg = _("He told her not to go outside")
-</textarea><p>The controller has now been internationalized but it will raise a <tt class="docutils literal"><span class="pre">LanguageError</span></tt>
-until we have specified the alternative languages.</p>
-<p>Pylons uses <a href="http://www.gnu.org/software/gettext/" class="reference">GNU gettext</a> to handle
-internationalization. GNU gettext use three types of files in the
-translation framework.</p>
-<p>POT (Portable Object Template) files</p>
-<blockquote>
-The first step in the localization process. A program is used to search through
-your project's source code and pick out every string passed to one of the
-translation functions, such as <tt class="docutils literal"><span class="pre">_()</span></tt>. This list is put together in a
-specially-formatted template file that will form the basis of all
-translations. This is the <tt class="docutils literal"><span class="pre">.pot</span></tt> file.</blockquote>
-<p>PO (Portable Object) files</p>
-<blockquote>
-The second step in the localization process. Using the POT file as a template,
-the list of messages are translated and saved as a <tt class="docutils literal"><span class="pre">.po</span></tt> file.</blockquote>
-<p>MO (Machine Object) files</p>
-<blockquote>
-The final step in the localization process. The PO file is run through a
-program that turns it into an optimized machine-readable binary file, which is
-the <tt class="docutils literal"><span class="pre">.mo</span></tt> file. Compiling the translations to machine code makes the
-localized program much faster in retrieving the translations while it is
-running.</blockquote>
-<p>Versions of Pylons prior to 0.9.4 came with a setuptools extension to help with
-the extraction of strings and production of a <tt class="docutils literal"><span class="pre">.mo</span></tt> file. The implementation
-did not support Unicode nor the ungettext function and was therfore dropped in
-Python 0.9.4.</p>
-<p>You will therefore need to use an external program to perform these tasks.  You
-may use whichever you prefer but <tt class="docutils literal"><span class="pre">xgettext</span></tt> is highly recommended. Python's
-gettext utility has some bugs, especially regarding plurals.</p>
-<p>Here are some compatible tools and projects:</p>
-<p>The Rosetta Project (<a href="https://launchpad.ubuntu.com/rosetta/" class="reference">https://launchpad.ubuntu.com/rosetta/</a>)</p>
-<blockquote>
-The Ubuntu Linux project has a web site that allows you to translate
-messages without even looking at a PO or POT file, and export directly to a MO.</blockquote>
-<p>poEdit (<a href="http://www.poedit.org/" class="reference">http://www.poedit.org/</a>)</p>
-<blockquote>
-An open source program for Windows and UNIX/Linux which provides an easy-to-use
-GUI for editing PO files and generating MO files.</blockquote>
-<p>KBabel (<a href="http://i18n.kde.org/tools/kbabel/" class="reference">http://i18n.kde.org/tools/kbabel/</a>)</p>
-<blockquote>
-Another open source PO editing program for KDE.</blockquote>
-<p>GNU Gettext (<a href="http://www.gnu.org/software/gettext/" class="reference">http://www.gnu.org/software/gettext/</a>)</p>
-<blockquote>
-The official Gettext tools package contains command-line tools for creating
-POTs, manipulating POs, and generating MOs. For those comfortable with a
-command shell.</blockquote>
-<p>As an example we will quickly discuss the use of poEdit which is cross platform
-and has a GUI which makes it easier to get started with.</p>
-<p>To use poEdit with the <tt class="docutils literal"><span class="pre">translate_demo</span></tt> you would do the following:</p>
-<ol class="arabic simple">
-<li>Download and install poEdit.</li>
-<li>A dialog pops up. Fill in <em>all</em> the fields you can on the <tt class="docutils literal"><span class="pre">Project</span> <span class="pre">Info</span></tt> tab, enter the path to your project on the <tt class="docutils literal"><span class="pre">Paths</span></tt> tab (ie <tt class="docutils literal"><span class="pre">/path/to/translate_demo</span></tt>) and enter the following keywords on separate lines on the <tt class="docutils literal"><span class="pre">keywords</span></tt> tab: <tt class="docutils literal"><span class="pre">_</span></tt>, <tt class="docutils literal"><span class="pre">N_</span></tt>, <tt class="docutils literal"><span class="pre">ugettext</span></tt>, <tt class="docutils literal"><span class="pre">gettext</span></tt>, <tt class="docutils literal"><span class="pre">ngettext</span></tt>, <tt class="docutils literal"><span class="pre">ungettext</span></tt>.</li>
-<li>Click OK</li>
-</ol>
-<p>poEdit will search your source tree and find all the strings you have marked
-up. You can then enter your translations in whatever charset you chose in
-the project info tab. UTF-8 is a good choice.</p>
-<p>Finally, after entering your translations you then save the catalog and rename
-the <tt class="docutils literal"><span class="pre">.mo</span></tt> file produced to <tt class="docutils literal"><span class="pre">translate_demo.mo</span></tt> and put it in the
-<tt class="docutils literal"><span class="pre">translate_demo/i18n/es/LC_MESSAGES</span></tt> directory or whatever is appropriate for
-your translation.</p>
-<p>You will need to repeat the process of creating a <tt class="docutils literal"><span class="pre">.mo</span></tt> file for the <tt class="docutils literal"><span class="pre">fr</span></tt>,
-<tt class="docutils literal"><span class="pre">es</span></tt> and <tt class="docutils literal"><span class="pre">en</span></tt> translations.</p>
-<p>The relevant lines from <tt class="docutils literal"><span class="pre">i18n/en/LC_MESSAGES/translate_demo.po</span></tt> look like this:</p>
-<pre class="literal-block">
-#: translate_demo\controllers\hello.py:6 translate_demo\controllers\hello.py:9
-msgid "Hello"
-msgstr "Hello"
-</pre>
-<p>The relevant lines from <tt class="docutils literal"><span class="pre">i18n/es/LC_MESSAGES/translate_demo.po</span></tt> look like this:</p>
-<pre class="literal-block">
-#: translate_demo\controllers\hello.py:6 translate_demo\controllers\hello.py:9
-msgid "Hello"
-msgstr "°Hola!"
-</pre>
-<p>The relevant lines from <tt class="docutils literal"><span class="pre">i18n/fr/LC_MESSAGES/translate_demo.po</span></tt> look like this:</p>
-<pre class="literal-block">
-#: translate_demo\controllers\hello.py:6 translate_demo\controllers\hello.py:9
-msgid "Hello"
-msgstr "Bonjour"
-</pre>
-<p>Whichever tools you use you should end up with an <tt class="docutils literal"><span class="pre">i18n</span></tt> directory that looks
-like this when you have finished:</p>
-<pre class="literal-block">
-i18n/en/LC_MESSAGES/translate_demo.po
-i18n/en/LC_MESSAGES/translate_demo.mo
-i18n/es/LC_MESSAGES/translate_demo.po
-i18n/es/LC_MESSAGES/translate_demo.mo
-i18n/fr/LC_MESSAGES/translate_demo.po
-i18n/fr/LC_MESSAGES/translate_demo.mo
-</pre>
-</div>
-<div class="section">
-<h2><a href="#id14" id="testing-the-application" name="testing-the-application" class="toc-backref">3.2   Testing the Application</a></h2>
-<p>Start the server with the following command:</p>
-<pre class="literal-block">
-paster serve --reload development.ini
-</pre>
-<p>Test your controller by visiting <a href="http://localhost:5000/hello" class="reference">http://localhost:5000/hello</a>. You should see
-the following output:</p>
-<pre class="literal-block">
-Default: Hello
-fr: Bonjour
-en: Hello
-es: °Hola!
-</pre>
-<p>You can now set the language used in a controller on the fly.</p>
-<p>For example this could be used to allow a user to set which language they
-wanted your application to work in. You could save the value to the session
-object:</p>
-<textarea name="code" class="python">
-session['lang'] = 'en'
-</textarea><p>then on each controller call the language to be used could be read from the
-session and set in your controller's <tt class="docutils literal"><span class="pre">__before__()</span></tt> method so that the pages
-remained in the same language that was previously set:</p>
-<textarea name="code" class="python">
-def __before__(self, action):
-    if session.has_key('lang'):
-        h.set_lang(session['lang'])
-</textarea><p>One more useful thing to be able to do is to set the default language to be
-used in the configuration file. Just add a <tt class="docutils literal"><span class="pre">lang</span></tt> variable together with the
-code of the language you wanted to use in your <tt class="docutils literal"><span class="pre">development.ini</span></tt> file. For
-example to set the default language to Spanish you would add <tt class="docutils literal"><span class="pre">lang</span> <span class="pre">=</span> <span class="pre">es</span></tt> to
-your <tt class="docutils literal"><span class="pre">development.ini</span></tt>. The relevant part from the file might look something
-like this:</p>
-<textarea name="code" class="pasteini">
-[app:main]
-use = egg:translate_demo
-lang = es
-</textarea><p>If you are running the server with the <tt class="docutils literal"><span class="pre">--reload</span></tt> option the server will
-automatically restart if you change the <tt class="docutils literal"><span class="pre">development.ini</span></tt> file. Otherwise
-restart the server manually and the output would this time be as follows:</p>
-<pre class="literal-block">
-Default: °Hola!
-fr: Bonjour
-en: Hello
-es: °Hola!
-</pre>
-</div>
-<div class="section">
-<h2><a href="#id15" id="missing-translations" name="missing-translations" class="toc-backref">3.3   Missing Translations</a></h2>
-<p>If your code calls <tt class="docutils literal"><span class="pre">_()</span></tt> with a string that doesn't exist in your language
-catalogue, the string passed to <tt class="docutils literal"><span class="pre">_()</span></tt> is returned instead.</p>
-<p>Modify the last line of the hello controller to look like this:</p>
-<textarea name="code" class="python">
-resp.write("%s: %s %s<br />" % (h.get_lang(), _('Hello'), _('World!')))
-</textarea><div class="warning">
-<p class="first admonition-title">Warning</p>
-<p class="last">Of course, in real life breaking up sentences in this way is very dangerous because some
-grammars might require the order of the words to be different.</p>
-</div>
-<p>If you run the example again the output will be:</p>
-<pre class="literal-block">
-Default: °Hola!
-fr: Bonjour World!
-en: Hello World!
-es: °Hola! World!
-</pre>
-<p>This is because we never provided a translation for the string <tt class="docutils literal"><span class="pre">'World!'</span></tt> so
-the string itself is used.</p>
-</div>
-<div class="section">
-<h2><a href="#id16" id="translations-within-templates" name="translations-within-templates" class="toc-backref">3.4   Translations Within Templates</a></h2>
-<p>You can also use the <tt class="docutils literal"><span class="pre">_()</span></tt> function within templates in exactly the same way
-you do in code. For example:</p>
-<textarea name="code" class="html">
-<% _('Hello') %>
-</textarea><p>would produce the string <tt class="docutils literal"><span class="pre">'Hello'</span></tt> in the language you had set.</p>
-<p>There is one complication though. gettext's <tt class="docutils literal"><span class="pre">xgettext</span></tt> command can only extract
-strings that need translating from Python code in <tt class="docutils literal"><span class="pre">.py</span></tt> files. This means
-that if you write <tt class="docutils literal"><span class="pre">_('Hello')</span></tt> in a template such as a Myghty template,
-<tt class="docutils literal"><span class="pre">xgettext</span></tt> will not find the string <tt class="docutils literal"><span class="pre">'Hello'</span></tt> as one which needs
-translating.</p>
-<p>As long as <tt class="docutils literal"><span class="pre">xgettext</span></tt> can find a string marked for translation with one
-of the translation functions and defined in Python code in your project
-filesystem it will manage the translation when the same string is defined in a
-Myghty template and marked for translation.</p>
-<p>One solution to ensure all strings are picked up for translation is to create a
-file in <tt class="docutils literal"><span class="pre">lib</span></tt> with an appropriate filename, <tt class="docutils literal"><span class="pre">i18n.py</span></tt> for example, and then
-add a list of all the strings which appear in your templates so that your
-translation tool can then extract the strings in <tt class="docutils literal"><span class="pre">lib/i18n.py</span></tt> for
-translation and use the translated versions in your templates as well.</p>
-<p>For example if you wanted to ensure the translated string <tt class="docutils literal"><span class="pre">'Good</span> <span class="pre">Morning'</span></tt>
-was available in all templates you could create a <tt class="docutils literal"><span class="pre">lib/i18n.py</span></tt> file that
-looked something like this:</p>
-<textarea name="code" class="python">
-from base import _
-_('Good Morning')
-</textarea><p>This approach requires quite a lot of work and is rather fragile. The best
-solution if you are using a templating system such as Myghty or Cheetah which
-uses compiled Python files is to use a Makefile to ensure that every template
-is compiled to Python before running the extraction tool to make sure that
-every template is scanned.</p>
-<p>Of course, if your cache directory is in the default location or elsewhere
-within your project's filesystem, you will probably find that all templates
-have been compiled as Python files during the course of the development process.
-This means that your tool's extraction command will successfully pick up
-strings to translate from the cached files anyway.</p>
-<p>You may also find that your extraction tool is capable of extracting the
-strings correctly from the template anyway, particularly if the templating
-langauge is quite similar to Python. It is best not to rely on this though.</p>
-</div>
-<div class="section">
-<h2><a href="#id17" id="producing-a-python-egg" name="producing-a-python-egg" class="toc-backref">3.5   Producing a Python Egg</a></h2>
-<p>Finally you can produce an egg of your project which includes the translation
-files like this:</p>
-<pre class="literal-block">
-python setup.py bdist_egg
-</pre>
-<p>The <tt class="docutils literal"><span class="pre">setup.py</span></tt> automatically includes the <tt class="docutils literal"><span class="pre">.mo</span></tt> language catalogs your
-application needs so that your application can be distributed as an egg. This
-is done with the following line in your <tt class="docutils literal"><span class="pre">setup.py</span></tt> file:</p>
-<pre class="literal-block">
-package_data={'translate_demo': ['i18n/*/LC_MESSAGES/*.mo']},
-</pre>
-<p>Internationalization support is zip safe so your application can be run
-directly from the egg without the need for <tt class="docutils literal"><span class="pre">easy_install</span></tt> to extract it.</p>
-</div>
-<div class="section">
-<h2><a href="#id18" id="plural-forms" name="plural-forms" class="toc-backref">3.6   Plural Forms</a></h2>
-<p>Pylons also defines <tt class="docutils literal"><span class="pre">ungettext()</span></tt> and <tt class="docutils literal"><span class="pre">ngettext()</span></tt> functions which can be imported
-from <tt class="docutils literal"><span class="pre">pylons.i18n</span></tt>. They are designed for internationalizing plural words and can be
-used as follows:</p>
-<textarea name="code" class="python">
-from pylons.i18n import ungettext
-
-ungettext(
-    'There is %(num)d file here',
-    'There are %(num)d files here',
-    n
-) % {'num': n}
-</textarea><p>If you wish to use plural forms in your application you need to add the appropriate
-headers to the <tt class="docutils literal"><span class="pre">.po</span></tt> files for the language you are using. You can read more about
-this at <a href="http://www.gnu.org/software/gettext/manual/html_chapter/gettext_10.html#SEC150" class="reference">http://www.gnu.org/software/gettext/manual/html_chapter/gettext_10.html#SEC150</a></p>
-<p>One thing to keep in mind is that other languages don't have the same
-plural forms as English.  While English only has 2 pulral forms, singular and
-plural, Slovenian has 4!  That means that you must use gettext's
-support for pluralization if you hope to get pluralization right.
-Specifically, the following will not work:</p>
-<textarea name="code" class="python">
-# BAD!
-    if n == 1:
-        msg = _("There was no dog.")
-    else:
-        msg = _("There were no dogs.")
-</textarea></div>
-</div>
-<div class="section">
-<h1><a href="#id19" id="summary" name="summary" class="toc-backref">4   Summary</a></h1>
-<p>Hopefully you now understand the history of Unicode, how to use it in Python
-and where to apply Unicode encoding and decoding in a Pylons application. You
-should also be able to use Unicode in your web app remembering the basic rule to
-use UTF-8 to talk to the world, do the encode and decode at the edge of your
-application.</p>
-<p>You should also be able to internationalize and then localize your application
-using Pylons' support for GNU gettext.</p>
-</div>
-<div class="section">
-<h1><a href="#id20" id="further-reading" name="further-reading" class="toc-backref">5   Further Reading</a></h1>
-<p>This information is based partly on the following articles which can be
-consulted for further information.:</p>
-<p><a href="http://www.joelonsoftware.com/articles/Unicode.html" class="reference">http://www.joelonsoftware.com/articles/Unicode.html</a></p>
-<p><a href="http://www.amk.ca/python/howto/unicode" class="reference">http://www.amk.ca/python/howto/unicode</a></p>
-<p><a href="http://en.wikipedia.org/wiki/Internationalization" class="reference">http://en.wikipedia.org/wiki/Internationalization</a></p>
-<p>Please feel free to report any mistakes to the Pylons mailing list or to the
-author. Any corrections or clarifications would be gratefully received.</p>
-</div>
-
-</div>
\ No newline at end of file
diff --git a/lib/mako-0.7.2/test/templates/modtest.html b/lib/mako-0.7.2/test/templates/modtest.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/modtest.html
+++ /dev/null
@@ -1,1 +0,0 @@
-this is a test
\ No newline at end of file
diff --git a/lib/mako-0.7.2/test/templates/othersubdir/foo.html b/lib/mako-0.7.2/test/templates/othersubdir/foo.html
deleted file mode 100644
diff --git a/lib/mako-0.7.2/test/templates/read_unicode.html b/lib/mako-0.7.2/test/templates/read_unicode.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/read_unicode.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<% 
-try:
-    file_content = open(path)
-except:
-    raise "Should never execute here"
-doc_content = ''.join(file_content.readlines())
-file_content.close()
-%>
-
-${unicode(doc_content, encoding='utf-8')}
diff --git a/lib/mako-0.7.2/test/templates/read_unicode_py3k.html b/lib/mako-0.7.2/test/templates/read_unicode_py3k.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/read_unicode_py3k.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<% 
-try:
-    file_content = open(path, encoding='utf-8', errors='ignore')
-except:
-    raise "Should never execute here"
-doc_content = ''.join(file_content.readlines())
-file_content.close()
-%>
-
-${bytes(doc_content, encoding='utf-8')}
diff --git a/lib/mako-0.7.2/test/templates/runtimeerr.html b/lib/mako-0.7.2/test/templates/runtimeerr.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/runtimeerr.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<%
-    print y
-    y = 10
-%>
\ No newline at end of file
diff --git a/lib/mako-0.7.2/test/templates/runtimeerr_py3k.html b/lib/mako-0.7.2/test/templates/runtimeerr_py3k.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/runtimeerr_py3k.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<%
-    print(y)
-    y = 10
-%>
\ No newline at end of file
diff --git a/lib/mako-0.7.2/test/templates/subdir/foo/modtest.html.py b/lib/mako-0.7.2/test/templates/subdir/foo/modtest.html.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/subdir/foo/modtest.html.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from mako import runtime, filters, cache
-UNDEFINED = runtime.UNDEFINED
-__M_dict_builtin = dict
-__M_locals_builtin = locals
-_magic_number = 5
-_modified_time = 1267565427.799504
-_template_filename='/Users/classic/dev/mako/test/templates/subdir/modtest.html'
-_template_uri='/subdir/modtest.html'
-_template_cache=cache.Cache(__name__, _modified_time)
-_source_encoding=None
-_exports = []
-
-
-def render_body(context,**pageargs):
-    context.caller_stack._push_frame()
-    try:
-        __M_locals = __M_dict_builtin(pageargs=pageargs)
-        __M_writer = context.writer()
-        # SOURCE LINE 1
-        __M_writer(u'this is a test')
-        return ''
-    finally:
-        context.caller_stack._pop_frame()
-
-
diff --git a/lib/mako-0.7.2/test/templates/subdir/incl.html b/lib/mako-0.7.2/test/templates/subdir/incl.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/subdir/incl.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-    this is include 2
diff --git a/lib/mako-0.7.2/test/templates/subdir/index.html b/lib/mako-0.7.2/test/templates/subdir/index.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/subdir/index.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
-    this is sub index
-    <%include file="incl.html"/>
diff --git a/lib/mako-0.7.2/test/templates/subdir/modtest.html b/lib/mako-0.7.2/test/templates/subdir/modtest.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/subdir/modtest.html
+++ /dev/null
@@ -1,1 +0,0 @@
-this is a test
\ No newline at end of file
diff --git a/lib/mako-0.7.2/test/templates/unicode.html b/lib/mako-0.7.2/test/templates/unicode.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/unicode.html
+++ /dev/null
@@ -1,2 +0,0 @@
-## -*- coding: utf-8 -*-
-Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »
\ No newline at end of file
diff --git a/lib/mako-0.7.2/test/templates/unicode_arguments.html b/lib/mako-0.7.2/test/templates/unicode_arguments.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/unicode_arguments.html
+++ /dev/null
@@ -1,10 +0,0 @@
-# coding: utf-8
-
-<%def name="my_def(x)">
-    x is: ${x}
-</%def>
-
-${my_def(u'drôle de petite voix m’a réveillé')}
-<%self:my_def x='drôle de petite voix m’a réveillé'/>
-<%self:my_def x="${u'drôle de petite voix m’a réveillé'}"/>
-<%call expr="my_def(u'drôle de petite voix m’a réveillé')"/>
diff --git a/lib/mako-0.7.2/test/templates/unicode_arguments_py3k.html b/lib/mako-0.7.2/test/templates/unicode_arguments_py3k.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/unicode_arguments_py3k.html
+++ /dev/null
@@ -1,10 +0,0 @@
-# coding: utf-8
-
-<%def name="my_def(x)">
-    x is: ${x}
-</%def>
-
-${my_def('drôle de petite voix m’a réveillé')}
-<%self:my_def x='drôle de petite voix m’a réveillé'/>
-<%self:my_def x="${'drôle de petite voix m’a réveillé'}"/>
-<%call expr="my_def('drôle de petite voix m’a réveillé')"/>
diff --git a/lib/mako-0.7.2/test/templates/unicode_code.html b/lib/mako-0.7.2/test/templates/unicode_code.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/unicode_code.html
+++ /dev/null
@@ -1,7 +0,0 @@
-## -*- coding: utf-8 -*-
-<%
-    x = u"drôle de petite voix m’a réveillé."
-%>
-% if x==u"drôle de petite voix m’a réveillé.":
-    hi, ${x}
-% endif
diff --git a/lib/mako-0.7.2/test/templates/unicode_code_py3k.html b/lib/mako-0.7.2/test/templates/unicode_code_py3k.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/unicode_code_py3k.html
+++ /dev/null
@@ -1,7 +0,0 @@
-## -*- coding: utf-8 -*-
-<%
-    x = "drôle de petite voix m’a réveillé."
-%>
-% if x=="drôle de petite voix m’a réveillé.":
-    hi, ${x}
-% endif
diff --git a/lib/mako-0.7.2/test/templates/unicode_expr.html b/lib/mako-0.7.2/test/templates/unicode_expr.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/unicode_expr.html
+++ /dev/null
@@ -1,2 +0,0 @@
-## -*- coding: utf-8 -*-
-${u"Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"}
diff --git a/lib/mako-0.7.2/test/templates/unicode_expr_py3k.html b/lib/mako-0.7.2/test/templates/unicode_expr_py3k.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/unicode_expr_py3k.html
+++ /dev/null
@@ -1,2 +0,0 @@
-## -*- coding: utf-8 -*-
-${"Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"}
diff --git a/lib/mako-0.7.2/test/templates/unicode_runtime_error.html b/lib/mako-0.7.2/test/templates/unicode_runtime_error.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/unicode_runtime_error.html
+++ /dev/null
@@ -1,2 +0,0 @@
-## -*- coding: utf-8 -*-
-<% print 'Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »' + int(5/0) %>
\ No newline at end of file
diff --git a/lib/mako-0.7.2/test/templates/unicode_syntax_error.html b/lib/mako-0.7.2/test/templates/unicode_syntax_error.html
deleted file mode 100644
--- a/lib/mako-0.7.2/test/templates/unicode_syntax_error.html
+++ /dev/null
@@ -1,2 +0,0 @@
-## -*- coding: utf-8 -*-
-<% print 'Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! » %>
\ No newline at end of file
diff --git a/lib/mako-0.7.2/test/test_ast.py b/lib/mako-0.7.2/test/test_ast.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_ast.py
+++ /dev/null
@@ -1,322 +0,0 @@
-import unittest
-
-from mako import ast, exceptions, pyparser, util
-from test import eq_
-
-exception_kwargs = {
-    'source': '',
-    'lineno': 0,
-    'pos': 0,
-    'filename': ''}
-
-class AstParseTest(unittest.TestCase):
-
-    def test_locate_identifiers(self):
-        """test the location of identifiers in a python code string"""
-        code = """
-a = 10
-b = 5
-c = x * 5 + a + b + q
-(g,h,i) = (1,2,3)
-[u,k,j] = [4,5,6]
-foo.hoho.lala.bar = 7 + gah.blah + u + blah
-for lar in (1,2,3):
-    gh = 5
-    x = 12
-("hello world, ", a, b)
-("Another expr", c)
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(
-            parsed.declared_identifiers,
-            set(['a', 'b', 'c', 'g', 'h', 'i', 'u',
-                'k', 'j', 'gh', 'lar', 'x'])
-        )
-        eq_(
-            parsed.undeclared_identifiers,
-            set(['x', 'q', 'foo', 'gah', 'blah'])
-        )
-
-        parsed = ast.PythonCode("x + 5 * (y-z)", **exception_kwargs)
-        assert parsed.undeclared_identifiers == set(['x', 'y', 'z'])
-        assert parsed.declared_identifiers == set()
-
-    def test_locate_identifiers_2(self):
-        code = """
-import foobar
-from lala import hoho, yaya
-import bleep as foo
-result = []
-data = get_data()
-for x in data:
-    result.append(x+7)
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(parsed.undeclared_identifiers, set(['get_data']))
-        eq_(
-            parsed.declared_identifiers,
-            set(['result', 'data', 'x', 'hoho', 'foobar', 'foo', 'yaya'])
-        )
-
-    def test_locate_identifiers_3(self):
-        """test that combination assignment/expressions
-        of the same identifier log the ident as 'undeclared'"""
-        code = """
-x = x + 5
-for y in range(1, y):
-    ("hi",)
-[z for z in range(1, z)]
-(q for q in range (1, q))
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(
-            parsed.undeclared_identifiers,
-            set(['x', 'y', 'z', 'q', 'range'])
-        )
-
-    def test_locate_identifiers_4(self):
-        code = """
-x = 5
-(y, )
-def mydef(mydefarg):
-    print("mda is", mydefarg)
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(parsed.undeclared_identifiers, set(['y']))
-        eq_(parsed.declared_identifiers, set(['mydef', 'x']))
-
-    def test_locate_identifiers_5(self):
-        code = """
-try:
-    print(x)
-except:
-    print(y)
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(parsed.undeclared_identifiers, set(['x', 'y']))
-
-    def test_locate_identifiers_6(self):
-        code = """
-def foo():
-    return bar()
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(parsed.undeclared_identifiers, set(['bar']))
-
-        code = """
-def lala(x, y):
-    return x, y, z
-print(x)
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(parsed.undeclared_identifiers, set(['z', 'x']))
-        eq_(parsed.declared_identifiers, set(['lala']))
-
-        code = """
-def lala(x, y):
-    def hoho():
-        def bar():
-            z = 7
-print(z)
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(parsed.undeclared_identifiers, set(['z']))
-        eq_(parsed.declared_identifiers, set(['lala']))
-
-    def test_locate_identifiers_7(self):
-        code = """
-import foo.bar
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(parsed.declared_identifiers, set(['foo']))
-        eq_(parsed.undeclared_identifiers, set())
-
-    def test_locate_identifiers_8(self):
-        code = """
-class Hi(object):
-    foo = 7
-    def hoho(self):
-        x = 5
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(parsed.declared_identifiers, set(['Hi']))
-        eq_(parsed.undeclared_identifiers, set())
-
-    def test_locate_identifiers_9(self):
-        code = """
-    ",".join([t for t in ("a", "b", "c")])
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(parsed.declared_identifiers, set(['t']))
-        eq_(parsed.undeclared_identifiers, set(['t']))
-
-        code = """
-    [(val, name) for val, name in x]
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(parsed.declared_identifiers, set(['val', 'name']))
-        eq_(parsed.undeclared_identifiers, set(['val', 'name', 'x']))
-
-    def test_locate_identifiers_10(self):
-        code = """
-lambda q: q + 5
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(parsed.declared_identifiers, set())
-        eq_(parsed.undeclared_identifiers, set())
-
-    def test_locate_identifiers_11(self):
-        code = """
-def x(q):
-    return q + 5
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(parsed.declared_identifiers, set(['x']))
-        eq_(parsed.undeclared_identifiers, set())
-
-
-    def test_locate_identifiers_12(self):
-        code = """
-def foo():
-    s = 1
-    def bar():
-        t = s
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(parsed.declared_identifiers, set(['foo']))
-        eq_(parsed.undeclared_identifiers, set())
-
-    def test_locate_identifiers_13(self):
-        code = """
-def foo():
-    class Bat(object):
-        pass
-    Bat
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(parsed.declared_identifiers, set(['foo']))
-        eq_(parsed.undeclared_identifiers, set())
-
-    def test_locate_identifiers_14(self):
-        code = """
-def foo():
-    class Bat(object):
-        pass
-    Bat
-
-print(Bat)
-"""
-        parsed = ast.PythonCode(code, **exception_kwargs)
-        eq_(parsed.declared_identifiers, set(['foo']))
-        eq_(parsed.undeclared_identifiers, set(['Bat']))
-
-    def test_no_global_imports(self):
-        code = """
-from foo import *
-import x as bar
-"""
-        self.assertRaises(exceptions.CompileException,
-            ast.PythonCode, code, **exception_kwargs)
-
-    def test_python_fragment(self):
-        parsed = ast.PythonFragment("for x in foo:", **exception_kwargs)
-        eq_(parsed.declared_identifiers, set(['x']))
-        eq_(parsed.undeclared_identifiers, set(['foo']))
-
-        parsed = ast.PythonFragment("try:", **exception_kwargs)
-
-        if util.py3k:
-            parsed = ast.PythonFragment(
-                        "except MyException as e:", **exception_kwargs)
-        else:
-            parsed = ast.PythonFragment(
-                        "except MyException, e:", **exception_kwargs)
-        eq_(parsed.declared_identifiers, set(['e']))
-        eq_(parsed.undeclared_identifiers, set(['MyException']))
-
-    def test_argument_list(self):
-        parsed = ast.ArgumentList("3, 5, 'hi', x+5, "
-                    "context.get('lala')", **exception_kwargs)
-        eq_(parsed.undeclared_identifiers, set(['x', 'context']))
-        eq_([x for x in parsed.args],
-            ["3", "5", "'hi'", "(x + 5)", "context.get('lala')"])
-
-        parsed = ast.ArgumentList("h", **exception_kwargs)
-        eq_(parsed.args, ["h"])
-
-    def test_function_decl(self):
-        """test getting the arguments from a function"""
-        code = "def foo(a, b, c=None, d='hi', e=x, f=y+7):pass"
-        parsed = ast.FunctionDecl(code, **exception_kwargs)
-        eq_(parsed.funcname, 'foo')
-        eq_(parsed.argnames,
-            ['a', 'b', 'c', 'd', 'e', 'f'])
-
-    def test_function_decl_2(self):
-        """test getting the arguments from a function"""
-        code = "def foo(a, b, c=None, *args, **kwargs):pass"
-        parsed = ast.FunctionDecl(code, **exception_kwargs)
-        eq_(parsed.funcname, 'foo')
-        eq_(parsed.argnames,
-            ['a', 'b', 'c', 'args', 'kwargs'])
-
-    def test_expr_generate(self):
-        """test the round trip of expressions to AST back to python source"""
-        x = 1
-        y = 2
-
-        class F(object):
-            def bar(self, a,b):
-                return a + b
-
-        def lala(arg):
-            return "blah" + arg
-
-        local_dict = dict(x=x, y=y, foo=F(), lala=lala)
-
-        code = "str((x+7*y) / foo.bar(5,6)) + lala('ho')"
-        astnode = pyparser.parse(code)
-        newcode = pyparser.ExpressionGenerator(astnode).value()
-        eq_(eval(code, local_dict), eval(newcode, local_dict))
-
-        a = ["one", "two", "three"]
-        hoho = {'somevalue': "asdf"}
-        g = [1, 2, 3, 4, 5]
-        local_dict = dict(a=a, hoho=hoho, g=g)
-        code = "a[2] + hoho['somevalue'] + "\
-                "repr(g[3:5]) + repr(g[3:]) + repr(g[:5])"
-        astnode = pyparser.parse(code)
-        newcode = pyparser.ExpressionGenerator(astnode).value()
-        eq_(eval(code, local_dict), eval(newcode, local_dict))
-
-        local_dict = {'f': lambda: 9, 'x': 7}
-        code = "x+f()"
-        astnode = pyparser.parse(code)
-        newcode = pyparser.ExpressionGenerator(astnode).value()
-        eq_(eval(code, local_dict), eval(newcode, local_dict))
-
-        for code in ["repr({'x':7,'y':18})",
-                        "repr([])",
-                        "repr({})",
-                        "repr([{3:[]}])",
-                        "repr({'x':37*2 + len([6,7,8])})",
-                        "repr([1, 2, {}, {'x':'7'}])",
-                        "repr({'x':-1})", "repr(((1,2,3), (4,5,6)))",
-                        "repr(1 and 2 and 3 and 4)",
-                        "repr(True and False or 55)",
-                        "repr(1 & 2 | 3)",
-                        "repr(3//5)",
-                        "repr(3^5)",
-                        "repr([q.endswith('e') for q in "
-                            "['one', 'two', 'three']])",
-                        "repr([x for x in (5,6,7) if x == 6])",
-                        "repr(not False)"]:
-            local_dict = {}
-            astnode = pyparser.parse(code)
-            newcode = pyparser.ExpressionGenerator(astnode).value()
-            eq_(eval(code, local_dict),
-                eval(newcode, local_dict)
-            )
-
-
-
diff --git a/lib/mako-0.7.2/test/test_babelplugin.py b/lib/mako-0.7.2/test/test_babelplugin.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_babelplugin.py
+++ /dev/null
@@ -1,44 +0,0 @@
-
-from test import TemplateTest, template_base, skip_if
-
-try:
-    import babel
-    from mako.ext.babelplugin import extract
-except:
-    babel = None
- 
-import os
-
-
-class ExtractMakoTestCase(TemplateTest):
-    @skip_if(lambda: not babel, 'babel not installed: skipping babelplugin test')
- 
-    def test_extract(self):
-        mako_tmpl = open(os.path.join(template_base, 'gettext.mako'))
-        messages = list(extract(mako_tmpl, {'_': None, 'gettext': None,
-                                            'ungettext': (1, 2)},
-                                ['TRANSLATOR:'], {}))
-        expected = \
-            [(1, '_', u'Page arg 1', []),
-             (1, '_', u'Page arg 2', []),
-             (10, 'gettext', u'Begin', []),
-             (14, '_', u'Hi there!', [u'TRANSLATOR: Hi there!']),
-             (19, '_', u'Hello', []),
-             (22, '_', u'Welcome', []),
-             (25, '_', u'Yo', []),
-             (36, '_', u'The', [u'TRANSLATOR: Ensure so and', u'so, thanks']),
-             (36, 'ungettext', (u'bunny', u'bunnies', None), []),
-             (41, '_', u'Goodbye', [u'TRANSLATOR: Good bye']),
-             (44, '_', u'Babel', []),
-             (45, 'ungettext', (u'hella', u'hellas', None), []),
-            (62, '_', u'The', [u'TRANSLATOR: Ensure so and', u'so, thanks']),
-            (62, 'ungettext', (u'bunny', u'bunnies', None), []),
-            (68, '_', u'Goodbye, really!', [u'TRANSLATOR: HTML comment']),
-            (71, '_', u'P.S. byebye', []),
-            (77, '_', u'Top', []),
-            (83, '_', u'foo', []),
-            (83, '_', u'baz', []),
-            (85, '_', u'bar', [])
-             ]
-        self.assertEqual(expected, messages)
-
diff --git a/lib/mako-0.7.2/test/test_block.py b/lib/mako-0.7.2/test/test_block.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_block.py
+++ /dev/null
@@ -1,569 +0,0 @@
-from mako.template import Template
-from mako.lookup import TemplateLookup
-from mako import exceptions
-from test import TemplateTest, assert_raises, assert_raises_message
-from util import flatten_result, result_lines
-
-
-
-class BlockTest(TemplateTest):
-    def test_anonymous_block_namespace_raises(self):
-        assert_raises_message(
-            exceptions.CompileException,
-            "Can't put anonymous blocks inside <%namespace>",
-            Template, """
-                <%namespace name="foo">
-                    <%block>
-                        block
-                    </%block>
-                </%namespace>
-            """
-        )
-
-    def test_anonymous_block_in_call(self):
-        template = Template("""
-        
-            <%self:foo x="5">
-                <%block>
-                    this is the block x
-                </%block>
-            </%self:foo>
-            
-            <%def name="foo(x)">
-                foo:
-                ${caller.body()}
-            </%def>
-        """)
-        self._do_test(
-            template,
-            ["foo:", "this is the block x"],
-            filters=result_lines
-        )
-
-    def test_named_block_in_call(self):
-        assert_raises_message(
-            exceptions.CompileException,
-            "Named block 'y' not allowed inside of <%call> tag",
-            Template,"""
-        
-            <%self:foo x="5">
-                <%block name="y">
-                    this is the block
-                </%block>
-            </%self:foo>
-            
-            <%def name="foo(x)">
-                foo:
-                ${caller.body()}
-                ${caller.y()}
-            </%def>
-        """)
-
-    def test_name_collision_blocks_toplevel(self):
-        assert_raises_message(
-            exceptions.CompileException,
-            "%def or %block named 'x' already exists in this template",
-            Template,
-            """
-                <%block name="x">
-                    block
-                </%block>
-                
-                foob 
-                
-                <%block name="x">
-                    block
-                </%block>
-            """
-        )
-
-    def test_name_collision_blocks_nested_block(self):
-        assert_raises_message(
-            exceptions.CompileException,
-            "%def or %block named 'x' already exists in this template",
-            Template,
-            """
-                <%block>
-                <%block name="x">
-                    block
-                </%block>
-                
-                foob 
-                
-                <%block name="x">
-                    block
-                </%block>
-                </%block>
-            """
-        )
-
-    def test_name_collision_blocks_nested_def(self):
-        assert_raises_message(
-            exceptions.CompileException,
-            "Named block 'x' not allowed inside of def 'foo'",
-            Template,
-            """
-                <%def name="foo()">
-                <%block name="x">
-                    block
-                </%block>
-                
-                foob 
-                
-                <%block name="x">
-                    block
-                </%block>
-                </%def>
-            """
-        )
-
-    def test_name_collision_block_def_toplevel(self):
-        assert_raises_message(
-            exceptions.CompileException,
-            "%def or %block named 'x' already exists in this template",
-            Template,
-            """
-                <%block name="x">
-                    block
-                </%block>
-                
-                foob 
-                
-                <%def name="x()">
-                    block
-                </%def>
-            """
-        )
-
-    def test_name_collision_def_block_toplevel(self):
-        assert_raises_message(
-            exceptions.CompileException,
-            "%def or %block named 'x' already exists in this template",
-            Template,
-            """
-                <%def name="x()">
-                    block
-                </%def>
-
-                foob 
-                
-                <%block name="x">
-                    block
-                </%block>
-                
-            """
-        )
-
-    def test_named_block_renders(self):
-        template = Template("""
-            above
-            <%block name="header">
-                the header
-            </%block>
-            below
-        """)
-        self._do_test(template, ["above", "the header", "below"], 
-                filters=result_lines)
-
-    def test_inherited_block_no_render(self):
-        l = TemplateLookup()
-        l.put_string("index",
-            """
-                <%inherit file="base"/>
-                <%block name="header">
-                    index header
-                </%block>
-            """
-        )
-        l.put_string("base","""
-            above
-            <%block name="header">
-                the header
-            </%block>
-            
-            ${next.body()}
-            below
-        """)
-        self._do_test(l.get_template("index"), 
-                ["above", "index header", "below"], 
-                filters=result_lines)
-
-    def test_no_named_in_def(self):
-        assert_raises_message(
-            exceptions.CompileException,
-            "Named block 'y' not allowed inside of def 'q'",
-            Template,
-            """
-            <%def name="q()">
-                <%block name="y">
-                </%block>
-            </%def>
-        """)
-
-    def test_inherited_block_nested_both(self):
-        l = TemplateLookup()
-        l.put_string("index",
-            """
-                <%inherit file="base"/>
-                <%block name="title">
-                    index title
-                </%block>
-                
-                <%block name="header">
-                    index header
-                    ${parent.header()}
-                </%block>
-            """
-        )
-        l.put_string("base","""
-            above
-            <%block name="header">
-                base header
-                <%block name="title">
-                    the title
-                </%block>
-            </%block>
-            
-            ${next.body()}
-            below
-        """)
-        self._do_test(l.get_template("index"), 
-                ["above", "index header", "base header", "index title", "below"], 
-                filters=result_lines)
-
-    def test_inherited_block_nested_inner_only(self):
-        l = TemplateLookup()
-        l.put_string("index",
-            """
-                <%inherit file="base"/>
-                <%block name="title">
-                    index title
-                </%block>
-                
-            """
-        )
-        l.put_string("base","""
-            above
-            <%block name="header">
-                base header
-                <%block name="title">
-                    the title
-                </%block>
-            </%block>
-            
-            ${next.body()}
-            below
-        """)
-        self._do_test(l.get_template("index"), 
-                ["above", "base header", "index title", "below"], 
-                filters=result_lines)
-
-    def test_noninherited_block_no_render(self):
-        l = TemplateLookup()
-        l.put_string("index",
-            """
-                <%inherit file="base"/>
-                <%block name="some_thing">
-                    some thing
-                </%block>
-            """
-        )
-        l.put_string("base","""
-            above
-            <%block name="header">
-                the header
-            </%block>
-            
-            ${next.body()}
-            below
-        """)
-        self._do_test(l.get_template("index"), 
-                ["above", "the header", "some thing", "below"], 
-                filters=result_lines)
-
-    def test_no_conflict_nested_one(self):
-        l = TemplateLookup()
-        l.put_string("index",
-            """
-                <%inherit file="base"/>
-                <%block>
-                    <%block name="header">
-                        inner header
-                    </%block>
-                </%block>
-            """
-        )
-        l.put_string("base","""
-            above
-            <%block name="header">
-                the header
-            </%block>
-            
-            ${next.body()}
-            below
-        """)
-        self._do_test(l.get_template("index"), 
-                ["above", "inner header", "below"], 
-                filters=result_lines)
-
-    def test_nested_dupe_names_raise(self):
-        assert_raises_message(
-            exceptions.CompileException,
-            "%def or %block named 'header' already exists in this template.",
-            Template,
-            """
-                <%inherit file="base"/>
-                <%block name="header">
-                    <%block name="header">
-                        inner header
-                    </%block>
-                </%block>
-            """
-        )
-
-    def test_two_levels_one(self):
-        l = TemplateLookup()
-        l.put_string("index",
-            """
-                <%inherit file="middle"/>
-                <%block name="header">
-                    index header
-                </%block>
-                <%block>
-                    index anon
-                </%block>
-            """
-        )
-        l.put_string("middle", """
-            <%inherit file="base"/>
-            <%block>
-                middle anon
-            </%block>
-            ${next.body()}
-        """)
-        l.put_string("base","""
-            above
-            <%block name="header">
-                the header
-            </%block>
-            
-            ${next.body()}
-            below
-        """)
-        self._do_test(l.get_template("index"), 
-                ["above", "index header", "middle anon", 
-                "index anon", "below"], 
-                filters=result_lines)
-
-    def test_filter(self):
-        template = Template("""
-            <%block filter="h">
-                <html>
-            </%block>
-        """)
-        self._do_test(template, [u'<html>'], 
-                    filters=result_lines)
-
-    def test_anon_in_named(self):
-        template = Template("""
-            <%block name="x">
-                outer above
-                <%block>
-                    inner
-                </%block>
-                outer below
-            </%block>
-        """)
-        self._test_block_in_block(template)
-
-    def test_named_in_anon(self):
-        template = Template("""
-            <%block>
-                outer above
-                <%block name="x">
-                    inner
-                </%block>
-                outer below
-            </%block>
-        """)
-        self._test_block_in_block(template)
-
-    def test_anon_in_anon(self):
-        template = Template("""
-            <%block>
-                outer above
-                <%block>
-                    inner
-                </%block>
-                outer below
-            </%block>
-        """)
-        self._test_block_in_block(template)
-
-    def test_named_in_named(self):
-        template = Template("""
-            <%block name="x">
-                outer above
-                <%block name="y">
-                    inner
-                </%block>
-                outer below
-            </%block>
-        """)
-        self._test_block_in_block(template)
-
-    def _test_block_in_block(self, template):
-        self._do_test(template, 
-            ["outer above", "inner", "outer below"],
-            filters=result_lines
-        )
-
-    def test_iteration(self):
-        t = Template("""
-            % for i in (1, 2, 3):
-                <%block>${i}</%block>
-            % endfor
-        """)
-        self._do_test(t, 
-            ["1", "2", "3"],
-            filters=result_lines
-        )
-
-    def test_conditional(self):
-        t = Template("""
-            % if True:
-                <%block>true</%block>
-            % endif
-
-            % if False:
-                <%block>false</%block>
-            % endif
-        """)
-        self._do_test(t, 
-            ["true"],
-            filters=result_lines
-        )
-
-    def test_block_overridden_by_def(self):
-        l = TemplateLookup()
-        l.put_string("index",
-            """
-                <%inherit file="base"/>
-                <%def name="header()">
-                    inner header
-                </%def>
-            """
-        )
-        l.put_string("base","""
-            above
-            <%block name="header">
-                the header
-            </%block>
-            
-            ${next.body()}
-            below
-        """)
-        self._do_test(l.get_template("index"), 
-                ["above", "inner header", "below"], 
-                filters=result_lines)
-
-    def test_def_overridden_by_block(self):
-        l = TemplateLookup()
-        l.put_string("index",
-            """
-                <%inherit file="base"/>
-                <%block name="header">
-                    inner header
-                </%block>
-            """
-        )
-        l.put_string("base","""
-            above
-            ${self.header()}
-            <%def name="header()">
-                the header
-            </%def>
-            
-            ${next.body()}
-            below
-        """)
-        self._do_test(l.get_template("index"), 
-                ["above", "inner header", "below"], 
-                filters=result_lines)
-
-    def test_block_args(self):
-        l = TemplateLookup()
-        l.put_string("caller", """
-        
-            <%include file="callee" args="val1='3', val2='4'"/>
-            
-        """)
-        l.put_string("callee", """
-            <%page args="val1, val2"/>
-            <%block name="foob" args="val1, val2">
-                foob, ${val1}, ${val2}
-            </%block>
-        """)
-        self._do_test(
-            l.get_template("caller"),
-            [u'foob, 3, 4'],
-            filters=result_lines
-        )
-
-    def test_block_variables_contextual(self):
-        t = Template("""            
-            <%block name="foob" >
-                foob, ${val1}, ${val2}
-            </%block>
-        """)
-        self._do_test(
-            t,
-            [u'foob, 3, 4'],
-            template_args={'val1':3, 'val2':4},
-            filters=result_lines
-        )
-
-    def test_block_args_contextual(self):
-        t = Template("""            
-            <%page args="val1"/>
-            <%block name="foob" args="val1">
-                foob, ${val1}, ${val2}
-            </%block>
-        """)
-        self._do_test(
-            t,
-            [u'foob, 3, 4'],
-            template_args={'val1':3, 'val2':4},
-            filters=result_lines
-        )
-
-    def test_block_pageargs_contextual(self):
-        t = Template("""            
-            <%block name="foob">
-                foob, ${pageargs['val1']}, ${pageargs['val2']}
-            </%block>
-        """)
-        self._do_test(
-            t,
-            [u'foob, 3, 4'],
-            template_args={'val1':3, 'val2':4},
-            filters=result_lines
-        )
-
-    def test_block_pageargs(self):
-        l = TemplateLookup()
-        l.put_string("caller", """
-        
-            <%include file="callee" args="val1='3', val2='4'"/>
-            
-        """)
-        l.put_string("callee", """
-            <%block name="foob">
-                foob, ${pageargs['val1']}, ${pageargs['val2']}
-            </%block>
-        """)
-        self._do_test(
-            l.get_template("caller"),
-            [u'foob, 3, 4'],
-            filters=result_lines
-        )
\ No newline at end of file
diff --git a/lib/mako-0.7.2/test/test_cache.py b/lib/mako-0.7.2/test/test_cache.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_cache.py
+++ /dev/null
@@ -1,557 +0,0 @@
-from mako.template import Template
-from mako.lookup import TemplateLookup
-from mako import lookup
-import shutil, unittest, os, time
-from util import result_lines
-from test import TemplateTest, template_base, module_base
-from test import eq_
-
-try:
-    import beaker
-    import beaker.cache
-except:
-    from nose import SkipTest
-    raise SkipTest("Beaker is required for these tests.")
-
-from mako.cache import register_plugin, CacheImpl
-
-class MockCacheImpl(CacheImpl):
-    realcacheimpl = None
-
-    def __init__(self, cache):
-        self.cache = cache
-        use_beaker = self.cache.\
-                    template.cache_args.\
-                    get('use_beaker', True)
-        if use_beaker:
-            self.realcacheimpl = cache._load_impl("beaker")
-
-    def get_or_create(self, key, creation_function, **kw):
-        self.key = key
-        self.kwargs = kw.copy()
-        if self.realcacheimpl:
-            return self.realcacheimpl.\
-                    get_or_create(key, creation_function, **kw)
-        else:
-            return creation_function()
-
-    def put(self, key, value, **kw):
-        self.key = key
-        self.kwargs = kw.copy()
-        if self.realcacheimpl:
-            self.realcacheimpl.put(key, value, **kw)
-
-    def get(self, key, **kw):
-        self.key = key
-        self.kwargs = kw.copy()
-        if self.realcacheimpl:
-            return self.realcacheimpl.get(key, **kw)
-
-    def invalidate(self, key, **kw):
-        self.key = key
-        self.kwargs = kw.copy()
-        if self.realcacheimpl:
-            self.realcacheimpl.invalidate(key, **kw)
-
-
-register_plugin("mock", __name__, "MockCacheImpl")
-
-class BeakerCacheTest(TemplateTest):
-    def _regions(self):
-        return beaker.cache.CacheManager(
-            cache_regions = {
-                'short':{
-                    'expire':1,
-                    'type':'memory'
-                },
-                'long':{
-                    'expire':60,
-                    'type':'memory'
-                }
-            }
-        )
-
-    def test_region(self):
-        t = Template("""
-            <%block name="foo" cached="True" cache_region="short">
-                short term ${x}
-            </%block>
-            <%block name="bar" cached="True" cache_region="long">
-                long term ${x}
-            </%block>
-            <%block name="lala">
-                none ${x}
-            </%block>
-        """, cache_args={"manager":self._regions()})
-
-        r1 = result_lines(t.render(x=5))
-        time.sleep(2)
-        r2 = result_lines(t.render(x=6))
-        r3 = result_lines(t.render(x=7))
-        eq_(r1, ["short term 5", "long term 5", "none 5"])
-        eq_(r2, ["short term 6", "long term 5", "none 6"])
-        eq_(r3, ["short term 6", "long term 5", "none 7"])
-
-class CacheTest(TemplateTest):
-    def _install_mock_cache(self, template):
-        template.cache_impl = 'mock'
-        return template.cache.impl
-
-    def test_def(self):
-        t = Template("""
-        <%!
-            callcount = [0]
-        %>
-        <%def name="foo()" cached="True">
-            this is foo
-            <%
-            callcount[0] += 1
-            %>
-        </%def>
-
-        ${foo()}
-        ${foo()}
-        ${foo()}
-        callcount: ${callcount}
-""")
-        m = self._install_mock_cache(t)
-        assert result_lines(t.render()) == [
-            'this is foo',
-            'this is foo',
-            'this is foo',
-            'callcount: [1]',
-        ]
-        assert m.kwargs == {}
-
-    def test_cache_enable(self):
-        t = Template("""
-            <%!
-                callcount = [0]
-            %>
-            <%def name="foo()" cached="True">
-                <% callcount[0] += 1 %>
-            </%def>
-            ${foo()}
-            ${foo()}
-            callcount: ${callcount}
-        """, cache_enabled=False)
-        m = self._install_mock_cache(t)
-
-        eq_(t.render().strip(), "callcount: [2]")
-
-    def test_nested_def(self):
-        t = Template("""
-        <%!
-            callcount = [0]
-        %>
-        <%def name="foo()">
-            <%def name="bar()" cached="True">
-                this is foo
-                <%
-                callcount[0] += 1
-                %>
-            </%def>
-            ${bar()}
-        </%def>
-
-        ${foo()}
-        ${foo()}
-        ${foo()}
-        callcount: ${callcount}
-""")
-        m = self._install_mock_cache(t)
-        assert result_lines(t.render()) == [
-            'this is foo',
-            'this is foo',
-            'this is foo',
-            'callcount: [1]',
-        ]
-        assert m.kwargs == {}
-
-    def test_page(self):
-        t = Template("""
-        <%!
-            callcount = [0]
-        %>
-        <%page cached="True"/>
-        this is foo
-        <%
-        callcount[0] += 1
-        %>
-        callcount: ${callcount}
-""")
-        m = self._install_mock_cache(t)
-        t.render()
-        t.render()
-        assert result_lines(t.render()) == [
-            "this is foo",
-            "callcount: [1]"
-        ]
-        assert m.kwargs == {}
-
-    def test_dynamic_key_with_context(self):
-        t = Template("""
-            <%block name="foo" cached="True" cache_key="${mykey}">
-                some block
-            </%block>
-        """)
-        m = self._install_mock_cache(t)
-        t.render(mykey="thekey")
-        t.render(mykey="thekey")
-        eq_(
-            result_lines(t.render(mykey="thekey")),
-            ["some block"]
-        )
-        eq_(m.key, "thekey")
-
-        t = Template("""
-            <%def name="foo()" cached="True" cache_key="${mykey}">
-                some def
-            </%def>
-            ${foo()}
-        """)
-        m = self._install_mock_cache(t)
-        t.render(mykey="thekey")
-        t.render(mykey="thekey")
-        eq_(
-            result_lines(t.render(mykey="thekey")),
-            ["some def"]
-        )
-        eq_(m.key, "thekey")
-
-
-    def test_dynamic_key_with_funcargs(self):
-        t = Template("""
-            <%def name="foo(num=5)" cached="True" cache_key="foo_${str(num)}">
-             hi
-            </%def>
-
-            ${foo()}
-        """)
-        m = self._install_mock_cache(t)
-        t.render()
-        t.render()
-        assert result_lines(t.render()) == ['hi']
-        assert m.key == "foo_5"
-
-        t = Template("""
-            <%def name="foo(*args, **kwargs)" cached="True" cache_key="foo_${kwargs['bar']}">
-             hi
-            </%def>
-
-            ${foo(1, 2, bar='lala')}
-        """)
-        m = self._install_mock_cache(t)
-        t.render()
-        assert result_lines(t.render()) == ['hi']
-        assert m.key == "foo_lala"
-
-        t = Template('''
-        <%page args="bar='hi'" cache_key="foo_${bar}" cached="True"/>
-         hi
-        ''')
-        m = self._install_mock_cache(t)
-        t.render()
-        assert result_lines(t.render()) == ['hi']
-        assert m.key == "foo_hi"
-
-
-    def test_dynamic_key_with_imports(self):
-        lookup = TemplateLookup()
-        lookup.put_string("foo.html", """
-        <%!
-            callcount = [0]
-        %>
-        <%namespace file="ns.html" import="*"/>
-        <%page cached="True" cache_key="${foo}"/>
-        this is foo
-        <%
-        callcount[0] += 1
-        %>
-        callcount: ${callcount}
-""")
-        lookup.put_string("ns.html", """""")
-        t = lookup.get_template("foo.html")
-        m = self._install_mock_cache(t)
-        t.render(foo='somekey')
-        t.render(foo='somekey')
-        assert result_lines(t.render(foo='somekey')) == [
-            "this is foo",
-            "callcount: [1]"
-        ]
-        assert m.kwargs == {}
-
-    def test_fileargs_implicit(self):
-        l = lookup.TemplateLookup(module_directory=module_base)
-        l.put_string("test","""
-                <%!
-                    callcount = [0]
-                %>
-                <%def name="foo()" cached="True" cache_type='dbm'>
-                    this is foo
-                    <%
-                    callcount[0] += 1
-                    %>
-                </%def>
-
-                ${foo()}
-                ${foo()}
-                ${foo()}
-                callcount: ${callcount}
-        """)
-
-        m = self._install_mock_cache(l.get_template('test'))
-        assert result_lines(l.get_template('test').render()) == [
-            'this is foo',
-            'this is foo',
-            'this is foo',
-            'callcount: [1]',
-        ]
-        eq_(m.kwargs, {'type':'dbm'})
-
-    def test_fileargs_deftag(self):
-        t = Template("""
-        <%%!
-            callcount = [0]
-        %%>
-        <%%def name="foo()" cached="True" cache_type='file' cache_dir='%s'>
-            this is foo
-            <%%
-            callcount[0] += 1
-            %%>
-        </%%def>
-
-        ${foo()}
-        ${foo()}
-        ${foo()}
-        callcount: ${callcount}
-""" % module_base)
-        m = self._install_mock_cache(t)
-        assert result_lines(t.render()) == [
-            'this is foo',
-            'this is foo',
-            'this is foo',
-            'callcount: [1]',
-        ]
-        assert m.kwargs == {'type':'file','dir':module_base}
-
-    def test_fileargs_pagetag(self):
-        t = Template("""
-        <%%page cache_dir='%s' cache_type='dbm'/>
-        <%%!
-            callcount = [0]
-        %%>
-        <%%def name="foo()" cached="True">
-            this is foo
-            <%%
-            callcount[0] += 1
-            %%>
-        </%%def>
-
-        ${foo()}
-        ${foo()}
-        ${foo()}
-        callcount: ${callcount}
-""" % module_base)
-        m = self._install_mock_cache(t)
-        assert result_lines(t.render()) == [
-            'this is foo',
-            'this is foo',
-            'this is foo',
-            'callcount: [1]',
-        ]
-        eq_(m.kwargs, {'dir':module_base, 'type':'dbm'})
-
-    def test_args_complete(self):
-        t = Template("""
-        <%%def name="foo()" cached="True" cache_timeout="30" cache_dir="%s" cache_type="file" cache_key='somekey'>
-            this is foo
-        </%%def>
-
-        ${foo()}
-""" % module_base)
-        m = self._install_mock_cache(t)
-        t.render()
-        eq_(m.kwargs, {'dir':module_base, 'type':'file', 'timeout':30})
-
-        t2 = Template("""
-        <%%page cached="True" cache_timeout="30" cache_dir="%s" cache_type="file" cache_key='somekey'/>
-        hi
-        """ % module_base)
-        m = self._install_mock_cache(t2)
-        t2.render()
-        eq_(m.kwargs, {'dir':module_base, 'type':'file', 'timeout':30})
-
-    def test_fileargs_lookup(self):
-        l = lookup.TemplateLookup(cache_dir=module_base, cache_type='file')
-        l.put_string("test","""
-                <%!
-                    callcount = [0]
-                %>
-                <%def name="foo()" cached="True">
-                    this is foo
-                    <%
-                    callcount[0] += 1
-                    %>
-                </%def>
-
-                ${foo()}
-                ${foo()}
-                ${foo()}
-                callcount: ${callcount}
-        """)
-
-        t = l.get_template('test')
-        m = self._install_mock_cache(t)
-        assert result_lines(l.get_template('test').render()) == [
-            'this is foo',
-            'this is foo',
-            'this is foo',
-            'callcount: [1]',
-        ]
-        eq_(m.kwargs, {'dir':module_base, 'type':'file'})
-
-    def test_buffered(self):
-        t = Template("""
-        <%!
-            def a(text):
-                return "this is a " + text.strip()
-        %>
-        ${foo()}
-        ${foo()}
-        <%def name="foo()" cached="True" buffered="True">
-            this is a test
-        </%def>
-        """, buffer_filters=["a"])
-        assert result_lines(t.render()) == ["this is a this is a test", "this is a this is a test"]
-
-    def test_load_from_expired(self):
-        """test that the cache callable can be called safely after the
-        originating template has completed rendering.
-
-        """
-        t = Template("""
-        ${foo()}
-        <%def name="foo()" cached="True" cache_timeout="2">
-            foo
-        </%def>
-        """)
-
-        x1 = t.render()
-        time.sleep(3)
-        x2 = t.render()
-        assert x1.strip() == x2.strip() == "foo"
-
-    def test_cache_uses_current_context(self):
-        t = Template("""
-        ${foo()}
-        <%def name="foo()" cached="True" cache_timeout="2">
-            foo: ${x}
-        </%def>
-        """)
-
-        x1 = t.render(x=1)
-        time.sleep(3)
-        x2 = t.render(x=2)
-        eq_(x1.strip(), "foo: 1")
-        eq_(x2.strip(), "foo: 2")
-
-    def test_namespace_access(self):
-        t = Template("""
-            <%def name="foo(x)" cached="True">
-                foo: ${x}
-            </%def>
-
-            <%
-                foo(1)
-                foo(2)
-                local.cache.invalidate_def('foo')
-                foo(3)
-                foo(4)
-            %>
-        """)
-        assert result_lines(t.render()) == ['foo: 1', 'foo: 1', 'foo: 3', 'foo: 3']
-
-    def test_lookup(self):
-        l = TemplateLookup(cache_impl='mock')
-        l.put_string("x", """
-            <%page cached="True" />
-            ${y}
-        """)
-        t = l.get_template("x")
-        assert result_lines(t.render(y=5)) == ["5"]
-        assert result_lines(t.render(y=7)) == ["5"]
-        assert isinstance(t.cache.impl, MockCacheImpl)
-
-    def test_invalidate(self):
-        t = Template("""
-            <%%def name="foo()" cached="True">
-                foo: ${x}
-            </%%def>
-
-            <%%def name="bar()" cached="True" cache_type='dbm' cache_dir='%s'>
-                bar: ${x}
-            </%%def>
-            ${foo()} ${bar()}
-        """ % module_base)
-        assert result_lines(t.render(x=1)) == ["foo: 1", "bar: 1"]
-        assert result_lines(t.render(x=2)) == ["foo: 1", "bar: 1"]
-        t.cache.invalidate_def('foo')
-        assert result_lines(t.render(x=3)) == ["foo: 3", "bar: 1"]
-        t.cache.invalidate_def('bar')
-        assert result_lines(t.render(x=4)) == ["foo: 3", "bar: 4"]
-
-        t = Template("""
-            <%%page cached="True" cache_type="dbm" cache_dir="%s"/>
-
-            page: ${x}
-        """ % module_base)
-        assert result_lines(t.render(x=1)) == ["page: 1"]
-        assert result_lines(t.render(x=2)) == ["page: 1"]
-        t.cache.invalidate_body()
-        assert result_lines(t.render(x=3)) == ["page: 3"]
-        assert result_lines(t.render(x=4)) == ["page: 3"]
-
-    def test_custom_args_def(self):
-        t = Template("""
-            <%def name="foo()" cached="True" cache_region="myregion"
-                    cache_timeout="50" cache_foo="foob">
-            </%def>
-            ${foo()}
-        """, cache_args={'use_beaker':False})
-        m = self._install_mock_cache(t)
-        t.render()
-        eq_(m.kwargs, {'use_beaker':False,'region':'myregion', 'timeout':50, 'foo':'foob'})
-
-    def test_custom_args_block(self):
-        t = Template("""
-            <%block name="foo" cached="True" cache_region="myregion"
-                    cache_timeout="50" cache_foo="foob">
-            </%block>
-        """, cache_args={'use_beaker':False})
-        m = self._install_mock_cache(t)
-        t.render()
-        eq_(m.kwargs, {'use_beaker':False, 'region':'myregion', 'timeout':50, 'foo':'foob'})
-
-    def test_custom_args_page(self):
-        t = Template("""
-            <%page cached="True" cache_region="myregion"
-                    cache_timeout="50" cache_foo="foob"/>
-        """, cache_args={'use_beaker':False})
-        m = self._install_mock_cache(t)
-        t.render()
-        eq_(m.kwargs, {'use_beaker':False, 'region':'myregion', 'timeout':50, 'foo':'foob'})
-
-    def test_pass_context(self):
-        t = Template("""
-            <%page cached="True"/>
-        """)
-        m = self._install_mock_cache(t)
-        t.render()
-        assert 'context' not in m.kwargs
-
-        m.pass_context = True
-        t.render(x="bar")
-        assert 'context' in m.kwargs
-        assert m.kwargs['context'].get('x') == 'bar'
-
diff --git a/lib/mako-0.7.2/test/test_call.py b/lib/mako-0.7.2/test/test_call.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_call.py
+++ /dev/null
@@ -1,515 +0,0 @@
-from mako.template import Template
-from mako import util
-from util import result_lines, flatten_result
-from test import TemplateTest, eq_
-
-class CallTest(TemplateTest):
-    def test_call(self):
-        t = Template("""
-        <%def name="foo()">
-            hi im foo ${caller.body(y=5)}
-        </%def>
- 
-        <%call expr="foo()" args="y, **kwargs">
-            this is the body, y is ${y}
-        </%call>
-""")
-        assert result_lines(t.render()) == ['hi im foo', 'this is the body, y is 5']
-
-
-    def test_compound_call(self):
-        t = Template("""
-
-        <%def name="bar()">
-            this is bar
-        </%def>
- 
-        <%def name="comp1()">
-            this comp1 should not be called
-        </%def>
- 
-        <%def name="foo()">
-            foo calling comp1: ${caller.comp1(x=5)}
-            foo calling body: ${caller.body()}
-        </%def>
- 
-        <%call expr="foo()">
-            <%def name="comp1(x)">
-                this is comp1, ${x}
-            </%def>
-            this is the body, ${comp1(6)}
-        </%call>
-        ${bar()}
-
-""")
-        assert result_lines(t.render()) == ['foo calling comp1:', 'this is comp1, 5', 'foo calling body:', 'this is the body,', 'this is comp1, 6', 'this is bar']
-
-    def test_new_syntax(self):
-        """test foo:bar syntax, including multiline args and expression eval."""
- 
-        # note the trailing whitespace in the bottom ${} expr, need to strip
-        # that off < python 2.7
- 
-        t = Template("""
-            <%def name="foo(x, y, q, z)">
-                ${x}
-                ${y}
-                ${q}
-                ${",".join("%s->%s" % (a, b) for a, b in z)}
-            </%def>
- 
-            <%self:foo x="this is x" y="${'some ' + 'y'}" q="
-                this
-                is
-                q"
- 
-                z="${[
-                (1, 2),
-                (3, 4),
-                (5, 6)
-            ]
- 
-            }"/>
-        """)
- 
-        eq_(
-            result_lines(t.render()),
-             ['this is x', 'some y', 'this', 'is', 'q', '1->2,3->4,5->6']
-        )
- 
-    def test_ccall_caller(self):
-        t = Template("""
-        <%def name="outer_func()">
-        OUTER BEGIN
-            <%call expr="caller.inner_func()">
-                INNER CALL
-            </%call>
-        OUTER END
-        </%def>
-
-        <%call expr="outer_func()">
-            <%def name="inner_func()">
-                INNER BEGIN
-                ${caller.body()}
-                INNER END
-            </%def>
-        </%call>
-
-        """)
-        #print t.code
-        assert result_lines(t.render()) == [
-            "OUTER BEGIN",
-            "INNER BEGIN",
-            "INNER CALL",
-            "INNER END",
-            "OUTER END",
-        ]
- 
-    def test_stack_pop(self):
-        t = Template("""
-        <%def name="links()" buffered="True">
-           Some links
-        </%def>
-
-        <%def name="wrapper(links)">
-           <h1>${caller.body()}</h1>
-           ${links}
-        </%def>
-
-        ## links() pushes a stack frame on.  when complete,
-        ## 'nextcaller' must be restored
-        <%call expr="wrapper(links())">
-           Some title
-        </%call>
-
-        """)
-
-        assert result_lines(t.render()) == [
-        "<h1>",
-        "Some title",
-        "</h1>",
-        "Some links"
-        ]
- 
-    def test_conditional_call(self):
-        """test that 'caller' is non-None only if the immediate <%def> was called via <%call>"""
-
-        t = Template("""
-        <%def name="a()">
-        % if caller:
-        ${ caller.body() } \\
-        % endif
-        AAA
-        ${ b() }
-        </%def>
-
-        <%def name="b()">
-        % if caller:
-        ${ caller.body() } \\
-        % endif
-        BBB
-        ${ c() }
-        </%def>
-
-        <%def name="c()">
-        % if caller:
-        ${ caller.body() } \\
-        % endif
-        CCC
-        </%def>
-
-        <%call expr="a()">
-        CALL
-        </%call>
-
-        """)
-        assert result_lines(t.render()) == [
-            "CALL",
-            "AAA",
-            "BBB",
-            "CCC"
-        ]
- 
-    def test_chained_call(self):
-        """test %calls that are chained through their targets"""
-        t = Template("""
-            <%def name="a()">
-                this is a. 
-                <%call expr="b()">
-                    this is a's ccall.  heres my body: ${caller.body()}
-                </%call>
-            </%def>
-            <%def name="b()">
-                this is b.  heres  my body: ${caller.body()}
-                whats in the body's caller's body ?
-                ${context.caller_stack[-2].body()}
-            </%def>
- 
-            <%call expr="a()">
-                heres the main templ call
-            </%call>
- 
-""")
-        assert result_lines(t.render()) == [
-            'this is a.',
-            'this is b. heres my body:',
-            "this is a's ccall. heres my body:",
-            'heres the main templ call',
-            "whats in the body's caller's body ?",
-            'heres the main templ call'
-        ]
-
-    def test_nested_call(self):
-        """test %calls that are nested inside each other"""
-        t = Template("""
-            <%def name="foo()">
-                ${caller.body(x=10)}
-            </%def>
-
-            x is ${x}
-            <%def name="bar()">
-                bar: ${caller.body()}
-            </%def>
-
-            <%call expr="foo()" args="x">
-                this is foo body: ${x}
-
-                <%call expr="bar()">
-                    this is bar body: ${x}
-                </%call>
-            </%call>
-""")
-        assert result_lines(t.render(x=5)) == [
-            "x is 5",
-            "this is foo body: 10",
-            "bar:",
-            "this is bar body: 10"
-        ]
- 
-    def test_nested_call_2(self):
-        t = Template("""
-            x is ${x}
-            <%def name="foo()">
-                ${caller.foosub(x=10)}
-            </%def>
-
-            <%def name="bar()">
-                bar: ${caller.barsub()}
-            </%def>
-
-            <%call expr="foo()">
-                <%def name="foosub(x)">
-                this is foo body: ${x}
- 
-                <%call expr="bar()">
-                    <%def name="barsub()">
-                    this is bar body: ${x}
-                    </%def>
-                </%call>
- 
-                </%def>
-
-            </%call>
-""")
-        assert result_lines(t.render(x=5)) == [
-            "x is 5",
-            "this is foo body: 10",
-            "bar:",
-            "this is bar body: 10"
-        ]
-
-    def test_nested_call_3(self):
-        template = Template('''\
-        <%def name="A()">
-          ${caller.body()}
-        </%def>
-
-        <%def name="B()">
-          ${caller.foo()}
-        </%def>
-
-        <%call expr="A()">
-          <%call expr="B()">
-            <%def name="foo()">
-              foo
-            </%def>
-          </%call>
-        </%call>
-
-        ''')
-        assert flatten_result(template.render()) == "foo"
- 
-    def test_nested_call_4(self):
-        base = """
-        <%def name="A()">
-        A_def
-        ${caller.body()}
-        </%def>
-
-        <%def name="B()">
-        B_def
-        ${caller.body()}
-        </%def>
-        """
-
-        template = Template(base + """
-        <%def name="C()">
-         C_def
-         <%self:B>
-           <%self:A>
-              A_body
-           </%self:A>
-            B_body
-           ${caller.body()}
-         </%self:B>
-        </%def>
-
-        <%self:C>
-        C_body
-        </%self:C>
-        """)
-
-        eq_(
-            flatten_result(template.render()),
-            "C_def B_def A_def A_body B_body C_body"
-        )
-
-        template = Template(base + """
-        <%def name="C()">
-         C_def
-         <%self:B>
-            B_body
-           ${caller.body()}
-           <%self:A>
-              A_body
-           </%self:A>
-         </%self:B>
-        </%def>
-
-        <%self:C>
-        C_body
-        </%self:C>
-        """)
-
-        eq_(
-            flatten_result(template.render()),
-            "C_def B_def B_body C_body A_def A_body"
-        )
-
-    def test_chained_call_in_nested(self):
-        t = Template("""
-            <%def name="embedded()">
-            <%def name="a()">
-                this is a. 
-                <%call expr="b()">
-                    this is a's ccall.  heres my body: ${caller.body()}
-                </%call>
-            </%def>
-            <%def name="b()">
-                this is b.  heres  my body: ${caller.body()}
-                whats in the body's caller's body ? ${context.caller_stack[-2].body()}
-            </%def>
-
-            <%call expr="a()">
-                heres the main templ call
-            </%call>
-            </%def>
-            ${embedded()}
-""")
-        #print t.code
-        #print result_lines(t.render())
-        assert result_lines(t.render()) == [
-            'this is a.',
-            'this is b. heres my body:',
-            "this is a's ccall. heres my body:",
-            'heres the main templ call',
-            "whats in the body's caller's body ?",
-            'heres the main templ call'
-        ]
- 
-    def test_call_in_nested(self):
-        t = Template("""
-            <%def name="a()">
-                this is a ${b()}
-                <%def name="b()">
-                    this is b
-                    <%call expr="c()">
-                        this is the body in b's call
-                    </%call>
-                </%def>
-                <%def name="c()">
-                    this is c: ${caller.body()}
-                </%def>
-            </%def>
-        ${a()}
-""")
-        assert result_lines(t.render()) == ['this is a', 'this is b', 'this is c:', "this is the body in b's call"]
-
-    def test_composed_def(self):
-        t = Template("""
-            <%def name="f()"><f>${caller.body()}</f></%def>
-            <%def name="g()"><g>${caller.body()}</g></%def>
-            <%def name="fg()">
-                <%self:f><%self:g>${caller.body()}</%self:g></%self:f>
-            </%def>
-            <%self:fg>fgbody</%self:fg>
-            """)
-        assert result_lines(t.render()) == ['<f><g>fgbody</g></f>']
-
-    def test_regular_defs(self):
-        t = Template("""
-        <%!
-            @runtime.supports_caller
-            def a(context):
-                context.write("this is a")
-                if context['caller']:
-                    context['caller'].body()
-                context.write("a is done")
-                return ''
-        %>
- 
-        <%def name="b()">
-            this is b
-            our body: ${caller.body()}
-            ${a(context)}
-        </%def>
-        test 1
-        <%call expr="a(context)">
-            this is the body
-        </%call>
-        test 2
-        <%call expr="b()">
-            this is the body
-        </%call>
-        test 3
-        <%call expr="b()">
-            this is the body
-            <%call expr="b()">
-                this is the nested body
-            </%call>
-        </%call>
-
-
-        """) 
-        #print t.code
-        assert result_lines(t.render()) == [
-            "test 1",
-            "this is a",
-            "this is the body",
-            "a is done",
-            "test 2",
-            "this is b",
-            "our body:",
-            "this is the body",
-            "this is aa is done",
-            "test 3",
-            "this is b",
-            "our body:",
-            "this is the body",
-            "this is b",
-            "our body:",
-            "this is the nested body",
-            "this is aa is done",
-            "this is aa is done"
-        ]
- 
-    def test_call_in_nested_2(self):
-        t = Template("""
-            <%def name="a()">
-                <%def name="d()">
-                    not this d
-                </%def>
-                this is a ${b()}
-                <%def name="b()">
-                    <%def name="d()">
-                        not this d either
-                    </%def>
-                    this is b
-                    <%call expr="c()">
-                        <%def name="d()">
-                            this is d
-                        </%def>
-                        this is the body in b's call
-                    </%call>
-                </%def>
-                <%def name="c()">
-                    this is c: ${caller.body()}
-                    the embedded "d" is: ${caller.d()}
-                </%def>
-            </%def>
-        ${a()}
-""")
-        assert result_lines(t.render()) == ['this is a', 'this is b', 'this is c:', "this is the body in b's call", 'the embedded "d" is:', 'this is d']
-
-class SelfCacheTest(TemplateTest):
-    """this test uses a now non-public API."""
- 
-    def test_basic(self):
-        t = Template("""
-        <%!
-            cached = None
-        %>
-        <%def name="foo()">
-            <% 
-                global cached
-                if cached:
-                    return "cached: " + cached
-                __M_writer = context._push_writer()
-            %>
-            this is foo
-            <%
-                buf, __M_writer = context._pop_buffer_and_writer()
-                cached = buf.getvalue()
-                return cached
-            %>
-        </%def>
- 
-        ${foo()}
-        ${foo()}
-""")
-        assert result_lines(t.render()) == [
-            "this is foo",
-            "cached:",
-            "this is foo"
-        ]
- 
diff --git a/lib/mako-0.7.2/test/test_decorators.py b/lib/mako-0.7.2/test/test_decorators.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_decorators.py
+++ /dev/null
@@ -1,110 +0,0 @@
-from mako.template import Template
-from mako import lookup
-import unittest
-from util import flatten_result, result_lines
-
-class DecoratorTest(unittest.TestCase):
-    def test_toplevel(self):
-        template = Template("""
-            <%!
-                def bar(fn):
-                    def decorate(context, *args, **kw):
-                        return "BAR" + runtime.capture(context, fn, *args, **kw) + "BAR"
-                    return decorate
-            %>
- 
-            <%def name="foo(y, x)" decorator="bar">
-                this is foo ${y} ${x}
-            </%def>
- 
-            ${foo(1, x=5)}
-        """)
-
-        assert flatten_result(template.render()) == "BAR this is foo 1 5 BAR"
-
-    def test_toplevel_contextual(self):
-        template = Template("""
-            <%!
-                def bar(fn):
-                    def decorate(context):
-                        context.write("BAR")
-                        fn()
-                        context.write("BAR")
-                        return ''
-                    return decorate
-            %>
-
-            <%def name="foo()" decorator="bar">
-                this is foo
-            </%def>
-
-            ${foo()}
-        """)
-
-        assert flatten_result(template.render()) == "BAR this is foo BAR"
-
-        assert flatten_result(template.get_def('foo').render()) == "BAR this is foo BAR"
-
-
-    def test_nested(self):
-        template = Template("""
-            <%!
-                def bat(fn):
-                    def decorate(context):
-                        return "BAT" + runtime.capture(context, fn) + "BAT"
-                    return decorate
-            %>
-
-            <%def name="foo()">
- 
-                <%def name="bar()" decorator="bat">
-                    this is bar
-                </%def>
-                ${bar()}
-            </%def>
-
-            ${foo()}
-        """)
-
-        assert flatten_result(template.render()) == "BAT this is bar BAT"
- 
-    def test_toplevel_decorated_name(self):
-        template = Template("""
-            <%!
-                def bar(fn):
-                    def decorate(context, *args, **kw):
-                        return "function " + fn.__name__ + " " + runtime.capture(context, fn, *args, **kw)
-                    return decorate
-            %>
-
-            <%def name="foo(y, x)" decorator="bar">
-                this is foo ${y} ${x}
-            </%def>
-
-            ${foo(1, x=5)}
-        """)
-
-        assert flatten_result(template.render()) == "function foo this is foo 1 5"
-
-    def test_nested_decorated_name(self):
-        template = Template("""
-            <%!
-                def bat(fn):
-                    def decorate(context):
-                        return "function " + fn.__name__ + " " + runtime.capture(context, fn)
-                    return decorate
-            %>
-
-            <%def name="foo()">
-
-                <%def name="bar()" decorator="bat">
-                    this is bar
-                </%def>
-                ${bar()}
-            </%def>
-
-            ${foo()}
-        """)
-
-        assert flatten_result(template.render()) == "function bar this is bar"
- 
diff --git a/lib/mako-0.7.2/test/test_def.py b/lib/mako-0.7.2/test/test_def.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_def.py
+++ /dev/null
@@ -1,678 +0,0 @@
-from mako.template import Template
-from mako import lookup
-from test import TemplateTest
-from util import flatten_result, result_lines
-from test import eq_, assert_raises
-
-class DefTest(TemplateTest):
-    def test_def_noargs(self):
-        template = Template("""
-
-        ${mycomp()}
-
-        <%def name="mycomp()">
-            hello mycomp ${variable}
-        </%def>
-
-        """)
-        eq_(
-            template.render(variable='hi').strip(),
-            """hello mycomp hi"""
-        )
-
-    def test_def_blankargs(self):
-        template = Template("""
-        <%def name="mycomp()">
-            hello mycomp ${variable}
-        </%def>
-
-        ${mycomp()}""")
-        eq_(
-            template.render(variable='hi').strip(),
-            "hello mycomp hi"
-        )
-
-    def test_def_args(self):
-        template = Template("""
-        <%def name="mycomp(a, b)">
-            hello mycomp ${variable}, ${a}, ${b}
-        </%def>
-
-        ${mycomp(5, 6)}""")
-        eq_(
-            template.render(variable='hi', a=5, b=6).strip(),
-            """hello mycomp hi, 5, 6"""
-        )
-
-    def test_inter_def(self):
-        """test defs calling each other"""
-        template = Template("""
-        ${b()}
-
-        <%def name="a()">\
-        im a
-        </%def>
-
-        <%def name="b()">
-        im b
-        and heres a:  ${a()}
-        </%def>
-
-        <%def name="c()">
-        im c
-        </%def>
-""")
-        # check that "a" is declared in "b", but not in "c"
-        assert "a" not in template.module.render_c.func_code.co_varnames
-        assert "a" in template.module.render_b.func_code.co_varnames
-
-        # then test output
-        eq_(
-            flatten_result(template.render()),
-            "im b and heres a: im a"
-        )
-
-    def test_toplevel(self):
-        """test calling a def from the top level"""
-
-        template = Template("""
-
-            this is the body
-
-            <%def name="a()">
-                this is a
-            </%def>
-
-            <%def name="b(x, y)">
-                this is b, ${x} ${y}
-            </%def>
-
-        """)
-
-        self._do_test(template.get_def("a"),
-                    "this is a",
-                    filters=flatten_result)
-        self._do_test(template.get_def("b"),
-                    "this is b, 10 15",
-                    template_args={'x': 10, 'y': 15},
-                    filters=flatten_result)
-        self._do_test(template.get_def("body"),
-                    "this is the body",
-                    filters=flatten_result)
-
-        # test that args outside of the dict can be used
-        self._do_test(template.get_def("a"), "this is a",
-                        filters=flatten_result,
-                        template_args={'q': 5, 'zq': 'test'})
-
-class ScopeTest(TemplateTest):
-    """test scoping rules.  The key is, enclosing
-    scope always takes precedence over contextual scope."""
-
-    def test_scope_one(self):
-        self._do_memory_test("""
-        <%def name="a()">
-            this is a, and y is ${y}
-        </%def>
-
-        ${a()}
-
-        <%
-            y = 7
-        %>
-
-        ${a()}
-
-""",
-            "this is a, and y is None this is a, and y is 7",
-            filters=flatten_result,
-            template_args={'y': None}
-        )
-
-    def test_scope_two(self):
-        t = Template("""
-        y is ${y}
-
-        <%
-            y = 7
-        %>
-
-        y is ${y}
-""")
-        try:
-            t.render(y=None)
-            assert False
-        except UnboundLocalError:
-            assert True
-
-    def test_scope_four(self):
-        """test that variables are pulled
-        from 'enclosing' scope before context."""
-        t = Template("""
-            <%
-                x = 5
-            %>
-            <%def name="a()">
-                this is a. x is ${x}.
-            </%def>
-
-            <%def name="b()">
-                <%
-                    x = 9
-                %>
-                this is b. x is ${x}.
-                calling a. ${a()}
-            </%def>
-
-            ${b()}
-""")
-        eq_(
-            flatten_result(t.render()),
-            "this is b. x is 9. calling a. this is a. x is 5."
-        )
-
-    def test_scope_five(self):
-        """test that variables are pulled from
-        'enclosing' scope before context."""
-        # same as test four, but adds a scope around it.
-        t = Template("""
-            <%def name="enclosing()">
-            <%
-                x = 5
-            %>
-            <%def name="a()">
-                this is a. x is ${x}.
-            </%def>
-
-            <%def name="b()">
-                <%
-                    x = 9
-                %>
-                this is b. x is ${x}.
-                calling a. ${a()}
-            </%def>
-
-            ${b()}
-            </%def>
-            ${enclosing()}
-""")
-        eq_(
-            flatten_result(t.render()),
-            "this is b. x is 9. calling a. this is a. x is 5."
-        )
-
-    def test_scope_six(self):
-        """test that the initial context counts
-        as 'enclosing' scope, for plain defs"""
-        t = Template("""
-
-        <%def name="a()">
-            a: x is ${x}
-        </%def>
-
-        <%def name="b()">
-            <%
-                x = 10
-            %>
-            b. x is ${x}.  ${a()}
-        </%def>
-
-        ${b()}
-    """)
-        eq_(
-            flatten_result(t.render(x=5)),
-            "b. x is 10. a: x is 5"
-        )
-
-    def test_scope_seven(self):
-        """test that the initial context counts
-        as 'enclosing' scope, for nested defs"""
-        t = Template("""
-        <%def name="enclosing()">
-            <%def name="a()">
-                a: x is ${x}
-            </%def>
-
-            <%def name="b()">
-                <%
-                    x = 10
-                %>
-                b. x is ${x}.  ${a()}
-            </%def>
-
-            ${b()}
-        </%def>
-        ${enclosing()}
-    """)
-        eq_(
-            flatten_result(t.render(x=5)),
-            "b. x is 10. a: x is 5"
-        )
-
-    def test_scope_eight(self):
-        """test that the initial context counts
-        as 'enclosing' scope, for nested defs"""
-        t = Template("""
-        <%def name="enclosing()">
-            <%def name="a()">
-                a: x is ${x}
-            </%def>
-
-            <%def name="b()">
-                <%
-                    x = 10
-                %>
-
-                b. x is ${x}.  ${a()}
-            </%def>
-
-            ${b()}
-        </%def>
-        ${enclosing()}
-    """)
-        eq_(
-            flatten_result(t.render(x=5)),
-            "b. x is 10. a: x is 5"
-        )
-
-    def test_scope_nine(self):
-        """test that 'enclosing scope' doesnt
-        get exported to other templates"""
-
-        l = lookup.TemplateLookup()
-        l.put_string('main', """
-        <%
-            x = 5
-        %>
-        this is main.  <%include file="secondary"/>
-""")
-
-        l.put_string('secondary', """
-        this is secondary.  x is ${x}
-""")
-
-        eq_(
-            flatten_result(l.get_template('main').render(x=2)),
-            "this is main. this is secondary. x is 2"
-        )
-
-    def test_scope_ten(self):
-        t = Template("""
-            <%def name="a()">
-                <%def name="b()">
-                    <%
-                        y = 19
-                    %>
-                    b/c: ${c()}
-                    b/y: ${y}
-                </%def>
-                <%def name="c()">
-                    c/y: ${y}
-                </%def>
-
-                <%
-                    # we assign to "y".  but the 'enclosing
-                    # scope' of "b" and "c" is from
-                    # the "y" on the outside
-                    y = 10
-                %>
-                a/y: ${y}
-                a/b: ${b()}
-            </%def>
-
-            <%
-                y = 7
-            %>
-            main/a: ${a()}
-            main/y: ${y}
-    """)
-        eq_(
-            flatten_result(t.render()),
-            "main/a: a/y: 10 a/b: b/c: c/y: 10 b/y: 19 main/y: 7"
-        )
-
-    def test_scope_eleven(self):
-        t = Template("""
-            x is ${x}
-            <%def name="a(x)">
-                this is a, ${b()}
-                <%def name="b()">
-                    this is b, x is ${x}
-                </%def>
-            </%def>
-
-            ${a(x=5)}
-""")
-        eq_(
-            result_lines(t.render(x=10)),
-        [
-            "x is 10",
-            "this is a,",
-            "this is b, x is 5"
-        ])
-
-    def test_unbound_scope(self):
-        t = Template("""
-            <%
-                y = 10
-            %>
-            <%def name="a()">
-                y is: ${y}
-                <%
-                    # should raise error ?
-                    y = 15
-                %>
-                y is ${y}
-            </%def>
-            ${a()}
-""")
-        assert_raises(
-            UnboundLocalError,
-            t.render
-            )
-
-    def test_unbound_scope_two(self):
-        t = Template("""
-            <%def name="enclosing()">
-            <%
-                y = 10
-            %>
-            <%def name="a()">
-                y is: ${y}
-                <%
-                    # should raise error ?
-                    y = 15
-                %>
-                y is ${y}
-            </%def>
-            ${a()}
-            </%def>
-            ${enclosing()}
-""")
-        try:
-            print t.render()
-            assert False
-        except UnboundLocalError:
-            assert True
-
-    def test_canget_kwargs(self):
-        """test that arguments passed to the body()
-        function are accessible by top-level defs"""
-        l = lookup.TemplateLookup()
-        l.put_string("base", """
-
-        ${next.body(x=12)}
-
-        """)
-
-        l.put_string("main", """
-            <%inherit file="base"/>
-            <%page args="x"/>
-            this is main.  x is ${x}
-
-            ${a()}
-
-            <%def name="a(**args)">
-                this is a, x is ${x}
-            </%def>
-        """)
-
-        # test via inheritance
-        eq_(
-            result_lines(l.get_template("main").render()),
-            [
-            "this is main. x is 12",
-            "this is a, x is 12"
-        ])
-
-        l.put_string("another", """
-            <%namespace name="ns" file="main"/>
-
-            ${ns.body(x=15)}
-        """)
-        # test via namespace
-        eq_(
-            result_lines(l.get_template("another").render()),
-        [
-            "this is main. x is 15",
-            "this is a, x is 15"
-        ])
-
-    def test_inline_expression_from_arg_one(self):
-        """test that cache_key=${foo} gets its value from
-        the 'foo' argument in the <%def> tag,
-        and strict_undefined doesn't complain.
-
-        this is #191.
-
-        """
-        t = Template("""
-        <%def name="layout(foo)" cached="True" cache_key="${foo}">
-        foo: ${foo}
-        </%def>
-
-        ${layout(3)}
-        """, strict_undefined=True,
-            cache_impl="plain")
-
-        eq_(
-            result_lines(t.render()),
-            ["foo: 3"]
-        )
-
-    def test_interpret_expression_from_arg_two(self):
-        """test that cache_key=${foo} gets its value from
-        the 'foo' argument regardless of it being passed
-        from the context.
-
-        This is here testing that there's no change
-        to existing behavior before and after #191.
-
-        """
-        t = Template("""
-        <%def name="layout(foo)" cached="True" cache_key="${foo}">
-        foo: ${value}
-        </%def>
-
-        ${layout(3)}
-        """, cache_impl="plain")
-
-        eq_(
-            result_lines(t.render(foo='foo', value=1)),
-            ["foo: 1"]
-        )
-        eq_(
-            result_lines(t.render(foo='bar', value=2)),
-            ["foo: 1"]
-        )
-
-class NestedDefTest(TemplateTest):
-    def test_nested_def(self):
-        t = Template("""
-
-        ${hi()}
-
-        <%def name="hi()">
-            hey, im hi.
-            and heres ${foo()}, ${bar()}
-
-            <%def name="foo()">
-                this is foo
-            </%def>
-
-            <%def name="bar()">
-                this is bar
-            </%def>
-        </%def>
-""")
-        eq_(
-            flatten_result(t.render()),
-            "hey, im hi. and heres this is foo , this is bar"
-        )
-
-    def test_nested_2(self):
-        t = Template("""
-            x is ${x}
-            <%def name="a()">
-                this is a, x is ${x}
-                ${b()}
-                <%def name="b()">
-                    this is b: ${x}
-                </%def>
-            </%def>
-            ${a()}
-""")
-
-        eq_(
-            flatten_result(t.render(x=10)),
-            "x is 10 this is a, x is 10 this is b: 10"
-        )
-
-    def test_nested_with_args(self):
-        t = Template("""
-        ${a()}
-        <%def name="a()">
-            <%def name="b(x, y=2)">
-                b x is ${x} y is ${y}
-            </%def>
-            a ${b(5)}
-        </%def>
-""")
-        eq_(
-            flatten_result(t.render()),
-            "a b x is 5 y is 2"
-        )
-
-    def test_nested_def_2(self):
-        template = Template("""
-        ${a()}
-        <%def name="a()">
-            <%def name="b()">
-                <%def name="c()">
-                    comp c
-                </%def>
-                ${c()}
-            </%def>
-            ${b()}
-        </%def>
-""")
-        eq_(
-            flatten_result(template.render()),
-            "comp c"
-        )
-
-    def test_nested_nested_def(self):
-        t = Template("""
-
-        ${a()}
-        <%def name="a()">
-            a
-            <%def name="b1()">
-                a_b1
-            </%def>
-            <%def name="b2()">
-                a_b2 ${c1()}
-                <%def name="c1()">
-                    a_b2_c1
-                </%def>
-            </%def>
-            <%def name="b3()">
-                a_b3 ${c1()}
-                <%def name="c1()">
-                    a_b3_c1 heres x: ${x}
-                    <%
-                        y = 7
-                    %>
-                    y is ${y}
-                </%def>
-                <%def name="c2()">
-                    a_b3_c2
-                    y is ${y}
-                    c1 is ${c1()}
-                </%def>
-                ${c2()}
-            </%def>
-
-            ${b1()} ${b2()}  ${b3()}
-        </%def>
-""")
-        eq_(
-            flatten_result(t.render(x=5, y=None)),
-            "a a_b1 a_b2 a_b2_c1 a_b3 a_b3_c1 "
-            "heres x: 5 y is 7 a_b3_c2 y is "
-            "None c1 is a_b3_c1 heres x: 5 y is 7"
-        )
-
-    def test_nested_nested_def_2(self):
-        t = Template("""
-        <%def name="a()">
-            this is a ${b()}
-            <%def name="b()">
-                this is b
-                ${c()}
-            </%def>
-
-            <%def name="c()">
-                this is c
-            </%def>
-        </%def>
-        ${a()}
-""")
-        eq_(
-            flatten_result(t.render()),
-            "this is a this is b this is c"
-        )
-
-    def test_outer_scope(self):
-        t = Template("""
-        <%def name="a()">
-            a: x is ${x}
-        </%def>
-
-        <%def name="b()">
-            <%def name="c()">
-            <%
-                x = 10
-            %>
-            c. x is ${x}.  ${a()}
-            </%def>
-
-            b. ${c()}
-        </%def>
-
-        ${b()}
-
-        x is ${x}
-""")
-        eq_(
-            flatten_result(t.render(x=5)),
-            "b. c. x is 10. a: x is 5 x is 5"
-        )
-
-class ExceptionTest(TemplateTest):
-    def test_raise(self):
-        template = Template("""
-            <%
-                raise Exception("this is a test")
-            %>
-    """, format_exceptions=False)
-        assert_raises(
-            Exception,
-            template.render
-            )
-
-    def test_handler(self):
-        def handle(context, error):
-            context.write("error message is " + str(error))
-            return True
-
-        template = Template("""
-            <%
-                raise Exception("this is a test")
-            %>
-    """, error_handler=handle)
-        eq_(
-            template.render().strip(),
-            "error message is this is a test"
-        )
-
diff --git a/lib/mako-0.7.2/test/test_exceptions.py b/lib/mako-0.7.2/test/test_exceptions.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_exceptions.py
+++ /dev/null
@@ -1,296 +0,0 @@
-# -*- coding: utf-8 -*-
-import sys
-import unittest
-
-from mako import exceptions, util
-from mako.template import Template
-from mako.lookup import TemplateLookup
-from util import result_lines
-from test import template_base, module_base, TemplateTest
-from test import requires_pygments_14, requires_no_pygments
-
-class ExceptionsTest(TemplateTest):
-    def test_html_error_template(self):
-        """test the html_error_template"""
-        code = """
-% i = 0
-"""
-        try:
-            template = Template(code)
-            template.render_unicode()
-            assert False
-        except exceptions.CompileException, ce:
-            html_error = exceptions.html_error_template().render_unicode()
-            assert ("CompileException: Fragment 'i = 0' is not "
-                    "a partial control statement at line: 2 char: 1") in html_error
-            assert '<style>' in html_error
-            html_error_stripped = html_error.strip()
-            assert html_error_stripped.startswith('<html>')
-            assert html_error_stripped.endswith('</html>')
-
-            not_full = exceptions.html_error_template().\
-                                    render_unicode(full=False)
-            assert '<html>' not in not_full
-            assert '<style>' in not_full
-
-            no_css = exceptions.html_error_template().\
-                                    render_unicode(css=False)
-            assert '<style>' not in no_css
-        else:
-            assert False, ("This function should trigger a CompileException, "
-                           "but didn't")
-
-    def test_text_error_template(self):
-        code = """
-% i = 0
-"""
-        try:
-            template = Template(code)
-            template.render_unicode()
-            assert False
-        except exceptions.CompileException, ce:
-            text_error = exceptions.text_error_template().render_unicode()
-            assert 'Traceback (most recent call last):' in text_error
-            assert ("CompileException: Fragment 'i = 0' is not a partial "
-                    "control statement") in text_error
-
-    @requires_pygments_14
-    def test_utf8_html_error_template_pygments(self):
-        """test the html_error_template with a Template containing utf8
-        chars"""
- 
-        if util.py3k:
-            code = """# -*- coding: utf-8 -*-
-% if 2 == 2: /an error
-${'привет'}
-% endif
-"""
-        else:
-            code = """# -*- coding: utf-8 -*-
-% if 2 == 2: /an error
-${u'привет'}
-% endif
-"""
-        try:
-            template = Template(code)
-            template.render_unicode()
-        except exceptions.CompileException, ce:
-            html_error = exceptions.html_error_template().render()
-            if util.py3k:
-                assert ("CompileException: Fragment 'if 2 == 2: /an "
-                    "error' is not a partial control statement "
-                    "at line: 2 char: 1").encode(sys.getdefaultencoding(), 'htmlentityreplace') in \
-                    html_error
-            else:
-                assert ("CompileException: Fragment 'if 2 == 2: /an "
-                        "error' is not a partial control statement "
-                        "at line: 2 char: 1") in \
-                        html_error
- 
-            if util.py3k:
-                assert u"".encode(sys.getdefaultencoding(),
-                                        'htmlentityreplace') in html_error
-            else:
-                assert u'<pre>3</pre></div></td><td class="code">'\
-                        '<div class="syntax-highlighted"><pre><span '\
-                        'class="cp">${</span><span class="s">u''\
-                        '&#x43F;&#x440;&#x438;&#x432;&#x435;&#x442;'\
-                        ''</span><span class="cp">}</span>'.encode(
-                                sys.getdefaultencoding(),
-                                'htmlentityreplace') in html_error
-        else:
-            assert False, ("This function should trigger a CompileException, "
-                           "but didn't")
-
-    @requires_no_pygments
-    def test_utf8_html_error_template_no_pygments(self):
-        """test the html_error_template with a Template containing utf8
-        chars"""
- 
-        if util.py3k:
-            code = """# -*- coding: utf-8 -*-
-% if 2 == 2: /an error
-${'привет'}
-% endif
-"""
-        else:
-            code = """# -*- coding: utf-8 -*-
-% if 2 == 2: /an error
-${u'привет'}
-% endif
-"""
-        try:
-            template = Template(code)
-            template.render_unicode()
-        except exceptions.CompileException, ce:
-            html_error = exceptions.html_error_template().render()
-            if util.py3k:
-                assert ("CompileException: Fragment 'if 2 == 2: /an "
-                    "error' is not a partial control statement "
-                    "at line: 2 char: 1").encode(sys.getdefaultencoding(), 'htmlentityreplace') in \
-                    html_error
-            else:
-                assert ("CompileException: Fragment 'if 2 == 2: /an "
-                        "error' is not a partial control statement "
-                        "at line: 2 char: 1") in \
-                        html_error
- 
-            if util.py3k:
-                assert u"${'привет'}".encode(sys.getdefaultencoding(),
-                                        'htmlentityreplace') in html_error
-            else:
-                assert u"${u'привет'}".encode(sys.getdefaultencoding(),
-                                        'htmlentityreplace') in html_error
-        else:
-            assert False, ("This function should trigger a CompileException, "
-                           "but didn't")
- 
-    def test_format_closures(self):
-        try:
-            exec "def foo():"\
-                 "    raise RuntimeError('test')"\
-                 in locals()
-            foo()
-        except:
-            html_error = exceptions.html_error_template().render()
-            assert "RuntimeError: test" in str(html_error)
- 
-    def test_py_utf8_html_error_template(self):
-        try:
-            foo = u'日本'
-            raise RuntimeError('test')
-        except:
-            html_error = exceptions.html_error_template().render()
-            if util.py3k:
-                assert 'RuntimeError: test' in html_error.decode('utf-8')
-                assert u"foo = '日本'" in html_error.decode('utf-8')
-            else:
-                assert 'RuntimeError: test' in html_error
-                assert "foo = u'&#x65E5;&#x672C;'" in html_error
-
-    def test_py_unicode_error_html_error_template(self):
-        try:
-            raise RuntimeError(u'日本')
-        except:
-            html_error = exceptions.html_error_template().render()
-            assert u"RuntimeError: 日本".encode('ascii', 'ignore') in html_error
-
-    @requires_pygments_14
-    def test_format_exceptions_pygments(self):
-        l = TemplateLookup(format_exceptions=True)
-
-        l.put_string("foo.html", """
-<%inherit file="base.html"/>
-${foobar}
-        """)
-
-        l.put_string("base.html", """
-        ${self.body()}
-        """)
-
-        assert '<div class="sourceline"><table class="syntax-highlightedtable">'\
-                '<tr><td class="linenos"><div class="linenodiv"><pre>3</pre>'\
-                '</div></td><td class="code"><div class="syntax-highlighted">'\
-                '<pre><span class="err">$</span><span class="p">{</span>'\
-                '<span class="n">foobar</span><span class="p">}</span>' in \
-            result_lines(l.get_template("foo.html").render_unicode())
-
-    @requires_no_pygments
-    def test_format_exceptions_no_pygments(self):
-        l = TemplateLookup(format_exceptions=True)
-
-        l.put_string("foo.html", """
-<%inherit file="base.html"/>
-${foobar}
-        """)
-
-        l.put_string("base.html", """
-        ${self.body()}
-        """)
-
-        assert '<div class="sourceline">${foobar}</div>' in \
-            result_lines(l.get_template("foo.html").render_unicode())
- 
-    @requires_pygments_14
-    def test_utf8_format_exceptions_pygments(self):
-        """test that htmlentityreplace formatting is applied to 
-           exceptions reported with format_exceptions=True"""
- 
-        l = TemplateLookup(format_exceptions=True)
-        if util.py3k:
-            l.put_string("foo.html", """# -*- coding: utf-8 -*-\n${'привет' + foobar}""")
-        else:
-            l.put_string("foo.html", """# -*- coding: utf-8 -*-\n${u'привет' + foobar}""")
-
-        if util.py3k:
-            assert '<table class="error syntax-highlightedtable"><tr><td '\
-                    'class="linenos"><div class="linenodiv"><pre>2</pre>'\
-                    '</div></td><td class="code"><div class="error '\
-                    'syntax-highlighted"><pre><span class="cp">${</span>'\
-                    '<span class="s">'привет'</span> <span class="o">+</span> '\
-                    '<span class="n">foobar</span><span class="cp">}</span>'\
-                    '<span class="x"></span>' in \
-                result_lines(l.get_template("foo.html").render().decode('utf-8'))
-        else:
-            assert '<table class="error syntax-highlightedtable"><tr><td '\
-                    'class="linenos"><div class="linenodiv"><pre>2</pre>'\
-                    '</div></td><td class="code"><div class="error '\
-                    'syntax-highlighted"><pre><span class="cp">${</span>'\
-                    '<span class="s">u'&#x43F;&#x440;&#x438;&#x432;'\
-                    '&#x435;&#x442;'</span> <span class="o">+</span> '\
-                    '<span class="n">foobar</span><span class="cp">}</span>'\
-                    '<span class="x"></span>' in \
-                result_lines(l.get_template("foo.html").render().decode('utf-8'))
-
-    @requires_no_pygments
-    def test_utf8_format_exceptions_no_pygments(self):
-        """test that htmlentityreplace formatting is applied to 
-           exceptions reported with format_exceptions=True"""
- 
-        l = TemplateLookup(format_exceptions=True)
-        if util.py3k:
-            l.put_string("foo.html", """# -*- coding: utf-8 -*-\n${'привет' + foobar}""")
-        else:
-            l.put_string("foo.html", """# -*- coding: utf-8 -*-\n${u'привет' + foobar}""")
-
-        if util.py3k:
-            assert u'<div class="sourceline">${'привет' + foobar}</div>'\
-                in result_lines(l.get_template("foo.html").render().decode('utf-8'))
-        else:
-            assert '${u'&#x43F;&#x440;&#x438;&#x432;&#x435;'\
-                   '&#x442;' + foobar}' in \
-                result_lines(l.get_template("foo.html").render().decode('utf-8'))
- 
- 
-    def test_custom_tback(self):
-        try:
-            raise RuntimeError("error 1")
-            foo('bar')
-        except:
-            t, v, tback = sys.exc_info()
- 
-        try:
-            raise RuntimeError("error 2")
-        except:
-            html_error = exceptions.html_error_template().\
-                        render_unicode(error=v, traceback=tback)
- 
-        # obfuscate the text so that this text
-        # isn't in the 'wrong' exception
-        assert "".join(reversed(");93#&rab;93#&(oof")) in html_error
-
-    def test_tback_no_trace(self):
-        try:
-            t = self._file_template("runtimeerr.html")
-            t.render()
-        except:
-            t, v, tback = sys.exc_info()
-
-        if not util.py3k:
-            # blow away tracebaack info
-            sys.exc_clear()
- 
-        # and don't even send what we have.
-        html_error = exceptions.html_error_template().\
-                    render_unicode(error=v, traceback=None)
-        assert "local variable 'y' referenced before assignment" in html_error
diff --git a/lib/mako-0.7.2/test/test_filters.py b/lib/mako-0.7.2/test/test_filters.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_filters.py
+++ /dev/null
@@ -1,322 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from mako.template import Template
-import unittest
-from mako import util
-from test import TemplateTest, eq_, skip_if, assert_raises
-from util import result_lines, flatten_result
-
-class FilterTest(TemplateTest):
-    def test_basic(self):
-        t = Template("""
-        ${x | myfilter}
-""")
-        assert flatten_result(t.render(x="this is x", myfilter=lambda t: "MYFILTER->%s<-MYFILTER" % t)) == "MYFILTER->this is x<-MYFILTER"
-
-    def test_expr(self):
-        """test filters that are themselves expressions"""
-        t = Template("""
-        ${x | myfilter(y)}
-""")
-        def myfilter(y):
-            return lambda x: "MYFILTER->%s<-%s" % (x, y)
-        assert flatten_result(t.render(x="this is x", myfilter=myfilter, y="this is y")) == "MYFILTER->this is x<-this is y"
-
-    def test_convert_str(self):
-        """test that string conversion happens in expressions before sending to filters"""
-        t = Template("""
-            ${x | trim}
-        """)
-        assert flatten_result(t.render(x=5)) == "5"
- 
-    def test_quoting(self):
-        t = Template("""
-            foo ${bar | h}
-        """)
- 
-        eq_(
-            flatten_result(t.render(bar="<'some bar'>")),
-            "foo <'some bar'>"
-        )
- 
-    @skip_if(lambda: util.py3k)
-    def test_quoting_non_unicode(self):
-        t = Template("""
-            foo ${bar | h}
-        """, disable_unicode=True,
-        output_encoding=None)
-
-        eq_(
-            flatten_result(t.render(bar="<'привет'>")),
-            "foo <'привет'>"
-        )
- 
- 
-    def test_def(self):
-        t = Template("""
-            <%def name="foo()" filter="myfilter">
-                this is foo
-            </%def>
-            ${foo()}
-""")
-
-        eq_(
-            flatten_result(t.render(x="this is x", 
-                        myfilter=lambda t: "MYFILTER->%s<-MYFILTER" % t)),
-            "MYFILTER-> this is foo <-MYFILTER"
-        )
-
-    def test_import(self):
-        t = Template("""
-        <%!
-            from mako import filters
-        %>\
-        trim this string: ${"  some string to trim   " | filters.trim} continue\
-        """)
-
-        assert t.render().strip()=="trim this string: some string to trim continue"
- 
-    def test_import_2(self):
-        t = Template("""
-        trim this string: ${"  some string to trim   " | filters.trim} continue\
-        """, imports=["from mako import filters"])
-        #print t.code
-        assert t.render().strip()=="trim this string: some string to trim continue"
-
-    def test_encode_filter(self):
-        t = Template("""# coding: utf-8
-            some stuff.... ${x}
-        """, default_filters=['decode.utf8'])
-        #print t.code
-        assert t.render_unicode(x="voix m’a réveillé").strip() == u"some stuff.... voix m’a réveillé"
- 
-    def test_custom_default(self):
-        t = Template("""
-        <%!
-            def myfilter(x):
-                return "->" + x + "<-"
-        %>
- 
-            hi ${'there'}
-        """, default_filters=['myfilter'])
-        assert t.render().strip()=="hi ->there<-"
- 
-    def test_global(self):
-        t = Template("""
-            <%page expression_filter="h"/>
-            ${"<tag>this is html</tag>"}
-        """)
-        assert t.render().strip()  == "<tag>this is html</tag>"
-
-    def test_block_via_context(self):
-        t = Template("""
-            <%block name="foo" filter="myfilter">
-                some text
-            </%block>
-        """)
-        def myfilter(text):
-            return "MYTEXT" + text
-        eq_(
-            result_lines(t.render(myfilter=myfilter)),
-            ["MYTEXT", "some text"]
-        )
-
-    def test_def_via_context(self):
-        t = Template("""
-            <%def name="foo()" filter="myfilter">
-                some text
-            </%def>
-            ${foo()}
-        """)
-        def myfilter(text):
-            return "MYTEXT" + text
-        eq_(
-            result_lines(t.render(myfilter=myfilter)),
-            ["MYTEXT", "some text"]
-        )
-
-    def test_nflag(self):
-        t = Template("""
-            ${"<tag>this is html</tag>" | n}
-        """, default_filters=['h', 'unicode'])
-        assert t.render().strip()  == "<tag>this is html</tag>"
-
-        t = Template("""
-            <%page expression_filter="h"/>
-            ${"<tag>this is html</tag>" | n}
-        """)
-        assert t.render().strip()  == "<tag>this is html</tag>"
-
-        t = Template("""
-            <%page expression_filter="h"/>
-            ${"<tag>this is html</tag>" | n, h}
-        """)
-        assert t.render().strip()  == "<tag>this is html</tag>"
- 
-    def test_non_expression(self):
-        t = Template("""
-        <%!
-            def a(text):
-                return "this is a"
-            def b(text):
-                return "this is b"
-        %>
- 
-        ${foo()}
-        <%def name="foo()" buffered="True">
-            this is text
-        </%def>
-        """, buffer_filters=['a'])
-        assert t.render().strip() == "this is a"
-
-        t = Template("""
-        <%!
-            def a(text):
-                return "this is a"
-            def b(text):
-                return "this is b"
-        %>
- 
-        ${'hi'}
-        ${foo()}
-        <%def name="foo()" buffered="True">
-            this is text
-        </%def>
-        """, buffer_filters=['a'], default_filters=['b'])
-        assert flatten_result(t.render()) == "this is b this is b"
-
-        t = Template("""
-        <%!
-            class Foo(object):
-                foo = True
-                def __str__(self):
-                    return "this is a"
-            def a(text):
-                return Foo()
-            def b(text):
-                if hasattr(text, 'foo'):
-                    return str(text)
-                else:
-                    return "this is b"
-        %>
- 
-        ${'hi'}
-        ${foo()}
-        <%def name="foo()" buffered="True">
-            this is text
-        </%def>
-        """, buffer_filters=['a'], default_filters=['b'])
-        assert flatten_result(t.render()) == "this is b this is a"
-
-        t = Template("""
-        <%!
-            def a(text):
-                return "this is a"
-            def b(text):
-                return "this is b"
-        %>
- 
-        ${foo()}
-        ${bar()}
-        <%def name="foo()" filter="b">
-            this is text
-        </%def>
-        <%def name="bar()" filter="b" buffered="True">
-            this is text
-        </%def>
-        """, buffer_filters=['a'])
-        assert flatten_result(t.render()) == "this is b this is a"
-
- 
-    def test_builtins(self):
-        t = Template("""
-            ${"this is <text>" | h}
-""")
-        assert flatten_result(t.render()) == "this is <text>"
- 
-        t = Template("""
-            http://foo.com/arg1=${"hi! this is a string." | u}
-""")
-        assert flatten_result(t.render()) == "http://foo.com/arg1=hi%21+this+is+a+string."
-
-class BufferTest(unittest.TestCase): 
-    def test_buffered_def(self):
-        t = Template("""
-            <%def name="foo()" buffered="True">
-                this is foo
-            </%def>
-            ${"hi->" + foo() + "<-hi"}
-""")
-        assert flatten_result(t.render()) == "hi-> this is foo <-hi"
-
-    def test_unbuffered_def(self):
-        t = Template("""
-            <%def name="foo()" buffered="False">
-                this is foo
-            </%def>
-            ${"hi->" + foo() + "<-hi"}
-""")
-        assert flatten_result(t.render()) == "this is foo hi-><-hi"
-
-    def test_capture(self):
-        t = Template("""
-            <%def name="foo()" buffered="False">
-                this is foo
-            </%def>
-            ${"hi->" + capture(foo) + "<-hi"}
-""")
-        assert flatten_result(t.render()) == "hi-> this is foo <-hi"
-
-    def test_capture_exception(self):
-        template = Template("""
-            <%def name="a()">
-                this is a
-                <% 
-                    raise TypeError("hi")
-                %>
-            </%def>
-            <%
-                c = capture(a)
-            %>
-            a->${c}<-a
-        """)
-        try:
-            template.render()
-            assert False
-        except TypeError:
-            assert True
- 
-    def test_buffered_exception(self):
-        template = Template("""
-            <%def name="a()" buffered="True">
-                <%
-                    raise TypeError("hi")
-                %>
-            </%def>
- 
-            ${a()}
- 
-""") 
-        try:
-            print template.render()
-            assert False
-        except TypeError:
-            assert True
- 
-    def test_capture_ccall(self):
-        t = Template("""
-            <%def name="foo()">
-                <%
-                    x = capture(caller.body)
-                %>
-                this is foo.  body: ${x}
-            </%def>
-
-            <%call expr="foo()">
-                ccall body
-            </%call>
-""")
- 
-        #print t.render()
-        assert flatten_result(t.render()) == "this is foo. body: ccall body"
- 
diff --git a/lib/mako-0.7.2/test/test_inheritance.py b/lib/mako-0.7.2/test/test_inheritance.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_inheritance.py
+++ /dev/null
@@ -1,350 +0,0 @@
-from mako.template import Template
-from mako import lookup, util
-import unittest
-from util import flatten_result, result_lines
-
-class InheritanceTest(unittest.TestCase):
-    def test_basic(self):
-        collection = lookup.TemplateLookup()
-
-        collection.put_string('main', """
-<%inherit file="base"/>
-
-<%def name="header()">
-    main header.
-</%def>
-
-this is the content.
-""")
-
-        collection.put_string('base', """
-This is base.
-
-header: ${self.header()}
-
-body: ${self.body()}
-
-footer: ${self.footer()}
-
-<%def name="footer()">
-    this is the footer. header again ${next.header()}
-</%def>
-""")
-
-        assert result_lines(collection.get_template('main').render()) == [
-            'This is base.',
-             'header:',
-             'main header.',
-             'body:',
-             'this is the content.',
-             'footer:',
-             'this is the footer. header again',
-             'main header.'
-        ]
-
-    def test_multilevel_nesting(self):
-        collection = lookup.TemplateLookup()
-
-        collection.put_string('main', """
-<%inherit file="layout"/>
-<%def name="d()">main_d</%def>
-main_body ${parent.d()}
-full stack from the top:
-    ${self.name} ${parent.name} ${parent.context['parent'].name} ${parent.context['parent'].context['parent'].name}
-""")
- 
-        collection.put_string('layout', """
-<%inherit file="general"/>
-<%def name="d()">layout_d</%def>
-layout_body
-parent name: ${parent.name}
-${parent.d()}
-${parent.context['parent'].d()}
-${next.body()}
-""")
-
-        collection.put_string('general', """
-<%inherit file="base"/>
-<%def name="d()">general_d</%def>
-general_body
-${next.d()}
-${next.context['next'].d()}
-${next.body()}
-""")
-        collection.put_string('base', """
-base_body
-full stack from the base:
-    ${self.name} ${self.context['parent'].name} ${self.context['parent'].context['parent'].name} ${self.context['parent'].context['parent'].context['parent'].name}
-${next.body()}
-<%def name="d()">base_d</%def>
-""")
-
-        assert result_lines(collection.get_template('main').render()) == [
-            'base_body',
-             'full stack from the base:',
-             'self:main self:layout self:general self:base',
-             'general_body',
-             'layout_d',
-             'main_d',
-             'layout_body',
-             'parent name: self:general',
-             'general_d',
-             'base_d',
-             'main_body layout_d',
-             'full stack from the top:',
-             'self:main self:layout self:general self:base'
-        ]
- 
-    def test_includes(self):
-        """test that an included template also has its full hierarchy invoked."""
-        collection = lookup.TemplateLookup()
- 
-        collection.put_string("base", """
-        <%def name="a()">base_a</%def>
-        This is the base.
-        ${next.body()}
-        End base.
-""")
-
-        collection.put_string("index","""
-        <%inherit file="base"/>
-        this is index.
-        a is: ${self.a()}
-        <%include file="secondary"/>
-""")
-
-        collection.put_string("secondary","""
-        <%inherit file="base"/>
-        this is secondary.
-        a is: ${self.a()}
-""")
-
-        assert result_lines(collection.get_template("index").render()) == [
-            'This is the base.', 
-            'this is index.',
-             'a is: base_a',
-             'This is the base.',
-             'this is secondary.',
-             'a is: base_a',
-             'End base.',
-             'End base.'
-            ]
-
-    def test_namespaces(self):
-        """test that templates used via <%namespace> have access to an inheriting 'self', and that
-        the full 'self' is also exported."""
-        collection = lookup.TemplateLookup()
- 
-        collection.put_string("base", """
-        <%def name="a()">base_a</%def>
-        <%def name="b()">base_b</%def>
-        This is the base.
-        ${next.body()}
-""")
-
-        collection.put_string("layout", """
-        <%inherit file="base"/>
-        <%def name="a()">layout_a</%def>
-        This is the layout..
-        ${next.body()}
-""")
-
-        collection.put_string("index","""
-        <%inherit file="base"/>
-        <%namespace name="sc" file="secondary"/>
-        this is index.
-        a is: ${self.a()}
-        sc.a is: ${sc.a()}
-        sc.b is: ${sc.b()}
-        sc.c is: ${sc.c()}
-        sc.body is: ${sc.body()}
-""")
-
-        collection.put_string("secondary","""
-        <%inherit file="layout"/>
-        <%def name="c()">secondary_c.  a is ${self.a()} b is ${self.b()} d is ${self.d()}</%def>
-        <%def name="d()">secondary_d.</%def>
-        this is secondary.
-        a is: ${self.a()}
-        c is: ${self.c()}
-""")
-
-        assert result_lines(collection.get_template('index').render()) ==  ['This is the base.',
-         'this is index.',
-         'a is: base_a',
-         'sc.a is: layout_a',
-         'sc.b is: base_b',
-         'sc.c is: secondary_c. a is layout_a b is base_b d is secondary_d.',
-         'sc.body is:',
-         'this is secondary.',
-         'a is: layout_a',
-         'c is: secondary_c. a is layout_a b is base_b d is secondary_d.'
-         ]
-
-    def test_pageargs(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("base", """
-            this is the base.
-
-            <%
-            sorted_ = pageargs.items()
-            sorted_ = sorted(sorted_)
-            %>
-            pageargs: (type: ${type(pageargs)}) ${sorted_}
-            <%def name="foo()">
-                ${next.body(**context.kwargs)}
-            </%def>
- 
-            ${foo()}
-        """)
-        collection.put_string("index", """
-            <%inherit file="base"/>
-            <%page args="x, y, z=7"/>
-            print ${x}, ${y}, ${z}
-        """)
- 
-        if util.py3k:
-            assert result_lines(collection.get_template('index').render_unicode(x=5,y=10)) == [
-                "this is the base.",
-                "pageargs: (type: <class 'dict'>) [('x', 5), ('y', 10)]",
-                "print 5, 10, 7"
-            ]
-        else:
-            assert result_lines(collection.get_template('index').render_unicode(x=5,y=10)) == [
-                "this is the base.",
-                "pageargs: (type: <type 'dict'>) [('x', 5), ('y', 10)]",
-                "print 5, 10, 7"
-            ]
- 
-    def test_pageargs_2(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("base", """
-            this is the base.
- 
-            ${next.body(**context.kwargs)}
- 
-            <%def name="foo(**kwargs)">
-                ${next.body(**kwargs)}
-            </%def>
-
-            <%def name="bar(**otherargs)">
-                ${next.body(z=16, **context.kwargs)}
-            </%def>
-
-            ${foo(x=12, y=15, z=8)}
-            ${bar(x=19, y=17)}
-        """)
-        collection.put_string("index", """
-            <%inherit file="base"/>
-            <%page args="x, y, z=7"/>
-            pageargs: ${x}, ${y}, ${z}
-        """)
-        assert result_lines(collection.get_template('index').render(x=5,y=10)) == [
-            "this is the base.",
-            "pageargs: 5, 10, 7",
-            "pageargs: 12, 15, 8",
-            "pageargs: 5, 10, 16"
-        ]
- 
-    def test_pageargs_err(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("base", """
-            this is the base.
-            ${next.body()}
-        """)
-        collection.put_string("index", """
-            <%inherit file="base"/>
-            <%page args="x, y, z=7"/>
-            print ${x}, ${y}, ${z}
-        """)
-        try:
-            print collection.get_template('index').render(x=5,y=10)
-            assert False
-        except TypeError:
-            assert True
- 
-    def test_toplevel(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("base", """
-            this is the base.
-            ${next.body()}
-        """)
-        collection.put_string("index", """
-            <%inherit file="base"/>
-            this is the body
-        """)
-        assert result_lines(collection.get_template('index').render()) == [
-            "this is the base.",
-            "this is the body"
-        ]
-        assert result_lines(collection.get_template('index').get_def("body").render()) == [
-            "this is the body"
-        ]
-
-    def test_dynamic(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("base", """
-            this is the base.
-            ${next.body()}
-        """)
-        collection.put_string("index", """
-            <%!
-                def dyn(context):
-                    if context.get('base', None) is not None:
-                        return 'base'
-                    else:
-                        return None
-            %>
-            <%inherit file="${dyn(context)}"/>
-            this is index.
-        """)
-        assert result_lines(collection.get_template('index').render()) == [
-            'this is index.'
-        ]
-        assert result_lines(collection.get_template('index').render(base=True)) == [
-            'this is the base.',
-            'this is index.'
-        ]
- 
-    def test_in_call(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("/layout.html","""
-        Super layout!
-        <%call expr="self.grid()">
-            ${next.body()}
-        </%call>
-        Oh yea!
-
-        <%def name="grid()">
-            Parent grid
-                ${caller.body()}
-            End Parent
-        </%def>
-        """)
-
-
-        collection.put_string("/subdir/layout.html", """
-        ${next.body()}
-        <%def name="grid()">
-           Subdir grid
-               ${caller.body()}
-           End subdir
-        </%def>
-        <%inherit file="/layout.html"/>
-        """)
- 
-        collection.put_string("/subdir/renderedtemplate.html","""
-        Holy smokes!
-        <%inherit file="/subdir/layout.html"/>
-        """)
-
-        #print collection.get_template("/layout.html").code
-        #print collection.get_template("/subdir/renderedtemplate.html").render()
-        assert result_lines(collection.get_template("/subdir/renderedtemplate.html").render()) == [
-            "Super layout!",
-            "Subdir grid",
-            "Holy smokes!",
-            "End subdir",
-            "Oh yea!"
-        ]
-
diff --git a/lib/mako-0.7.2/test/test_lexer.py b/lib/mako-0.7.2/test/test_lexer.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_lexer.py
+++ /dev/null
@@ -1,871 +0,0 @@
-import unittest
-
-from mako.lexer import Lexer
-from mako import exceptions, util
-from util import flatten_result, result_lines
-from mako.template import Template
-import re
-from test import TemplateTest, template_base, skip_if, eq_, assert_raises_message
-
-# create fake parsetree classes which are constructed
-# exactly as the repr() of a real parsetree object.
-# this allows us to use a Python construct as the source
-# of a comparable repr(), which is also hit by the 2to3 tool.
-
-def repr_arg(x):
-    if isinstance(x, dict):
-        return util.sorted_dict_repr(x)
-    else:
-        return repr(x)
-
-from mako import parsetree
-for cls in parsetree.__dict__.values():
-    if isinstance(cls, type) and \
-        issubclass(cls, parsetree.Node):
-        clsname = cls.__name__
-        exec ("""
-class %s(object):
-    def __init__(self, *args):
-        self.args = args
-    def __repr__(self):
-        return "%%s(%%s)" %% (
-            self.__class__.__name__,
-            ", ".join(repr_arg(x) for x in self.args)
-            )
-""" % clsname) in locals()
-
-# NOTE: most assertion expressions were generated, then formatted
-# by PyTidy, hence the dense formatting.
-
-class LexerTest(TemplateTest):
-
-    def _compare(self, node, expected):
-        eq_(repr(node), repr(expected))
-
-    def test_text_and_tag(self):
-        template = """
-<b>Hello world</b>
-        <%def name="foo()">
-                this is a def.
-        </%def>
-        
-        and some more text.
-"""
-        node = Lexer(template).parse()
-        self._compare(node, TemplateNode({},
-                      [Text(u'''\n<b>Hello world</b>\n        ''', (1,
-                      1)), DefTag(u'def', {u'name': u'foo()'}, (3, 9),
-                      [Text(u'''\n                this is a def.\n        ''',
-                      (3, 28))]),
-                      Text(u'''\n        \n        and some more text.\n''',
-                      (5, 16))]))
-
-    def test_unclosed_tag(self):
-        template = """
-        
-            <%def name="foo()">
-             other text
-        """
-        try:
-            nodes = Lexer(template).parse()
-            assert False
-        except exceptions.SyntaxException, e:
-            assert str(e) == "Unclosed tag: <%def> at line: 5 char: 9"
-
-    def test_onlyclosed_tag(self):
-        template = \
-            """
-            <%def name="foo()">
-                foo
-            </%def>
-            
-            </%namespace>
-            
-            hi.
-        """
-        self.assertRaises(exceptions.SyntaxException,
-                          Lexer(template).parse)
-
-    def test_noexpr_allowed(self):
-        template = \
-            """
-            <%namespace name="${foo}"/>
-        """
-        self.assertRaises(exceptions.CompileException,
-                          Lexer(template).parse)
-
-    def test_unmatched_tag(self):
-        template = \
-            """
-        <%namespace name="bar">
-        <%def name="foo()">
-            foo
-            </%namespace>
-        </%def>
-        
-        
-        hi.
-"""
-        self.assertRaises(exceptions.SyntaxException,
-                          Lexer(template).parse)
-
-    def test_nonexistent_tag(self):
-        template = """
-            <%lala x="5"/>
-        """
-        self.assertRaises(exceptions.CompileException,
-                          Lexer(template).parse)
-
-    def test_wrongcase_tag(self):
-        template = \
-            """
-            <%DEF name="foo()">
-            </%def>
-        
-        """
-        self.assertRaises(exceptions.CompileException,
-                          Lexer(template).parse)
-
-    def test_percent_escape(self):
-        template = \
-            """
-        
-%% some whatever.
-
-    %% more some whatever
-    % if foo:
-    % endif
-        """
-        node = Lexer(template).parse()
-        self._compare(node, TemplateNode({}, [Text(u'''\n        \n''',
-                      (1, 1)), Text(u'''% some whatever.\n\n''', (3, 2)),
-                      Text(u'   %% more some whatever\n', (5, 2)),
-                      ControlLine(u'if', u'if foo:', False, (6, 1)),
-                      ControlLine(u'if', u'endif', True, (7, 1)),
-                      Text(u'        ', (8, 1))]))
-
-    def test_text_tag(self):
-        template = \
-            """
-        ## comment
-        % if foo:
-            hi
-        % endif
-        <%text>
-            # more code
-            
-            % more code
-            <%illegal compionent>/></>
-            <%def name="laal()">def</%def>
-            
-            
-        </%text>
-
-        <%def name="foo()">this is foo</%def>
-        
-        % if bar:
-            code
-        % endif
-        """
-        node = Lexer(template).parse()
-        self._compare(node, 
-            TemplateNode({}, [Text(u'\n', (1, 1)),
-              Comment(u'comment', (2, 1)), 
-              ControlLine(u'if', u'if foo:', False, (3, 1)),
-              Text(u'            hi\n', (4, 1)),
-              ControlLine(u'if', u'endif', True, (5, 1)),
-              Text(u'        ', (6, 1)), TextTag(u'text', {},
-              (6, 9),
-              [Text(u'''\n            # more code\n            '''
-              '''\n            % more code\n            '''
-              '''<%illegal compionent>/></>\n            '''
-              '''<%def name="laal()">def</%def>\n       '''
-              '''     \n            \n        ''',
-                      (6, 16))]), Text(u'''
-
-        ''', (14, 17)),
-                      DefTag(u'def', {u'name': u'foo()'}, (16, 9),
-                      [Text(u'this is foo', (16, 28))]),
-                      Text(u'''\n        \n''', (16, 46)),
-                      ControlLine(u'if', u'if bar:', False, (18, 1)),
-                      Text(u'            code\n', (19, 1)),
-                      ControlLine(u'if', u'endif', True, (20, 1)),
-                      Text(u'        ', (21, 1))]))
-
-    def test_def_syntax(self):
-        template = \
-            """
-        <%def lala>
-            hi
-        </%def>
-"""
-        self.assertRaises(exceptions.CompileException,
-                          Lexer(template).parse)
-
-    def test_def_syntax_2(self):
-        template = \
-            """
-        <%def name="lala">
-            hi
-        </%def>
-    """
-        self.assertRaises(exceptions.CompileException,
-                          Lexer(template).parse)
-
-    def test_whitespace_equals(self):
-        template = \
-            """
-            <%def name = "adef()" >
-              adef
-            </%def>
-        """
-        node = Lexer(template).parse()
-        self._compare(node, TemplateNode({}, [Text(u'\n            ',
-                      (1, 1)), DefTag(u'def', {u'name': u'adef()'}, (2,
-                      13),
-                      [Text(u'''\n              adef\n            ''',
-                      (2, 36))]), Text(u'\n        ', (4, 20))]))
-
-    def test_ns_tag_closed(self):
-        template = \
-            """
-        
-            <%self:go x="1" y="2" z="${'hi' + ' ' + 'there'}"/>
-        """
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({},
-                      [Text(u'''
-        
-            ''', (1, 1)),
-                      CallNamespaceTag(u'self:go', {u'x': u'1', u'y'
-                      : u'2', u'z': u"${'hi' + ' ' + 'there'}"}, (3,
-                      13), []), Text(u'\n        ', (3, 64))]))
-
-    def test_ns_tag_empty(self):
-        template = \
-            """
-            <%form:option value=""></%form:option>
-        """
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({}, [Text(u'\n            ',
-                      (1, 1)), CallNamespaceTag(u'form:option',
-                      {u'value': u''}, (2, 13), []), Text(u'\n        '
-                      , (2, 51))]))
-
-    def test_ns_tag_open(self):
-        template = \
-            """
-        
-            <%self:go x="1" y="${process()}">
-                this is the body
-            </%self:go>
-        """
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({},
-                      [Text(u'''
-        
-            ''', (1, 1)),
-                      CallNamespaceTag(u'self:go', {u'x': u'1', u'y'
-                      : u'${process()}'}, (3, 13),
-                      [Text(u'''
-                this is the body
-            ''',
-                      (3, 46))]), Text(u'\n        ', (5, 24))]))
-
-    def test_expr_in_attribute(self):
-        """test some slightly trickier expressions.
-        
-        you can still trip up the expression parsing, though, unless we
-        integrated really deeply somehow with AST."""
-
-        template = \
-            """
-            <%call expr="foo>bar and 'lala' or 'hoho'"/>
-            <%call expr='foo<bar and hoho>lala and "x" + "y"'/>
-        """
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({}, [Text(u'\n            ',
-                      (1, 1)), CallTag(u'call', {u'expr'
-                      : u"foo>bar and 'lala' or 'hoho'"}, (2, 13), []),
-                      Text(u'\n            ', (2, 57)), CallTag(u'call'
-                      , {u'expr': u'foo<bar and hoho>lala and "x" + "y"'
-                      }, (3, 13), []), Text(u'\n        ', (3, 64))]))
-
-    def test_pagetag(self):
-        template = \
-            """
-            <%page cached="True", args="a, b"/>
-            
-            some template
-        """
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({}, [Text(u'\n            ',
-                      (1, 1)), PageTag(u'page', {u'args': u'a, b',
-                      u'cached': u'True'}, (2, 13), []),
-                      Text(u'''
-            
-            some template
-        ''',
-                      (2, 48))]))
-
-    def test_nesting(self):
-        template = \
-            """
-        
-        <%namespace name="ns">
-            <%def name="lala(hi, there)">
-                <%call expr="something()"/>
-            </%def>
-        </%namespace>
-        
-        """
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({},
-                      [Text(u'''
-        
-        ''', (1, 1)),
-                      NamespaceTag(u'namespace', {u'name': u'ns'}, (3,
-                      9), [Text(u'\n            ', (3, 31)),
-                      DefTag(u'def', {u'name': u'lala(hi, there)'}, (4,
-                      13), [Text(u'\n                ', (4, 42)),
-                      CallTag(u'call', {u'expr': u'something()'}, (5,
-                      17), []), Text(u'\n            ', (5, 44))]),
-                      Text(u'\n        ', (6, 20))]),
-                      Text(u'''
-        
-        ''', (7, 22))]))
-
-    if util.py3k:
-        def test_code(self):
-            template = \
-"""text
-    <%
-        print("hi")
-        for x in range(1,5):
-            print(x)
-    %>
-more text
-    <%!
-        import foo
-    %>
-"""
-            nodes = Lexer(template).parse()
-            self._compare(nodes, 
-            TemplateNode({}, [
-                Text(u'text\n    ', (1, 1)), 
-                Code(u'\nprint("hi")\nfor x in range(1,5):\n    '
-                            'print(x)\n    \n', False, (2, 5)), 
-                Text(u'\nmore text\n    ', (6, 7)), 
-                Code(u'\nimport foo\n    \n', True, (8, 5)), 
-                Text(u'\n', (10, 7))])
-            )
-
-
-    else:
-
-        def test_code(self):
-            template = \
-"""text
-    <%
-        print "hi"
-        for x in range(1,5):
-            print x
-    %>
-more text
-    <%!
-        import foo
-    %>
-"""
-            nodes = Lexer(template).parse()
-            self._compare(nodes, 
-            TemplateNode({}, [
-                Text(u'text\n    ', (1, 1)), 
-                Code(u'\nprint "hi"\nfor x in range(1,5):\n    '
-                            'print x\n    \n', False, (2, 5)), 
-                Text(u'\nmore text\n    ', (6, 7)), 
-                Code(u'\nimport foo\n    \n', True, (8, 5)), 
-                Text(u'\n', (10, 7))])
-            )
-
-    def test_code_and_tags(self):
-        template = \
-            """
-<%namespace name="foo">
-    <%def name="x()">
-        this is x
-    </%def>
-    <%def name="y()">
-        this is y
-    </%def>
-</%namespace>
-
-<%
-    result = []
-    data = get_data()
-    for x in data:
-        result.append(x+7)
-%>
-
-    result: <%call expr="foo.x(result)"/>
-"""
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({}, [Text(u'\n', (1, 1)),
-                      NamespaceTag(u'namespace', {u'name': u'foo'}, (2,
-                      1), [Text(u'\n    ', (2, 24)), DefTag(u'def',
-                      {u'name': u'x()'}, (3, 5),
-                      [Text(u'''\n        this is x\n    ''', (3, 22))]),
-                      Text(u'\n    ', (5, 12)), DefTag(u'def', {u'name'
-                      : u'y()'}, (6, 5),
-                      [Text(u'''\n        this is y\n    ''', (6, 22))]),
-                      Text(u'\n', (8, 12))]), Text(u'''\n\n''', (9, 14)),
-                      Code(u'''\nresult = []\ndata = get_data()\n'''
-                      '''for x in data:\n    result.append(x+7)\n\n''',
-                      False, (11, 1)), Text(u'''\n\n    result: ''', (16,
-                      3)), CallTag(u'call', {u'expr': u'foo.x(result)'
-                      }, (18, 13), []), Text(u'\n', (18, 42))]))
-
-    def test_expression(self):
-        template = \
-            """
-        this is some ${text} and this is ${textwith | escapes, moreescapes}
-        <%def name="hi()">
-            give me ${foo()} and ${bar()}
-        </%def>
-        ${hi()}
-"""
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({},
-                      [Text(u'\n        this is some ', (1, 1)),
-                      Expression(u'text', [], (2, 22)),
-                      Text(u' and this is ', (2, 29)),
-                      Expression(u'textwith ', ['escapes', 'moreescapes'
-                      ], (2, 42)), Text(u'\n        ', (2, 76)),
-                      DefTag(u'def', {u'name': u'hi()'}, (3, 9),
-                      [Text(u'\n            give me ', (3, 27)),
-                      Expression(u'foo()', [], (4, 21)), Text(u' and ',
-                      (4, 29)), Expression(u'bar()', [], (4, 34)),
-                      Text(u'\n        ', (4, 42))]), Text(u'\n        '
-                      , (5, 16)), Expression(u'hi()', [], (6, 9)),
-                      Text(u'\n', (6, 16))]))
-
-
-    def test_tricky_expression(self):
-        template = """
-        
-            ${x and "|" or "hi"}
-        """
-        nodes = Lexer(template).parse()
-        self._compare(
-            nodes,
-            TemplateNode({}, [
-                Text(u'\n        \n            ', (1, 1)), 
-                Expression(u'x and "|" or "hi"', [], (3, 13)), 
-                Text(u'\n        ', (3, 33))
-            ])
-        )
-
-        template = """
-        
-            ${hello + '''heres '{|}' text | | }''' | escape1}
-        """
-        nodes = Lexer(template).parse()
-        self._compare(
-            nodes,
-            TemplateNode({}, [
-                Text(u'\n        \n            ', (1, 1)), 
-                Expression(u"hello + '''heres '{|}' text | | }''' ", 
-                                ['escape1'], (3, 13)), 
-                Text(u'\n        ', (3, 62))
-            ])
-        )
-
-    def test_tricky_code(self):
-        if util.py3k:
-            template = """<% print('hi %>') %>"""
-            nodes = Lexer(template).parse()
-            self._compare(nodes, TemplateNode({},
-                          [Code(u"print('hi %>') \n", False, (1, 1))]))
-        else:
-            template = """<% print 'hi %>' %>"""
-            nodes = Lexer(template).parse()
-            self._compare(nodes, TemplateNode({},
-                          [Code(u"print 'hi %>' \n", False, (1, 1))]))
-
-    def test_tricky_code_2(self):
-        template = \
-            """<% 
-        # someone's comment
-        %>
-        """
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({},
-                      [Code(u""" 
-        # someone's comment
-        
-""",
-                      False, (1, 1)), Text(u'\n        ', (3, 11))]))
-
-    if util.py3k:
-        def test_tricky_code_3(self):
-            template = \
-                """<%
-            print('hi')
-            # this is a comment
-            # another comment
-            x = 7 # someone's '''comment
-            print('''
-        there
-        ''')
-            # someone else's comment
-        %> '''and now some text '''"""
-            nodes = Lexer(template).parse()
-            self._compare(nodes, TemplateNode({},
-                          [Code(u"""
-print('hi')
-# this is a comment
-# another comment
-x = 7 # someone's '''comment
-print('''
-        there
-        ''')
-# someone else's comment
-        
-""",
-                          False, (1, 1)),
-                          Text(u" '''and now some text '''", (10,
-                          11))]))
-    else:
-        def test_tricky_code_3(self):
-            template = \
-                """<%
-            print 'hi'
-            # this is a comment
-            # another comment
-            x = 7 # someone's '''comment
-            print '''
-        there
-        '''
-            # someone else's comment
-        %> '''and now some text '''"""
-            nodes = Lexer(template).parse()
-            self._compare(nodes, TemplateNode({},
-                      [Code(u"""\nprint 'hi'\n# this is a comment\n"""
-                      """# another comment\nx = 7 """
-                      """# someone's '''comment\nprint '''\n        """
-                      """there\n        '''\n# someone else's """
-                      """comment\n        \n""",
-                      False, (1, 1)),
-                      Text(u" '''and now some text '''", (10,11))]))
-
-    def test_tricky_code_4(self):
-        template = \
-            """<% foo = "\\"\\\\" %>"""
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({},
-                      [Code(u"""foo = "\\"\\\\" \n""",
-                      False, (1, 1))]))
-
-    def test_tricky_code_5(self):
-        template = \
-            """before ${ {'key': 'value'} } after"""
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({},
-                      [Text(u'before ', (1, 1)),
-                      Expression(u" {'key': 'value'} ", [], (1, 8)),
-                      Text(u' after', (1, 29))]))
-
-    def test_control_lines(self):
-        template = \
-            """
-text text la la
-% if foo():
- mroe text la la blah blah
-% endif
-
-        and osme more stuff
-        % for l in range(1,5):
-    tex tesl asdl l is ${l} kfmas d
-      % endfor
-    tetx text
-    
-"""
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({},
-                      [Text(u'''\ntext text la la\n''', (1, 1)),
-                      ControlLine(u'if', u'if foo():', False, (3, 1)),
-                      Text(u' mroe text la la blah blah\n', (4, 1)),
-                      ControlLine(u'if', u'endif', True, (5, 1)),
-                      Text(u'''\n        and osme more stuff\n''', (6,
-                      1)), ControlLine(u'for', u'for l in range(1,5):',
-                      False, (8, 1)), Text(u'    tex tesl asdl l is ',
-                      (9, 1)), Expression(u'l', [], (9, 24)),
-                      Text(u' kfmas d\n', (9, 28)), ControlLine(u'for',
-                      u'endfor', True, (10, 1)),
-                      Text(u'''    tetx text\n    \n''', (11, 1))]))
-
-    def test_control_lines_2(self):
-        template = \
-"""% for file in requestattr['toc'].filenames:
-    x
-% endfor
-"""
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({}, [ControlLine(u'for',
-                      u"for file in requestattr['toc'].filenames:",
-                      False, (1, 1)), Text(u'    x\n', (2, 1)),
-                      ControlLine(u'for', u'endfor', True, (3, 1))]))
-
-    def test_long_control_lines(self):
-        template = \
-        """
-    % for file in \\
-        requestattr['toc'].filenames:
-        x
-    % endfor
-        """
-        nodes = Lexer(template).parse()
-        self._compare(
-            nodes,
-            TemplateNode({}, [
-                Text(u'\n', (1, 1)), 
-                ControlLine(u'for', u"for file in \\\n        "
-                                "requestattr['toc'].filenames:", 
-                                False, (2, 1)), 
-                Text(u'        x\n', (4, 1)), 
-                ControlLine(u'for', u'endfor', True, (5, 1)), 
-                Text(u'        ', (6, 1))
-            ])
-        )
-
-    def test_unmatched_control(self):
-        template = """
-
-        % if foo:
-            % for x in range(1,5):
-        % endif
-"""
-        assert_raises_message(
-            exceptions.SyntaxException,
-            "Keyword 'endif' doesn't match keyword 'for' at line: 5 char: 1",
-            Lexer(template).parse
-        )
-
-    def test_unmatched_control_2(self):
-        template = """
-
-        % if foo:
-            % for x in range(1,5):
-            % endfor
-"""
-
-        assert_raises_message(
-            exceptions.SyntaxException,
-            "Unterminated control keyword: 'if' at line: 3 char: 1",
-            Lexer(template).parse
-        )
-
-    def test_unmatched_control_3(self):
-        template = """
-
-        % if foo:
-            % for x in range(1,5):
-            % endlala
-        % endif
-"""
-        assert_raises_message(
-            exceptions.SyntaxException,
-            "Keyword 'endlala' doesn't match keyword 'for' at line: 5 char: 1",
-            Lexer(template).parse
-        )
-
-    def test_ternary_control(self):
-        template = \
-            """
-        % if x:
-            hi
-        % elif y+7==10:
-            there
-        % elif lala:
-            lala
-        % else:
-            hi
-        % endif
-"""
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({}, [Text(u'\n', (1, 1)),
-                      ControlLine(u'if', u'if x:', False, (2, 1)),
-                      Text(u'            hi\n', (3, 1)),
-                      ControlLine(u'elif', u'elif y+7==10:', False, (4,
-                      1)), Text(u'            there\n', (5, 1)),
-                      ControlLine(u'elif', u'elif lala:', False, (6,
-                      1)), Text(u'            lala\n', (7, 1)),
-                      ControlLine(u'else', u'else:', False, (8, 1)),
-                      Text(u'            hi\n', (9, 1)),
-                      ControlLine(u'if', u'endif', True, (10, 1))]))
-
-    def test_integration(self):
-        template = \
-            """<%namespace name="foo" file="somefile.html"/>
- ## inherit from foobar.html
-<%inherit file="foobar.html"/>
-
-<%def name="header()">
-     <div>header</div>
-</%def>
-<%def name="footer()">
-    <div> footer</div>
-</%def>
-
-<table>
-    % for j in data():
-    <tr>
-        % for x in j:
-            <td>Hello ${x| h}</td>
-        % endfor
-    </tr>
-    % endfor
-</table>
-"""
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({}, [NamespaceTag(u'namespace'
-                      , {u'file': u'somefile.html', u'name': u'foo'},
-                      (1, 1), []), Text(u'\n', (1, 46)),
-                      Comment(u'inherit from foobar.html', (2, 1)),
-                      InheritTag(u'inherit', {u'file': u'foobar.html'},
-                      (3, 1), []), Text(u'''\n\n''', (3, 31)),
-                      DefTag(u'def', {u'name': u'header()'}, (5, 1),
-                      [Text(u'''\n     <div>header</div>\n''', (5,
-                      23))]), Text(u'\n', (7, 8)), DefTag(u'def',
-                      {u'name': u'footer()'}, (8, 1),
-                      [Text(u'''\n    <div> footer</div>\n''', (8,
-                      23))]), Text(u'''\n\n<table>\n''', (10, 8)),
-                      ControlLine(u'for', u'for j in data():', False,
-                      (13, 1)), Text(u'    <tr>\n', (14, 1)),
-                      ControlLine(u'for', u'for x in j:', False, (15,
-                      1)), Text(u'            <td>Hello ', (16, 1)),
-                      Expression(u'x', ['h'], (16, 23)), Text(u'</td>\n'
-                      , (16, 30)), ControlLine(u'for', u'endfor', True,
-                      (17, 1)), Text(u'    </tr>\n', (18, 1)),
-                      ControlLine(u'for', u'endfor', True, (19, 1)),
-                      Text(u'</table>\n', (20, 1))]))
-
-    def test_comment_after_statement(self):
-        template = \
-            """
-        % if x: #comment
-            hi
-        % else: #next
-            hi
-        % endif #end
-"""
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({}, [Text(u'\n', (1, 1)),
-                      ControlLine(u'if', u'if x: #comment', False, (2,
-                      1)), Text(u'            hi\n', (3, 1)),
-                      ControlLine(u'else', u'else: #next', False, (4,
-                      1)), Text(u'            hi\n', (5, 1)),
-                      ControlLine(u'if', u'endif #end', True, (6, 1))]))
-
-    def test_crlf(self):
-        template = open(self._file_path("crlf.html"), 'rb').read()
-        nodes = Lexer(template).parse()
-        self._compare(
-            nodes,
-            TemplateNode({}, [
-                Text(u'<html>\r\n\r\n', (1, 1)), 
-                PageTag(u'page', {
-                            u'args': u"a=['foo',\n                'bar']"
-                        }, (3, 1), []), 
-                Text(u'\r\n\r\nlike the name says.\r\n\r\n', (4, 26)), 
-                ControlLine(u'for', u'for x in [1,2,3]:', False, (8, 1)), 
-                Text(u'        ', (9, 1)), 
-                Expression(u'x', [], (9, 9)), 
-                ControlLine(u'for', u'endfor', True, (10, 1)), 
-                Text(u'\r\n', (11, 1)), 
-                Expression(u"trumpeter == 'Miles' and "
-                                "trumpeter or \\\n      'Dizzy'", 
-                                [], (12, 1)), 
-                Text(u'\r\n\r\n', (13, 15)), 
-                DefTag(u'def', {u'name': u'hi()'}, (15, 1), [
-                    Text(u'\r\n    hi!\r\n', (15, 19))]), 
-                    Text(u'\r\n\r\n</html>\r\n', (17, 8))
-                ])
-        )
-        assert flatten_result(Template(template).render()) \
-            == """<html> like the name says. 1 2 3 Dizzy </html>"""
-
-    def test_comments(self):
-        template = \
-            """
-<style>
- #someselector
- # other non comment stuff
-</style>
-## a comment
-
-# also not a comment
-
-   ## this is a comment
-   
-this is ## not a comment
-
-<%doc> multiline
-comment
-</%doc>
-
-hi
-"""
-        nodes = Lexer(template).parse()
-        self._compare(nodes, TemplateNode({},
-                      [Text(u'''\n<style>\n #someselector\n # '''
-                        '''other non comment stuff\n</style>\n''',
-                      (1, 1)), Comment(u'a comment', (6, 1)),
-                      Text(u'''\n# also not a comment\n\n''', (7, 1)),
-                      Comment(u'this is a comment', (10, 1)),
-                      Text(u'''   \nthis is ## not a comment\n\n''', (11,
-                      1)), Comment(u''' multiline\ncomment\n''', (14,
-                      1)), Text(u'''
-
-hi
-''', (16, 8))]))
-
-    def test_docs(self):
-        template = \
-            """
-        <%doc>
-            this is a comment
-        </%doc>
-        <%def name="foo()">
-            <%doc>
-                this is the foo func
-            </%doc>
-        </%def>
-        """
-        nodes = Lexer(template).parse()
-        self._compare(nodes, 
-            TemplateNode({}, [Text(u'\n        ', (1,
-              1)),
-              Comment(u'''\n            this is a comment\n        ''',
-              (2, 9)), Text(u'\n        ', (4, 16)),
-              DefTag(u'def', {u'name': u'foo()'}, (5, 9),
-              [Text(u'\n            ', (5, 28)),
-              Comment(u'''\n                this is the foo func\n'''
-                '''            ''',
-              (6, 13)), Text(u'\n        ', (8, 20))]),
-              Text(u'\n        ', (9, 16))]))
-
-    def test_preprocess(self):
-
-        def preproc(text):
-            return re.sub(r'(?<=\n)\s*#[^#]', '##', text)
-
-        template = \
-            """
-    hi
-    # old style comment
-# another comment
-"""
-        nodes = Lexer(template, preprocessor=preproc).parse()
-        self._compare(nodes, TemplateNode({}, [Text(u'''\n    hi\n''',
-                      (1, 1)), Comment(u'old style comment', (3, 1)),
-                      Comment(u'another comment', (4, 1))]))
diff --git a/lib/mako-0.7.2/test/test_lookup.py b/lib/mako-0.7.2/test/test_lookup.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_lookup.py
+++ /dev/null
@@ -1,104 +0,0 @@
-from mako.template import Template
-from mako import lookup, exceptions, runtime
-from mako.util import FastEncodingBuffer
-from util import flatten_result, result_lines
-import unittest
-import os
-
-from test import TemplateTest, template_base, module_base, assert_raises_message
-
-tl = lookup.TemplateLookup(directories=[template_base])
-class LookupTest(unittest.TestCase):
-    def test_basic(self):
-        t = tl.get_template('index.html')
-        assert result_lines(t.render()) == [
-            "this is index"
-        ]
-    def test_subdir(self):
-        t = tl.get_template('/subdir/index.html')
-        assert result_lines(t.render()) == [
-            "this is sub index",
-            "this is include 2"
-
-        ]
-
-        assert tl.get_template('/subdir/index.html').module_id \
-                            == '_subdir_index_html'
- 
-    def test_updir(self):
-        t = tl.get_template('/subdir/foo/../bar/../index.html')
-        assert result_lines(t.render()) == [
-            "this is sub index",
-            "this is include 2"
-
-        ]
- 
-    def test_directory_lookup(self):
-        """test that hitting an existent directory still raises
-        LookupError."""
- 
-        self.assertRaises(exceptions.TopLevelLookupException,
-            tl.get_template, "/subdir"
-        )
- 
-    def test_no_lookup(self):
-        t = Template("hi <%include file='foo.html'/>")
-        try:
-            t.render()
-            assert False
-        except exceptions.TemplateLookupException, e:
-            assert str(e) == \
-                "Template 'memory:%s' has no TemplateLookup associated" % \
-                hex(id(t))
- 
-    def test_uri_adjust(self):
-        tl = lookup.TemplateLookup(directories=['/foo/bar'])
-        assert tl.filename_to_uri('/foo/bar/etc/lala/index.html') == \
-                        '/etc/lala/index.html'
-
-        tl = lookup.TemplateLookup(directories=['./foo/bar'])
-        assert tl.filename_to_uri('./foo/bar/etc/index.html') == \
-                        '/etc/index.html'
- 
-    def test_uri_cache(self):
-        """test that the _uri_cache dictionary is available"""
-        tl._uri_cache[('foo', 'bar')] = '/some/path'
-        assert tl._uri_cache[('foo', 'bar')] == '/some/path'
- 
-    def test_check_not_found(self):
-        tl = lookup.TemplateLookup()
-        tl.put_string("foo", "this is a template")
-        f = tl.get_template("foo")
-        assert f.uri in tl._collection
-        f.filename = "nonexistent"
-        self.assertRaises(exceptions.TemplateLookupException,
-            tl.get_template, "foo"
-        )
-        assert f.uri not in tl._collection
-
-    def test_dont_accept_relative_outside_of_root(self):
-        """test the mechanics of an include where 
-        the include goes outside of the path"""
-        tl = lookup.TemplateLookup(directories=[os.path.join(template_base, "subdir")])
-        index = tl.get_template("index.html")
-
-        ctx = runtime.Context(FastEncodingBuffer())
-        ctx._with_template=index
-
-        assert_raises_message(
-            exceptions.TemplateLookupException,
-           "Template uri \"../index.html\" is invalid - it "
-            "cannot be relative outside of the root path",
-            runtime._lookup_template, ctx, "../index.html", index.uri
-        )
-
-        assert_raises_message(
-            exceptions.TemplateLookupException,
-           "Template uri \"../othersubdir/foo.html\" is invalid - it "
-            "cannot be relative outside of the root path",
-            runtime._lookup_template, ctx, "../othersubdir/foo.html", index.uri
-        )
-
-        # this is OK since the .. cancels out
-        t = runtime._lookup_template(ctx, "foo/../index.html", index.uri)
-
diff --git a/lib/mako-0.7.2/test/test_loop.py b/lib/mako-0.7.2/test/test_loop.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_loop.py
+++ /dev/null
@@ -1,295 +0,0 @@
-import re
-import unittest
-
-from mako.template import Template
-from mako.lookup import TemplateLookup
-from mako.codegen import (
-        _FOR_LOOP, mangle_mako_loop, LoopVariable
-    )
-from mako.runtime import LoopStack, LoopContext
-from mako import exceptions
-from test import assert_raises_message
-from test import TemplateTest, eq_
-from util import flatten_result, result_lines
-
-class TestLoop(unittest.TestCase):
-
-    def test__FOR_LOOP(self):
-        for statement, target_list, expression_list in (
-                ('for x in y:', 'x', 'y'),
-                ('for x, y in z:', 'x, y', 'z'),
-                ('for (x,y) in z:', '(x,y)', 'z'),
-                ('for ( x, y, z) in a:', '( x, y, z)', 'a'),
-                ('for x in [1, 2, 3]:', 'x', '[1, 2, 3]'),
-                ('for x in "spam":', 'x', '"spam"'),
-                ('for k,v in dict(a=1,b=2).items():', 'k,v',
-                    'dict(a=1,b=2).items()'),
-                ('for x in [y+1 for y in [1, 2, 3]]:', 'x',
-                    '[y+1 for y in [1, 2, 3]]')
-                ):
-            match = _FOR_LOOP.match(statement)
-            assert match and match.groups() == (target_list, expression_list)
-
-    def test_no_loop(self):
-        template = Template("""% for x in 'spam':
-${x}
-% endfor""")
-        code = template.code
-        assert not re.match(r"loop = __M_loop._enter\(:", code), "No need to "\
-                "generate a loop context if the loop variable wasn't accessed"
-        print template.render()
-
-    def test_loop_demo(self):
-        template = Template("""x|index|reverse_index|first|last|cycle|even|odd
-% for x in 'ham':
-${x}|${loop.index}|${loop.reverse_index}|${loop.first}|${loop.last}|${loop.cycle('even', 'odd')}|${loop.even}|${loop.odd}
-% endfor""")
-        expected = [
-                "x|index|reverse_index|first|last|cycle|even|odd",
-                "h|0|2|True|False|even|True|False",
-                "a|1|1|False|False|odd|False|True",
-                "m|2|0|False|True|even|True|False"
-            ]
-        code = template.code
-        assert "loop = __M_loop._enter(" in code, "Generated a loop context since "\
-                "the loop variable was accessed"
-        rendered = template.render()
-        print rendered
-        for line in expected:
-            assert line in rendered, "Loop variables give information about "\
-                    "the progress of the loop"
-
-    def test_nested_loops(self):
-        template = Template("""% for x in 'ab':
-${x} ${loop.index} <- start in outer loop
-% for y in [0, 1]:
-${y} ${loop.index} <- go to inner loop
-% endfor
-${x} ${loop.index} <- back to outer loop
-% endfor""")
-        code = template.code
-        rendered = template.render()
-        expected = [
-                "a 0 <- start in outer loop",
-                "0 0 <- go to inner loop",
-                "1 1 <- go to inner loop",
-                "a 0 <- back to outer loop",
-                "b 1 <- start in outer loop",
-                "0 0 <- go to inner loop",
-                "1 1 <- go to inner loop",
-                "b 1 <- back to outer loop",
-            ]
-        for line in expected:
-            assert line in rendered, "The LoopStack allows you to take "\
-                    "advantage of the loop variable even in embedded loops"
-
-    def test_parent_loops(self):
-        template = Template("""% for x in 'ab':
-${x} ${loop.index} <- outer loop
-% for y in [0, 1]:
-${y} ${loop.index} <- inner loop
-${x} ${loop.parent.index} <- parent loop
-% endfor
-${x} ${loop.index} <- outer loop
-% endfor""")
-        code = template.code
-        rendered = template.render()
-        expected = [
-                "a 0 <- outer loop",
-                "a 0 <- parent loop",
-                "b 1 <- outer loop",
-                "b 1 <- parent loop"
-            ]
-        for line in expected:
-            print code
-            assert line in rendered, "The parent attribute of a loop gives "\
-                    "you the previous loop context in the stack"
-
-    def test_out_of_context_access(self):
-        template = Template("""${loop.index}""")
-        assert_raises_message(
-            exceptions.RuntimeException,
-            "No loop context is established",
-            template.render
-        )
-
-class TestLoopStack(unittest.TestCase):
-
-    def setUp(self):
-        self.stack = LoopStack()
-        self.bottom = 'spam'
-        self.stack.stack = [self.bottom]
-
-    def test_enter(self):
-        iterable = 'ham'
-        s = self.stack._enter(iterable)
-        assert s is self.stack.stack[-1], "Calling the stack with an iterable returns "\
-                "the stack"
-        assert iterable == self.stack.stack[-1]._iterable, "and pushes the "\
-                "iterable on the top of the stack"
-
-    def test__top(self):
-        assert self.bottom == self.stack._top, "_top returns the last item "\
-                "on the stack"
-
-    def test__pop(self):
-        assert len(self.stack.stack) == 1
-        top = self.stack._pop()
-        assert top == self.bottom
-        assert len(self.stack.stack) == 0
-
-    def test__push(self):
-        assert len(self.stack.stack) == 1
-        iterable = 'ham'
-        self.stack._push(iterable)
-        assert len(self.stack.stack) == 2
-        assert iterable is self.stack._top._iterable
-
-    def test_exit(self):
-        iterable = 'ham'
-        self.stack._enter(iterable)
-        before = len(self.stack.stack)
-        self.stack._exit()
-        after = len(self.stack.stack)
-        assert before == (after + 1), "Exiting a context pops the stack"
-
-
-class TestLoopContext(unittest.TestCase):
-
-    def setUp(self):
-        self.iterable = [1, 2, 3]
-        self.ctx = LoopContext(self.iterable)
-
-    def test___len__(self):
-        assert len(self.iterable) == len(self.ctx), "The LoopContext is the "\
-                "same length as the iterable"
-
-    def test_index(self):
-        expected = tuple(range(len(self.iterable)))
-        actual = tuple(self.ctx.index for i in self.ctx)
-        assert expected == actual, "The index is consistent with the current "\
-                "iteration count"
-
-    def test_reverse_index(self):
-        length = len(self.iterable)
-        expected = tuple([length-i-1 for i in range(length)])
-        actual = tuple(self.ctx.reverse_index for i in self.ctx)
-        print expected, actual
-        assert expected == actual, "The reverse_index is the number of "\
-                "iterations until the end"
-
-    def test_first(self):
-        expected = (True, False, False)
-        actual = tuple(self.ctx.first for i in self.ctx)
-        assert expected == actual, "first is only true on the first iteration"
-
-    def test_last(self):
-        expected = (False, False, True)
-        actual = tuple(self.ctx.last for i in self.ctx)
-        assert expected == actual, "last is only true on the last iteration"
-
-    def test_even(self):
-        expected = (True, False, True)
-        actual = tuple(self.ctx.even for i in self.ctx)
-        assert expected == actual, "even is true on even iterations"
-
-    def test_odd(self):
-        expected = (False, True, False)
-        actual = tuple(self.ctx.odd for i in self.ctx)
-        assert expected == actual, "odd is true on odd iterations"
-
-    def test_cycle(self):
-        expected = ('a', 'b', 'a')
-        actual = tuple(self.ctx.cycle('a', 'b') for i in self.ctx)
-        assert expected == actual, "cycle endlessly cycles through the values"
-
-class TestLoopFlags(TemplateTest):
-    def test_loop_disabled_template(self):
-        self._do_memory_test(
-        """
-            the loop: ${loop}
-        """, 
-        "the loop: hi",
-        template_args=dict(loop='hi'),
-        filters=flatten_result,
-        enable_loop=False
-        )
-
-    def test_loop_disabled_lookup(self):
-        l = TemplateLookup(enable_loop=False)
-        l.put_string("x",
-        """
-            the loop: ${loop}
-        """
-        )
-
-        self._do_test(
-            l.get_template("x"),
-            "the loop: hi",
-            template_args=dict(loop='hi'),
-            filters=flatten_result,
-        )
-
-    def test_loop_disabled_override_template(self):
-        self._do_memory_test(
-        """
-            <%page enable_loop="True" />
-            % for i in (1, 2, 3):
-                ${i} ${loop.index}
-            % endfor
-        """, 
-        "1 0 2 1 3 2",
-        template_args=dict(loop='hi'),
-        filters=flatten_result,
-        enable_loop=False
-        )
-
-    def test_loop_disabled_override_lookup(self):
-        l = TemplateLookup(enable_loop=False)
-        l.put_string("x",
-        """
-            <%page enable_loop="True" />
-            % for i in (1, 2, 3):
-                ${i} ${loop.index}
-            % endfor
-        """
-        )
-
-        self._do_test(
-            l.get_template("x"),
-            "1 0 2 1 3 2",
-            template_args=dict(loop='hi'),
-            filters=flatten_result,
-        )
-
-    def test_loop_enabled_override_template(self):
-        self._do_memory_test(
-        """
-            <%page enable_loop="True" />
-            % for i in (1, 2, 3):
-                ${i} ${loop.index}
-            % endfor
-        """, 
-        "1 0 2 1 3 2",
-        template_args=dict(),
-        filters=flatten_result,
-        )
-
-    def test_loop_enabled_override_lookup(self):
-        l = TemplateLookup()
-        l.put_string("x",
-        """
-            <%page enable_loop="True" />
-            % for i in (1, 2, 3):
-                ${i} ${loop.index}
-            % endfor
-        """
-        )
-
-        self._do_test(
-            l.get_template("x"),
-            "1 0 2 1 3 2",
-            template_args=dict(),
-            filters=flatten_result,
-        )
-
diff --git a/lib/mako-0.7.2/test/test_lru.py b/lib/mako-0.7.2/test/test_lru.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_lru.py
+++ /dev/null
@@ -1,111 +0,0 @@
-from mako.util import LRUCache
-import string, unittest, time, random
-
-import thread
-
-class item:
-    def __init__(self, id):
-        self.id = id
-
-    def __str__(self):
-        return "item id %d" % self.id
-
-class LRUTest(unittest.TestCase):
-
-
-    def testlru(self): 
-        l = LRUCache(10, threshold=.2)
- 
-        for id in range(1,20):
-            l[id] = item(id)
- 
-        # first couple of items should be gone
-        self.assert_(not l.has_key(1)) 
-        self.assert_(not l.has_key(2))
- 
-        # next batch over the threshold of 10 should be present
-        for id in range(11,20):
-            self.assert_(l.has_key(id))
-
-        l[12]
-        l[15]
-        l[23] = item(23)
-        l[24] = item(24)
-        l[25] = item(25)
-        l[26] = item(26)
-        l[27] = item(27)
-
-        self.assert_(not l.has_key(11))
-        self.assert_(not l.has_key(13))
- 
-        for id in (25, 24, 23, 14, 12, 19, 18, 17, 16, 15):
-            self.assert_(l.has_key(id)) 
-
-    def _disabled_test_threaded(self):
-        size = 100
-        threshold = .5
-        all_elems = 2000
-        hot_zone = range(30,40)
-        cache = LRUCache(size, threshold)
- 
-        # element to store
-        class Element(object):
-            def __init__(self, id):
-                self.id = id
-                self.regets = 0
- 
-        # return an element.  we will favor ids in the relatively small
-        # "hot zone" 25% of  the time.
-        def get_elem():
-            if random.randint(1,4) == 1:
-                return hot_zone[random.randint(0, len(hot_zone) - 1)]
-            else:
-                return random.randint(1, all_elems)
- 
-        total = [0]
-        # request thread.
-        def request_elem():
-            while True:
-                total[0] += 1
-                id = get_elem()
-                try:
-                    elem = cache[id]
-                    elem.regets += 1
-                except KeyError:
-                    e = Element(id)
-                    cache[id] = e
- 
-                time.sleep(random.random() / 1000)
-
-        for x in range(0,20):
-            thread.start_new_thread(request_elem, ())
- 
-        # assert size doesn't grow unbounded, doesnt shrink well below size
-        for x in range(0,5):
-            time.sleep(1)
-            print "size:", len(cache)
-            assert len(cache) < size + size * threshold * 2
-            assert len(cache) > size - (size * .1)
- 
-        # computs the average number of times a range of elements were "reused",
-        # i.e. without being removed from the cache.
-        def average_regets_in_range(start, end):
-            elem = [e for e in cache.values() if e.id >= start and e.id <= end]
-            if len(elem) == 0:
-                return 0
-            avg = sum([e.regets for e in elem]) / len(elem)
-            return avg
-
-        hotzone_avg = average_regets_in_range(30, 40)
-        control_avg = average_regets_in_range(450,760)
-        total_avg = average_regets_in_range(0, 2000)
- 
-        # hotzone should be way above the others
-        print "total fetches", total[0], "hotzone", \
-                                hotzone_avg, "control", \
-                                control_avg, "total", total_avg
- 
-        assert hotzone_avg > total_avg * 5 > control_avg * 5
- 
- 
-
diff --git a/lib/mako-0.7.2/test/test_namespace.py b/lib/mako-0.7.2/test/test_namespace.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_namespace.py
+++ /dev/null
@@ -1,792 +0,0 @@
-from mako.template import Template
-from mako import lookup
-from util import flatten_result, result_lines
-from test import TemplateTest, eq_
-
-class NamespaceTest(TemplateTest):
-    def test_inline_crossreference(self):
-        self._do_memory_test(
-            """
-            <%namespace name="x">
-                <%def name="a()">
-                    this is x a
-                </%def>
-                <%def name="b()">
-                    this is x b, and heres ${a()}
-                </%def>
-            </%namespace>
- 
-            ${x.a()}
- 
-            ${x.b()}
-    """,
-            "this is x a this is x b, and heres this is x a",
-            filters=flatten_result
-        )
-
-    def test_inline_assignment(self):
-        self._do_memory_test(
-            """
-            <%namespace name="x">
-                <%def name="a()">
-                    <%
-                        x = 5
-                    %>
-                    this is x: ${x}
-                </%def>
-            </%namespace>
-
-            ${x.a()}
-
-    """,
-            "this is x: 5",
-            filters=flatten_result
-        )
-
-    def test_inline_arguments(self):
-        self._do_memory_test(
-            """
-            <%namespace name="x">
-                <%def name="a(x, y)">
-                    <%
-                        result = x * y
-                    %>
-                    result: ${result}
-                </%def>
-            </%namespace>
-
-            ${x.a(5, 10)}
-
-    """,
-            "result: 50",
-            filters=flatten_result
-        )
-
-    def test_inline_not_duped(self):
-        self._do_memory_test(
-            """
-            <%namespace name="x">
-                <%def name="a()">
-                    foo
-                </%def>
-            </%namespace>
-
-            <%
-                assert x.a is not UNDEFINED, "namespace x.a wasn't defined"
-                assert a is UNDEFINED, "name 'a' is in the body locals"
-            %>
-
-    """,
-            "",
-            filters=flatten_result
-        )
-
-    def test_dynamic(self):
-        collection = lookup.TemplateLookup()
-
-        collection.put_string('a', """
-        <%namespace name="b" file="${context['b_def']}"/>
-
-        a.  b: ${b.body()}
-""")
-
-        collection.put_string('b', """
-        b.
-""")
-
-        eq_(
-            flatten_result(collection.get_template('a').render(b_def='b')),
-            "a. b: b."
-        )
- 
-    def test_template(self):
-        collection = lookup.TemplateLookup()
-
-        collection.put_string('main.html', """
-        <%namespace name="comp" file="defs.html"/>
- 
-        this is main.  ${comp.def1("hi")}
-        ${comp.def2("there")}
-""")
-
-        collection.put_string('defs.html', """
-        <%def name="def1(s)">
-            def1: ${s}
-        </%def>
- 
-        <%def name="def2(x)">
-            def2: ${x}
-        </%def>
-""")
-
-        assert flatten_result(collection.get_template('main.html').render()) == "this is main. def1: hi def2: there"
- 
-    def test_module(self):
-        collection = lookup.TemplateLookup()
-
-        collection.put_string('main.html', """
-        <%namespace name="comp" module="test.sample_module_namespace"/>
-
-        this is main.  ${comp.foo1()}
-        ${comp.foo2("hi")}
-""")
-
-        assert flatten_result(collection.get_template('main.html').render()) == "this is main. this is foo1. this is foo2, x is hi"
-
-    def test_module_2(self):
-        collection = lookup.TemplateLookup()
-
-        collection.put_string('main.html', """
-        <%namespace name="comp" module="test.foo.test_ns"/>
-
-        this is main.  ${comp.foo1()}
-        ${comp.foo2("hi")}
-""")
-
-        assert flatten_result(collection.get_template('main.html').render()) == "this is main. this is foo1. this is foo2, x is hi"
-
-    def test_module_imports(self):
-        collection = lookup.TemplateLookup()
-
-        collection.put_string('main.html', """
-        <%namespace import="*" module="test.foo.test_ns"/>
-
-        this is main.  ${foo1()}
-        ${foo2("hi")}
-""")
-
-        assert flatten_result(collection.get_template('main.html').render()) == "this is main. this is foo1. this is foo2, x is hi"
-
-    def test_module_imports_2(self):
-        collection = lookup.TemplateLookup()
-
-        collection.put_string('main.html', """
-        <%namespace import="foo1, foo2" module="test.foo.test_ns"/>
-
-        this is main.  ${foo1()}
-        ${foo2("hi")}
-""")
-
-        assert flatten_result(collection.get_template('main.html').render()) == "this is main. this is foo1. this is foo2, x is hi"
- 
-    def test_context(self):
-        """test that namespace callables get access to the current context"""
-        collection = lookup.TemplateLookup()
-
-        collection.put_string('main.html', """
-        <%namespace name="comp" file="defs.html"/>
-
-        this is main.  ${comp.def1()}
-        ${comp.def2("there")}
-""")
-
-        collection.put_string('defs.html', """
-        <%def name="def1()">
-            def1: x is ${x}
-        </%def>
-
-        <%def name="def2(x)">
-            def2: x is ${x}
-        </%def>
-""")
-
-        assert flatten_result(collection.get_template('main.html').render(x="context x")) == "this is main. def1: x is context x def2: x is there"
- 
-    def test_overload(self):
-        collection = lookup.TemplateLookup()
-
-        collection.put_string('main.html', """
-        <%namespace name="comp" file="defs.html">
-            <%def name="def1(x, y)">
-                overridden def1 ${x}, ${y}
-            </%def>
-        </%namespace>
-
-        this is main.  ${comp.def1("hi", "there")}
-        ${comp.def2("there")}
-    """)
-
-        collection.put_string('defs.html', """
-        <%def name="def1(s)">
-            def1: ${s}
-        </%def>
-
-        <%def name="def2(x)">
-            def2: ${x}
-        </%def>
-    """)
-
-        assert flatten_result(collection.get_template('main.html').render()) == "this is main. overridden def1 hi, there def2: there"
-
-    def test_getattr(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("main.html", """
-            <%namespace name="foo" file="ns.html"/>
-            <%
-                 if hasattr(foo, 'lala'):
-                     foo.lala()
-                 if not hasattr(foo, 'hoho'):
-                     context.write('foo has no hoho.')
-            %>
-         """)
-        collection.put_string("ns.html", """
-          <%def name="lala()">this is lala.</%def>
-        """)
-        assert flatten_result(collection.get_template("main.html").render()) == "this is lala.foo has no hoho."
-
-    def test_in_def(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("main.html", """
-            <%namespace name="foo" file="ns.html"/>
- 
-            this is main.  ${bar()}
-            <%def name="bar()">
-                this is bar, foo is ${foo.bar()}
-            </%def>
-        """)
- 
-        collection.put_string("ns.html", """
-            <%def name="bar()">
-                this is ns.html->bar
-            </%def>
-        """)
-
-        assert result_lines(collection.get_template("main.html").render()) == [
-            "this is main.",
-            "this is bar, foo is" ,
-            "this is ns.html->bar"
-        ]
-
-
-    def test_in_remote_def(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("main.html", """
-            <%namespace name="foo" file="ns.html"/>
-
-            this is main.  ${bar()}
-            <%def name="bar()">
-                this is bar, foo is ${foo.bar()}
-            </%def>
-        """)
-
-        collection.put_string("ns.html", """
-            <%def name="bar()">
-                this is ns.html->bar
-            </%def>
-        """)
- 
-        collection.put_string("index.html", """
-            <%namespace name="main" file="main.html"/>
- 
-            this is index
-            ${main.bar()}
-        """)
-
-        assert result_lines(collection.get_template("index.html").render()) == [ 
-            "this is index",
-            "this is bar, foo is" ,
-            "this is ns.html->bar"
-        ]
- 
-    def test_dont_pollute_self(self):
-        # test that get_namespace() doesn't modify the original context
-        # incompatibly
- 
-        collection = lookup.TemplateLookup()
-        collection.put_string("base.html", """
-
-        <%def name="foo()">
-        <%
-            foo = local.get_namespace("foo.html")
-        %>
-        </%def>
-
-        name: ${self.name}
-        name via bar: ${bar()}
-
-        ${next.body()}
-
-        name: ${self.name}
-        name via bar: ${bar()}
-        <%def name="bar()">
-            ${self.name}
-        </%def>
-
-
-        """)
-
-        collection.put_string("page.html", """
-        <%inherit file="base.html"/>
-
-        ${self.foo()}
-
-        hello world
-
-        """)
-
-        collection.put_string("foo.html", """<%inherit file="base.html"/>""")
-        assert result_lines(collection.get_template("page.html").render()) == [
-            "name: self:page.html",
-            "name via bar:",
-            "self:page.html",
-            "hello world",
-            "name: self:page.html",
-            "name via bar:",
-            "self:page.html"
-        ]
- 
-    def test_inheritance(self):
-        """test namespace initialization in a base inherited template that doesnt otherwise access the namespace"""
-        collection = lookup.TemplateLookup()
-        collection.put_string("base.html", """
-            <%namespace name="foo" file="ns.html" inheritable="True"/>
- 
-            ${next.body()}
-""")
-        collection.put_string("ns.html", """
-            <%def name="bar()">
-                this is ns.html->bar
-            </%def>
-        """)
-
-        collection.put_string("index.html", """
-            <%inherit file="base.html"/>
- 
-            this is index
-            ${self.foo.bar()}
-        """)
- 
-        assert result_lines(collection.get_template("index.html").render()) == [
-            "this is index",
-            "this is ns.html->bar"
-        ]
-
-    def test_inheritance_two(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("base.html", """
-            <%def name="foo()">
-                base.foo
-            </%def>
- 
-            <%def name="bat()">
-                base.bat
-            </%def>
-""")
-        collection.put_string("lib.html", """
-            <%inherit file="base.html"/>
-            <%def name="bar()">
-                lib.bar
-                ${parent.foo()}
-                ${self.foo()}
-                ${parent.bat()}
-                ${self.bat()}
-            </%def>
- 
-            <%def name="foo()">
-                lib.foo
-            </%def>
- 
-        """)
-
-        collection.put_string("front.html", """
-            <%namespace name="lib" file="lib.html"/>
-            ${lib.bar()}
-        """)
-
-        assert result_lines(collection.get_template("front.html").render()) == ['lib.bar', 'base.foo', 'lib.foo', 'base.bat', 'base.bat']
-
-    def test_attr(self):
-        l = lookup.TemplateLookup()
-
-        l.put_string("foo.html", """
-        <%!
-            foofoo = "foo foo"
-            onlyfoo = "only foo"
-        %>
-        <%inherit file="base.html"/>
-        <%def name="setup()">
-            <%
-            self.attr.foolala = "foo lala"
-            %>
-        </%def>
-        ${self.attr.basefoo}
-        ${self.attr.foofoo}
-        ${self.attr.onlyfoo}
-        ${self.attr.lala}
-        ${self.attr.foolala}
-        """)
-
-        l.put_string("base.html", """
-        <%!
-            basefoo = "base foo 1"
-            foofoo = "base foo 2"
-        %>
-        <%
-            self.attr.lala = "base lala"
-        %>
- 
-        ${self.attr.basefoo}
-        ${self.attr.foofoo}
-        ${self.attr.onlyfoo}
-        ${self.attr.lala}
-        ${self.setup()}
-        ${self.attr.foolala}
-        body
-        ${self.body()}
-        """)
-
-        assert result_lines(l.get_template("foo.html").render()) == [
-            "base foo 1",
-            "foo foo",
-            "only foo",
-            "base lala",
-            "foo lala",
-            "body",
-            "base foo 1",
-            "foo foo",
-            "only foo",
-            "base lala",
-            "foo lala",
-        ]
- 
-    def test_attr_raise(self):
-        l = lookup.TemplateLookup()
-
-        l.put_string("foo.html", """
-            <%def name="foo()">
-            </%def>
-        """)
-
-        l.put_string("bar.html", """
-        <%namespace name="foo" file="foo.html"/>
- 
-        ${foo.notfoo()}
-        """)
-
-        self.assertRaises(AttributeError, l.get_template("bar.html").render)
- 
-    def test_custom_tag_1(self):
-        template = Template("""
- 
-            <%def name="foo(x, y)">
-                foo: ${x} ${y}
-            </%def>
- 
-            <%self:foo x="5" y="${7+8}"/>
-        """)
-        assert result_lines(template.render()) == ['foo: 5 15']
-
-    def test_custom_tag_2(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("base.html", """
-            <%def name="foo(x, y)">
-                foo: ${x} ${y}
-            </%def>
- 
-            <%def name="bat(g)"><%
-                return "the bat! %s" % g
-            %></%def>
- 
-            <%def name="bar(x)">
-                ${caller.body(z=x)}
-            </%def>
-        """)
- 
-        collection.put_string("index.html", """
-            <%namespace name="myns" file="base.html"/>
- 
-            <%myns:foo x="${'some x'}" y="some y"/>
- 
-            <%myns:bar x="${myns.bat(10)}" args="z">
-                record: ${z}
-            </%myns:bar>
- 
-        """)
- 
-        assert result_lines(collection.get_template("index.html").render()) == [
-            'foo: some x some y', 
-            'record: the bat! 10'
-        ]
- 
-    def test_custom_tag_3(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("base.html", """
-            <%namespace name="foo" file="ns.html" inheritable="True"/>
-
-            ${next.body()}
-    """)
-        collection.put_string("ns.html", """
-            <%def name="bar()">
-                this is ns.html->bar
-                caller body: ${caller.body()}
-            </%def>
-        """)
-
-        collection.put_string("index.html", """
-            <%inherit file="base.html"/>
-
-            this is index
-            <%self.foo:bar>
-                call body
-            </%self.foo:bar>
-        """)
- 
-        assert result_lines(collection.get_template("index.html").render()) == [
-            "this is index",
-            "this is ns.html->bar",
-            "caller body:",
-            "call body"
-        ]
- 
-    def test_custom_tag_case_sensitive(self):
-        t = Template("""
-        <%def name="renderPanel()">
-            panel ${caller.body()}
-        </%def>
-
-        <%def name="renderTablePanel()">
-            <%self:renderPanel>
-                hi
-            </%self:renderPanel>
-        </%def>
- 
-        <%self:renderTablePanel/>
-        """)
-        assert result_lines(t.render()) == ['panel', 'hi']
- 
- 
-    def test_expr_grouping(self):
-        """test that parenthesis are placed around string-embedded expressions."""
- 
-        template = Template("""
-            <%def name="bar(x, y)">
-                ${x}
-                ${y}
-            </%def>
- 
-            <%self:bar x=" ${foo} " y="x${g and '1' or '2'}y"/>
-        """, input_encoding='utf-8')
-
-        # the concat has to come out as "x + (g and '1' or '2') + y"
-        assert result_lines(template.render(foo='this is foo', g=False)) == [
-            "this is foo",
-            "x2y"
-        ]
-
- 
-    def test_ccall(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("base.html", """
-            <%namespace name="foo" file="ns.html" inheritable="True"/>
-
-            ${next.body()}
-    """)
-        collection.put_string("ns.html", """
-            <%def name="bar()">
-                this is ns.html->bar
-                caller body: ${caller.body()}
-            </%def>
-        """)
-
-        collection.put_string("index.html", """
-            <%inherit file="base.html"/>
-
-            this is index
-            <%call expr="self.foo.bar()">
-                call body
-            </%call>
-        """)
-
-        assert result_lines(collection.get_template("index.html").render()) == [
-            "this is index",
-            "this is ns.html->bar",
-            "caller body:",
-            "call body"
-        ]
-
-    def test_ccall_2(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("base.html", """
-            <%namespace name="foo" file="ns1.html" inheritable="True"/>
-
-            ${next.body()}
-    """)
-        collection.put_string("ns1.html", """
-            <%namespace name="foo2" file="ns2.html"/>
-            <%def name="bar()">
-                <%call expr="foo2.ns2_bar()">
-                this is ns1.html->bar
-                caller body: ${caller.body()}
-                </%call>
-            </%def>
-        """)
-
-        collection.put_string("ns2.html", """
-            <%def name="ns2_bar()">
-                this is ns2.html->bar
-                caller body: ${caller.body()}
-            </%def>
-        """)
-
-        collection.put_string("index.html", """
-            <%inherit file="base.html"/>
-
-            this is index
-            <%call expr="self.foo.bar()">
-                call body
-            </%call>
-        """)
-
-        assert result_lines(collection.get_template("index.html").render()) == [
-            "this is index",
-            "this is ns2.html->bar",
-            "caller body:",
-            "this is ns1.html->bar",
-            "caller body:",
-            "call body"
-        ]
-
-    def test_import(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("functions.html","""
-            <%def name="foo()">
-                this is foo
-            </%def>
- 
-            <%def name="bar()">
-                this is bar
-            </%def>
- 
-            <%def name="lala()">
-                this is lala
-            </%def>
-        """)
-
-        collection.put_string("func2.html", """
-            <%def name="a()">
-                this is a
-            </%def>
-            <%def name="b()">
-                this is b
-            </%def>
-        """)
-        collection.put_string("index.html", """
-            <%namespace file="functions.html" import="*"/>
-            <%namespace file="func2.html" import="a, b"/>
-            ${foo()}
-            ${bar()}
-            ${lala()}
-            ${a()}
-            ${b()}
-            ${x}
-        """)
-
-        assert result_lines(collection.get_template("index.html").render(bar="this is bar", x="this is x")) == [
-            "this is foo",
-            "this is bar",
-            "this is lala",
-            "this is a",
-            "this is b",
-            "this is x"
-        ]
- 
-    def test_import_calledfromdef(self):
-        l = lookup.TemplateLookup()
-        l.put_string("a", """
-        <%def name="table()">
-            im table
-        </%def>
-        """)
-
-        l.put_string("b","""
-        <%namespace file="a" import="table"/>
-
-        <%
-            def table2():
-                table()
-                return ""
-        %>
-
-        ${table2()}
-        """)
-
-        t = l.get_template("b")
-        assert flatten_result(t.render()) == "im table"
- 
-    def test_closure_import(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("functions.html","""
-            <%def name="foo()">
-                this is foo
-            </%def>
- 
-            <%def name="bar()">
-                this is bar
-            </%def>
-        """)
- 
-        collection.put_string("index.html", """
-            <%namespace file="functions.html" import="*"/>
-            <%def name="cl1()">
-                ${foo()}
-            </%def>
- 
-            <%def name="cl2()">
-                ${bar()}
-            </%def>
- 
-            ${cl1()}
-            ${cl2()}
-        """)
-        assert result_lines(collection.get_template("index.html").render(bar="this is bar", x="this is x")) == [
-            "this is foo",
-            "this is bar",
-        ]
-
-    def test_import_local(self):
-        t = Template("""
-            <%namespace import="*">
-                <%def name="foo()">
-                    this is foo
-                </%def>
-            </%namespace>
- 
-            ${foo()}
- 
-        """)
-        assert flatten_result(t.render()) == "this is foo"
- 
-    def test_ccall_import(self):
-        collection = lookup.TemplateLookup()
-        collection.put_string("functions.html","""
-            <%def name="foo()">
-                this is foo
-            </%def>
- 
-            <%def name="bar()">
-                this is bar.
-                ${caller.body()}
-                ${caller.lala()}
-            </%def>
-        """)
- 
-        collection.put_string("index.html", """
-            <%namespace name="func" file="functions.html" import="*"/>
-            <%call expr="bar()">
-                this is index embedded
-                foo is ${foo()}
-                <%def name="lala()">
-                     this is lala ${foo()}
-                </%def>
-            </%call>
-        """)
-        #print collection.get_template("index.html").code
-        #print collection.get_template("functions.html").code
-        assert result_lines(collection.get_template("index.html").render()) == [
-            "this is bar.",
-            "this is index embedded",
-            "foo is",
-            "this is foo",
-            "this is lala",
-            "this is foo"
-        ]
diff --git a/lib/mako-0.7.2/test/test_pygen.py b/lib/mako-0.7.2/test/test_pygen.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_pygen.py
+++ /dev/null
@@ -1,252 +0,0 @@
-import unittest
-
-from mako.pygen import PythonPrinter, adjust_whitespace
-from StringIO import StringIO
-
-class GeneratePythonTest(unittest.TestCase):
-    def test_generate_normal(self):
-        stream = StringIO()
-        printer = PythonPrinter(stream)
-        printer.writeline("import lala")
-        printer.writeline("for x in foo:")
-        printer.writeline("print x")
-        printer.writeline(None)
-        printer.writeline("print y")
-        assert stream.getvalue() == \
-"""import lala
-for x in foo:
-    print x
-print y
-"""
-    def test_generate_adjusted(self):
-        block = """
-        x = 5 +6
-        if x > 7:
-            for y in range(1,5):
-                print "<td>%s</td>" % y
-"""
-        stream = StringIO()
-        printer = PythonPrinter(stream)
-        printer.write_indented_block(block)
-        printer.close()
-        #print stream.getvalue()
-        assert stream.getvalue() == \
-"""
-x = 5 +6
-if x > 7:
-    for y in range(1,5):
-        print "<td>%s</td>" % y
-
-"""
-    def test_generate_combo(self):
-        block = \
-"""
-                x = 5 +6
-                if x > 7:
-                    for y in range(1,5):
-                        print "<td>%s</td>" % y
-                    print "hi"
-                print "there"
-                foo(lala)
-        """
-        stream = StringIO()
-        printer = PythonPrinter(stream)
-        printer.writeline("import lala")
-        printer.writeline("for x in foo:")
-        printer.writeline("print x")
-        printer.write_indented_block(block)
-        printer.writeline(None)
-        printer.writeline("print y")
-        printer.close()
-        #print "->" + stream.getvalue().replace(' ', '#') + "<-"
-        assert stream.getvalue() == \
-"""import lala
-for x in foo:
-    print x
-
-    x = 5 +6
-    if x > 7:
-        for y in range(1,5):
-            print "<td>%s</td>" % y
-        print "hi"
-    print "there"
-    foo(lala)
-        
-print y
-"""
-    def test_multi_line(self):
-        block = \
-"""
-    if test:
-        print ''' this is a block of stuff.
-this is more stuff in the block.
-and more block.
-'''
-        do_more_stuff(g)
-"""
-        stream = StringIO()
-        printer = PythonPrinter(stream)
-        printer.write_indented_block(block)
-        printer.close()
-        #print stream.getvalue()
-        assert stream.getvalue() == \
-"""
-if test:
-    print ''' this is a block of stuff.
-this is more stuff in the block.
-and more block.
-'''
-    do_more_stuff(g)
-
-"""
-    
-    def test_false_unindentor(self):
-        stream = StringIO()
-        printer = PythonPrinter(stream)
-        for line in [
-            "try:",
-            "elsemyvar = 12",
-            "if True:",
-            "print 'hi'",
-            None,
-            "finally:",
-            "dosomething",
-            None
-        ]:
-            printer.writeline(line)
-        
-        assert stream.getvalue() == \
-"""try:
-    elsemyvar = 12
-    if True:
-        print 'hi'
-finally:
-    dosomething
-"""    , stream.getvalue()
-        
-        
-    def test_backslash_line(self):
-        block = \
-"""
-            # comment
-    if test:
-        if (lala + hoho) + \\
-(foobar + blat) == 5:
-            print "hi"
-    print "more indent"
-"""
-        stream = StringIO()
-        printer = PythonPrinter(stream)
-        printer.write_indented_block(block)
-        printer.close()
-        assert stream.getvalue() == \
-"""
-            # comment
-if test:
-    if (lala + hoho) + \\
-(foobar + blat) == 5:
-        print "hi"
-print "more indent"
-
-"""
-
-class WhitespaceTest(unittest.TestCase):
-    def test_basic(self):
-        text = """
-        for x in range(0,15):
-            print x
-        print "hi"
-        """
-        assert adjust_whitespace(text) == \
-"""
-for x in range(0,15):
-    print x
-print "hi"
-"""
-
-    def test_blank_lines(self):
-        text = """
-    print "hi"  # a comment
-    
-    # more comments
-    
-    print g
-"""
-        assert adjust_whitespace(text) == \
-"""
-print "hi"  # a comment
-
-# more comments
-
-print g
-"""
-
-    def test_open_quotes_with_pound(self):
-        text = '''
-        print """  this is text
-          # and this is text
-        # and this is too """
-'''
-        assert adjust_whitespace(text) == \
-'''
-print """  this is text
-          # and this is text
-        # and this is too """
-'''
-
-    def test_quote_with_comments(self):
-        text= """
-            print 'hi'
-            # this is a comment
-            # another comment
-            x = 7 # someone's '''comment
-            print '''
-        there
-        '''
-            # someone else's comment
-"""
-
-        assert adjust_whitespace(text) == \
-"""
-print 'hi'
-# this is a comment
-# another comment
-x = 7 # someone's '''comment
-print '''
-        there
-        '''
-# someone else's comment
-"""
-
-
-    def test_quotes_with_pound(self):
-        text = '''
-        if True:
-            """#"""
-        elif False:
-            "bar"
-'''
-        assert adjust_whitespace(text) == \
-'''
-if True:
-    """#"""
-elif False:
-    "bar"
-'''
-
-    def test_quotes(self):
-        text = """
-        print ''' aslkjfnas kjdfn
-askdjfnaskfd fkasnf dknf sadkfjn asdkfjna sdakjn
-asdkfjnads kfajns '''
-        if x:
-            print y
-"""
-        assert adjust_whitespace(text) == \
-"""
-print ''' aslkjfnas kjdfn
-askdjfnaskfd fkasnf dknf sadkfjn asdkfjna sdakjn
-asdkfjnads kfajns '''
-if x:
-    print y
-"""
diff --git a/lib/mako-0.7.2/test/test_template.py b/lib/mako-0.7.2/test/test_template.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_template.py
+++ /dev/null
@@ -1,1241 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from mako.template import Template, ModuleTemplate
-from mako.lookup import TemplateLookup
-from mako.ext.preprocessors import convert_comments
-from mako import exceptions, util, runtime
-import re
-import os
-from util import flatten_result, result_lines
-import codecs
-from test import TemplateTest, eq_, template_base, module_base, \
-    skip_if, assert_raises, assert_raises_message
-
-class EncodingTest(TemplateTest):
-    def test_escapes_html_tags(self):
-        from mako.exceptions import html_error_template
-
-        x = Template("""
-        X:
-        <% raise Exception('<span style="color:red">Foobar</span>') %>
-        """)
-
-        try:
-            x.render()
-        except:
-            # <h3>Exception: <span style="color:red">Foobar</span></h3>
-            markup = html_error_template().render(full=False, css=False)
-            if util.py3k:
-                assert '<span style="color:red">Foobar</span></h3>'\
-                            .encode('ascii') not in markup
-                assert '<span style="color:red"'\
-                            '>Foobar</span>'\
-                            .encode('ascii') in markup
-            else:
-                assert '<span style="color:red">Foobar</span></h3>' \
-                            not in markup
-                assert '<span style="color:red"'\
-                            '>Foobar</span>' in markup
-
-    def test_unicode(self):
-        self._do_memory_test(
-            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
-            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
-        )
-
-    def test_encoding_doesnt_conflict(self):
-        self._do_memory_test(
-            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
-            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
-            output_encoding='utf-8'
-        )
- 
-    def test_unicode_arg(self):
-        val = u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
-        self._do_memory_test(
-            "${val}",
-            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
-            template_args={'val':val}
-        )
-
-    def test_unicode_file(self):
-        self._do_file_test(
-            "unicode.html",
-            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
-        )
-
-    def test_unicode_file_code(self):
-        self._do_file_test(
-            'unicode_code.html',
-            u"""hi, drôle de petite voix m’a réveillé.""",
-            filters=flatten_result
-        )
-
-    def test_unicode_file_lookup(self):
-        lookup = TemplateLookup(
-                    directories=[template_base], 
-                    output_encoding='utf-8', 
-                    default_filters=['decode.utf8'])
-        if util.py3k:
-            template = lookup.get_template('/chs_unicode_py3k.html')
-        else:
-            template = lookup.get_template('/chs_unicode.html')
-        eq_(
-            flatten_result(template.render_unicode(name='毛泽东')),
-            u'毛泽东 是 新中国的主席<br/> Welcome 你 to 北京.'
-        )
-
-    def test_unicode_bom(self):
-        self._do_file_test(
-            'bom.html',
-            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
-        )
-
-        self._do_file_test(
-            'bommagic.html',
-            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
-        )
-
-        self.assertRaises(
-            exceptions.CompileException,
-            Template, filename=self._file_path('badbom.html'),
-            module_directory=module_base
-        )
-
-    def test_unicode_memory(self):
-        val = u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
-        self._do_memory_test(
-            ("## -*- coding: utf-8 -*-\n" + val).encode('utf-8'),
-            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
-        )
- 
-    def test_unicode_text(self):
-        val = u"""<%text>Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »</%text>"""
-        self._do_memory_test(
-            ("## -*- coding: utf-8 -*-\n" + val).encode('utf-8'),
-            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"""
-        )
-
-    def test_unicode_text_ccall(self):
-        val = u"""
-        <%def name="foo()">
-            ${capture(caller.body)}
-        </%def>
-        <%call expr="foo()">
-        <%text>Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »</%text>
-        </%call>"""
-        self._do_memory_test(
-            ("## -*- coding: utf-8 -*-\n" + val).encode('utf-8'),
-            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
-            filters=flatten_result
-        )
- 
-    def test_unicode_literal_in_expr(self):
-        if util.py3k:
-            self._do_memory_test(
-                u"""## -*- coding: utf-8 -*-
-                ${"Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"}
-                """.encode('utf-8'),
-                u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
-                filters = lambda s:s.strip()
-            )
-        else:
-            self._do_memory_test(
-                u"""## -*- coding: utf-8 -*-
-                ${u"Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »"}
-                """.encode('utf-8'),
-                u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
-                filters = lambda s:s.strip()
-            )
-
-    def test_unicode_literal_in_expr_file(self):
-        self._do_file_test(
-            'unicode_expr.html',
-            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
-            lambda t:t.strip()
-        )
-
-    def test_unicode_literal_in_code(self):
-        if util.py3k:
-            self._do_memory_test(
-                u"""## -*- coding: utf-8 -*-
-                <%
-                    context.write("Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »")
-                %>
-                """.encode('utf-8'),
-                u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
-                filters=lambda s:s.strip()
-            )
-        else:
-            self._do_memory_test(
-                u"""## -*- coding: utf-8 -*-
-                <%
-                    context.write(u"Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »")
-                %>
-                """.encode('utf-8'),
-                u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
-                filters=lambda s:s.strip()
-            )
- 
-    def test_unicode_literal_in_controlline(self):
-        if util.py3k:
-            self._do_memory_test(
-                u"""## -*- coding: utf-8 -*-
-                <%
-                    x = "drôle de petite voix m’a réveillé."
-                %>
-                % if x=="drôle de petite voix m’a réveillé.":
-                    hi, ${x}
-                % endif
-                """.encode('utf-8'),
-                u"""hi, drôle de petite voix m’a réveillé.""",
-                filters=lambda s:s.strip(),
-            )
-        else:
-            self._do_memory_test(
-                u"""## -*- coding: utf-8 -*-
-                <%
-                    x = u"drôle de petite voix m’a réveillé."
-                %>
-                % if x==u"drôle de petite voix m’a réveillé.":
-                    hi, ${x}
-                % endif
-                """.encode('utf-8'),
-                u"""hi, drôle de petite voix m’a réveillé.""",
-                filters=lambda s:s.strip(),
-            )
- 
-    def test_unicode_literal_in_tag(self):
-        self._do_file_test(
-            "unicode_arguments.html",
-            [
-                u'x is: drôle de petite voix m’a réveillé',
-                u'x is: drôle de petite voix m’a réveillé',
-                u'x is: drôle de petite voix m’a réveillé',
-                u'x is: drôle de petite voix m’a réveillé',
-            ],
-            filters=result_lines
-        )
-
-        self._do_memory_test(
-            open(self._file_path("unicode_arguments.html"), 'rb').read(),
-            [
-                u'x is: drôle de petite voix m’a réveillé',
-                u'x is: drôle de petite voix m’a réveillé',
-                u'x is: drôle de petite voix m’a réveillé',
-                u'x is: drôle de petite voix m’a réveillé',
-            ],
-            filters=result_lines
-        )
- 
-    def test_unicode_literal_in_def(self):
-        if util.py3k:
-            self._do_memory_test(
-                u"""## -*- coding: utf-8 -*-
-                <%def name="bello(foo, bar)">
-                Foo: ${ foo }
-                Bar: ${ bar }
-                </%def>
-                <%call expr="bello(foo='árvíztűrő tükörfúrógép', bar='ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP')">
-                </%call>""".encode('utf-8'),
-                u"""Foo: árvíztűrő tükörfúrógép Bar: ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP""",
-                filters=flatten_result
-            )
-
-            self._do_memory_test(
-                u"""## -*- coding: utf-8 -*-
-                <%def name="hello(foo='árvíztűrő tükörfúrógép', bar='ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP')">
-                Foo: ${ foo }
-                Bar: ${ bar }
-                </%def>
-                ${ hello() }""".encode('utf-8'),
-                u"""Foo: árvíztűrő tükörfúrógép Bar: ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP""",
-                filters=flatten_result
-            )
-        else:
-            self._do_memory_test(
-                u"""## -*- coding: utf-8 -*-
-                <%def name="bello(foo, bar)">
-                Foo: ${ foo }
-                Bar: ${ bar }
-                </%def>
-                <%call expr="bello(foo=u'árvíztűrő tükörfúrógép', bar=u'ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP')">
-                </%call>""".encode('utf-8'),
-                u"""Foo: árvíztűrő tükörfúrógép Bar: ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP""",
-                filters=flatten_result
-            )
- 
-            self._do_memory_test(
-                u"""## -*- coding: utf-8 -*-
-                <%def name="hello(foo=u'árvíztűrő tükörfúrógép', bar=u'ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP')">
-                Foo: ${ foo }
-                Bar: ${ bar }
-                </%def>
-                ${ hello() }""".encode('utf-8'),
-                u"""Foo: árvíztűrő tükörfúrógép Bar: ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP""",
-                filters=flatten_result
-            )
- 
-    def test_input_encoding(self):
-        """test the 'input_encoding' flag on Template, and that unicode 
-            objects arent double-decoded"""
- 
-        if util.py3k:
-            self._do_memory_test(
-                u"hello ${f('śląsk')}",
-                u"hello śląsk",
-                input_encoding='utf-8',
-                template_args={'f':lambda x:x}
-            ) 
-
-            self._do_memory_test(
-                u"## -*- coding: utf-8 -*-\nhello ${f('śląsk')}",
-                u"hello śląsk",
-                template_args={'f':lambda x:x}
-            )
-        else:
-            self._do_memory_test(
-                u"hello ${f(u'śląsk')}",
-                u"hello śląsk",
-                input_encoding='utf-8',
-                template_args={'f':lambda x:x}
-            ) 
-
-            self._do_memory_test(
-                u"## -*- coding: utf-8 -*-\nhello ${f(u'śląsk')}",
-                u"hello śląsk",
-                template_args={'f':lambda x:x}
-            )
-
-    def test_raw_strings(self):
-        """test that raw strings go straight thru with default_filters turned off,
-        bytestring_passthrough enabled.
-        
-        """
-
-        self._do_memory_test(
-            u"## -*- coding: utf-8 -*-\nhello ${x}",
-            "hello śląsk",
-            default_filters=[],
-            template_args={'x':'śląsk'},
-            unicode_=False,
-            bytestring_passthrough=True,
-            output_encoding=None #'ascii'
-        )
-
-        # now, the way you *should* be doing it....
-        self._do_memory_test(
-            u"## -*- coding: utf-8 -*-\nhello ${x}",
-            u"hello śląsk",
-            template_args={'x':u'śląsk'}
-        )
- 
-    def test_encoding(self):
-        self._do_memory_test(
-            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""",
-            u"""Alors vous imaginez ma surprise, au lever du jour, quand une drôle de petite voix m’a réveillé. Elle disait: « S’il vous plaît… dessine-moi un mouton! »""".encode('utf-8'),
-            output_encoding='utf-8',
-            unicode_=False
-        )
-
-    def test_encoding_errors(self):
-        self._do_memory_test(
-            u"""KGB (transliteration of "КГБ") is the Russian-language abbreviation for Committee for State Security, (Russian: Комит́ет Госуд́арственной Безоп́асности (help·info); Komitet Gosudarstvennoy Bezopasnosti)""",
-            u"""KGB (transliteration of "КГБ") is the Russian-language abbreviation for Committee for State Security, (Russian: Комит́ет Госуд́арственной Безоп́асности (help·info); Komitet Gosudarstvennoy Bezopasnosti)""".encode('iso-8859-1', 'replace'),
-            output_encoding='iso-8859-1', encoding_errors='replace',
-            unicode_=False
-        )
- 
-    def test_read_unicode(self):
-        lookup = TemplateLookup(directories=[template_base], 
-                                filesystem_checks=True, output_encoding='utf-8')
-        if util.py3k:
-            template = lookup.get_template('/read_unicode_py3k.html')
-        else:
-            template = lookup.get_template('/read_unicode.html')
-        # TODO: I've no idea what encoding this file is, Python 3.1.2 
-        # won't read the file even with open(...encoding='utf-8') unless
-        # errors is specified.   or if there's some quirk in 3.1.2
-        # since I'm pretty sure this test worked with py3k when I wrote it.
-        data = template.render(path=self._file_path('internationalization.html'))
-
-    @skip_if(lambda: util.py3k)
-    def test_bytestring_passthru(self):
-        self._do_file_test(
-            'chs_utf8.html',
-            '毛泽东 是 新中国的主席<br/> Welcome 你 to 北京. Welcome 你 to 北京.',
-            default_filters=[],
-            disable_unicode=True,
-            output_encoding=None,
-            template_args={'name':'毛泽东'},
-            filters=flatten_result, 
-            unicode_=False
-        )
-
-        self._do_file_test(
-            'chs_utf8.html',
-            '毛泽东 是 新中国的主席<br/> Welcome 你 to 北京. Welcome 你 to 北京.',
-            disable_unicode=True,
-            output_encoding=None,
-            template_args={'name':'毛泽东'},
-            filters=flatten_result,
-            unicode_=False
-        )
-
-        template = self._file_template('chs_utf8.html', 
-                    output_encoding=None,
-                    disable_unicode=True)
-        self.assertRaises(UnicodeDecodeError, template.render_unicode, name='毛泽东')
-
-        template = Template(
-            "${'Alors vous imaginez ma surprise, au lever"
-            " du jour, quand une drôle de petite voix m’a "
-            "réveillé. Elle disait: « S’il vous plaît… "
-            "dessine-moi un mouton! »'}", 
-            output_encoding=None,
-            disable_unicode=True, input_encoding='utf-8')
-        assert template.render() == "Alors vous imaginez ma surprise, "\
-                "au lever du jour, quand une drôle de petite "\
-                "voix m’a réveillé. Elle disait: « S’il vous "\
-                "plaît… dessine-moi un mouton! »"
-        template = Template(
-                "${'Alors vous imaginez ma surprise, au "
-                "lever du jour, quand une drôle de petite "
-                "voix m’a réveillé. Elle disait: « S’il "
-                "vous plaît… dessine-moi un mouton! »'}", 
-                input_encoding='utf8', output_encoding='utf8', 
-                disable_unicode=False, default_filters=[])
-        # raises because expression contains an encoded bytestring which cannot be decoded
-        self.assertRaises(UnicodeDecodeError, template.render)
-
-
-class PageArgsTest(TemplateTest):
-    def test_basic(self):
-        template = Template("""
-            <%page args="x, y, z=7"/>
- 
-            this is page, ${x}, ${y}, ${z}
-""")
-
-        assert flatten_result(template.render(x=5, y=10)) == "this is page, 5, 10, 7"
-        assert flatten_result(template.render(x=5, y=10, z=32)) == "this is page, 5, 10, 32"
-        try:
-            template.render(y=10)
-            assert False
-        except TypeError, e:
-            assert True
- 
-    def test_inherits(self):
-        lookup = TemplateLookup()
-        lookup.put_string("base.tmpl",
-        """
-        <%page args="bar" />
-        ${bar}
-        ${pageargs['foo']}
-        ${self.body(**pageargs)}
-        """
-        )
-        lookup.put_string("index.tmpl", """
-        <%inherit file="base.tmpl" />
-        <%page args="variable" />
-        ${variable}
-        """)
-
-        self._do_test(
-            lookup.get_template("index.tmpl"),
-            "bar foo var",
-            filters=flatten_result,
-            template_args={'variable':'var', 'bar':'bar', 'foo':'foo'}
- 
-        )
-
-    def test_includes(self):
-        lookup = TemplateLookup()
-        lookup.put_string("incl1.tmpl",
-        """
-        <%page args="bar" />
-        ${bar}
-        ${pageargs['foo']}
-        """
-        )
-        lookup.put_string("incl2.tmpl",
-        """
-        ${pageargs}
-        """
-        )
-        lookup.put_string("index.tmpl", """
-        <%include file="incl1.tmpl" args="**pageargs"/>
-        <%page args="variable" />
-        ${variable}
-        <%include file="incl2.tmpl" />
-        """)
-
-        self._do_test(
-            lookup.get_template("index.tmpl"),
-            "bar foo var {}",
-            filters=flatten_result,
-            template_args={'variable':'var', 'bar':'bar', 'foo':'foo'}
-
-        )
-
-    def test_context_small(self):
-        ctx = runtime.Context([].append, x=5, y=4)
-        eq_(sorted(ctx.keys()), ['caller', 'capture', 'x', 'y'])
-
-    def test_with_context(self):
-        template = Template("""
-            <%page args="x, y, z=7"/>
-
-            this is page, ${x}, ${y}, ${z}, ${w}
-""")
-        #print template.code
-        assert flatten_result(template.render(x=5, y=10, w=17)) == "this is page, 5, 10, 7, 17"
-
-    def test_overrides_builtins(self):
-        template = Template("""
-            <%page args="id"/>
- 
-            this is page, id is ${id}
-        """)
- 
-        assert flatten_result(template.render(id="im the id")) == "this is page, id is im the id"
- 
-    def test_canuse_builtin_names(self):
-        template = Template("""
-            exception: ${Exception}
-            id: ${id}
-        """)
-        assert flatten_result(template.render(id='some id', Exception='some exception')) == "exception: some exception id: some id"
-
-    def test_builtin_names_dont_clobber_defaults_in_includes(self):
-        lookup = TemplateLookup()
-        lookup.put_string("test.mako", 
-        """
-        <%include file="test1.mako"/>
-
-        """)
-
-        lookup.put_string("test1.mako", """
-        <%page args="id='foo'"/>
-
-        ${id}
-        """)
-
-        for template in ("test.mako", "test1.mako"):
-            assert flatten_result(lookup.get_template(template).render()) == "foo"
-            assert flatten_result(lookup.get_template(template).render(id=5)) == "5"
-            assert flatten_result(lookup.get_template(template).render(id=id)) == "<built-in function id>"
- 
-    def test_dict_locals(self):
-        template = Template("""
-            <%
-                dict = "this is dict"
-                locals = "this is locals"
-            %>
-            dict: ${dict}
-            locals: ${locals}
-        """)
-        assert flatten_result(template.render()) == "dict: this is dict locals: this is locals"
-
-class IncludeTest(TemplateTest):
-    def test_basic(self):
-        lookup = TemplateLookup()
-        lookup.put_string("a", """
-            this is a
-            <%include file="b" args="a=3,b=4,c=5"/>
-        """)
-        lookup.put_string("b", """
-            <%page args="a,b,c"/>
-            this is b.  ${a}, ${b}, ${c}
-        """)
-        assert flatten_result(lookup.get_template("a").render()) == "this is a this is b. 3, 4, 5"
-
-    def test_localargs(self):
-        lookup = TemplateLookup()
-        lookup.put_string("a", """
-            this is a
-            <%include file="b" args="a=a,b=b,c=5"/>
-        """)
-        lookup.put_string("b", """
-            <%page args="a,b,c"/>
-            this is b.  ${a}, ${b}, ${c}
-        """)
-        assert flatten_result(lookup.get_template("a").render(a=7,b=8)) == "this is a this is b. 7, 8, 5"
- 
-    def test_viakwargs(self): 
-        lookup = TemplateLookup()
-        lookup.put_string("a", """
-            this is a
-            <%include file="b" args="c=5, **context.kwargs"/>
-        """)
-        lookup.put_string("b", """
-            <%page args="a,b,c"/>
-            this is b.  ${a}, ${b}, ${c}
-        """)
-        #print lookup.get_template("a").code
-        assert flatten_result(lookup.get_template("a").render(a=7,b=8)) == "this is a this is b. 7, 8, 5"
-
-    def test_include_withargs(self):
-        lookup = TemplateLookup()
-        lookup.put_string("a", """
-            this is a
-            <%include file="${i}" args="c=5, **context.kwargs"/>
-        """)
-        lookup.put_string("b", """
-            <%page args="a,b,c"/>
-            this is b.  ${a}, ${b}, ${c}
-        """)
-        assert flatten_result(lookup.get_template("a").render(a=7,b=8,i='b')) == "this is a this is b. 7, 8, 5"
- 
-    def test_within_ccall(self):
-        lookup = TemplateLookup()
-        lookup.put_string("a", """this is a""")
-        lookup.put_string("b", """
-        <%def name="bar()">
-            bar: ${caller.body()}
-            <%include file="a"/>
-        </%def>
-        """)
-        lookup.put_string("c", """
-        <%namespace name="b" file="b"/>
-        <%b:bar>
-            calling bar
-        </%b:bar>
-        """)
-        assert flatten_result(lookup.get_template("c").render()) == "bar: calling bar this is a"
-
-class UndefinedVarsTest(TemplateTest):
-    def test_undefined(self):
-        t = Template("""
-            % if x is UNDEFINED:
-                undefined
-            % else:
-                x: ${x}
-            % endif
-        """)
- 
-        assert result_lines(t.render(x=12)) == ["x: 12"]
-        assert result_lines(t.render(y=12)) == ["undefined"]
-
-    def test_strict(self):
-        t = Template("""
-            % if x is UNDEFINED:
-                undefined
-            % else:
-                x: ${x}
-            % endif
-        """, strict_undefined=True)
- 
-        assert result_lines(t.render(x=12)) == ['x: 12']
- 
-        assert_raises(
-            NameError,
-            t.render, y=12
-        )
- 
-        l = TemplateLookup(strict_undefined=True)
-        l.put_string("a", "some template")
-        l.put_string("b", """
-            <%namespace name='a' file='a' import='*'/>
-            % if x is UNDEFINED:
-                undefined
-            % else:
-                x: ${x}
-            % endif
-        """)
-
-        assert result_lines(t.render(x=12)) == ['x: 12']
- 
-        assert_raises(
-            NameError,
-            t.render, y=12
-        )
- 
-    def test_expression_declared(self):
-        t = Template("""
-            ${",".join([t for t in ("a", "b", "c")])}
-        """, strict_undefined=True)
- 
-        eq_(result_lines(t.render()), ['a,b,c'])
-
-        t = Template("""
-            <%self:foo value="${[(val, n) for val, n in [(1, 2)]]}"/>
- 
-            <%def name="foo(value)">
-                ${value}
-            </%def>
- 
-        """, strict_undefined=True)
- 
-        eq_(result_lines(t.render()), ['[(1, 2)]'])
-
-        t = Template("""
-            <%call expr="foo(value=[(val, n) for val, n in [(1, 2)]])" />
- 
-            <%def name="foo(value)">
-                ${value}
-            </%def>
- 
-        """, strict_undefined=True)
- 
-        eq_(result_lines(t.render()), ['[(1, 2)]'])
- 
-        l = TemplateLookup(strict_undefined=True)
-        l.put_string("i", "hi, ${pageargs['y']}")
-        l.put_string("t", """
-            <%include file="i" args="y=[x for x in range(3)]" />
-        """)
-        eq_(
-            result_lines(l.get_template("t").render()), ['hi, [0, 1, 2]']
-        )
- 
-        l.put_string('q', """
-            <%namespace name="i" file="${(str([x for x in range(3)][2]) + 'i')[-1]}" />
-            ${i.body(y='x')}
-        """)
-        eq_(
-            result_lines(l.get_template("q").render()), ['hi, x']
-        )
-
-        t = Template("""
-            <%
-                y = lambda q: str(q)
-            %>
-            ${y('hi')}
-        """, strict_undefined=True)
-        eq_(
-            result_lines(t.render()), ["hi"]
-        )
-
-    def test_list_comprehensions_plus_undeclared_nonstrict(self):
-        # traditional behavior.  variable inside a list comprehension
-        # is treated as an "undefined", so is pulled from the context.
-        t = Template("""
-            t is: ${t}
- 
-            ${",".join([t for t in ("a", "b", "c")])}
-        """)
- 
-        eq_(
-            result_lines(t.render(t="T")),
-            ['t is: T', 'a,b,c'] 
-        )
- 
-    def test_traditional_assignment_plus_undeclared(self):
-        t = Template("""
-            t is: ${t}
- 
-            <%
-                t = 12
-            %>
-        """)
-        assert_raises(
-            UnboundLocalError,
-            t.render, t="T"
-        )
- 
-    def test_list_comprehensions_plus_undeclared_strict(self):
-        # with strict, a list comprehension now behaves
-        # like the undeclared case above.
-        t = Template("""
-            t is: ${t}
- 
-            ${",".join([t for t in ("a", "b", "c")])}
-        """, strict_undefined=True)
- 
-        eq_(
-            result_lines(t.render(t="T")),
-            ['t is: T', 'a,b,c']
-        )
-
-class ReservedNameTest(TemplateTest):
-    def test_names_on_context(self):
-        for name in ('context', 'loop', 'UNDEFINED'):
-            assert_raises_message(
-                exceptions.NameConflictError,
-                r"Reserved words passed to render\(\): %s" % name,
-                Template("x").render, **{name:'foo'}
-            )
-
-    def test_names_in_template(self):
-        for name in ('context', 'loop', 'UNDEFINED'):
-            assert_raises_message(
-                exceptions.NameConflictError,
-                r"Reserved words declared in template: %s" % name,
-                Template, "<%% %s = 5 %%>" % name
-            )
-
-    def test_exclude_loop_context(self):
-        self._do_memory_test(
-            "loop is ${loop}",
-            "loop is 5",
-            template_args=dict(loop=5),
-            enable_loop=False
-        )
-
-    def test_exclude_loop_template(self):
-        self._do_memory_test(
-            "<% loop = 12 %>loop is ${loop}",
-            "loop is 12",
-            enable_loop=False
-        )
- 
-class ControlTest(TemplateTest):
-    def test_control(self):
-        t = Template("""
-    ## this is a template.
-    % for x in y:
-    %   if 'test' in x:
-        yes x has test
-    %   else:
-        no x does not have test
-    %endif
-    %endfor
-""")
-        assert result_lines(t.render(y=[{'test':'one'}, {'foo':'bar'}, {'foo':'bar', 'test':'two'}])) == [
-            "yes x has test",
-            "no x does not have test",
-            "yes x has test"
-        ]
- 
-    def test_blank_control_1(self):
-        self._do_memory_test(
-            """
-            % if True:
-            % endif
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
- 
-    def test_blank_control_2(self):
-        self._do_memory_test(
-            """
-            % if True:
-            % elif True:
-            % endif
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
- 
-    def test_blank_control_3(self):
-        self._do_memory_test(
-            """
-            % if True:
-            % else:
-            % endif
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
- 
-    def test_blank_control_4(self):
-        self._do_memory_test(
-            """
-            % if True:
-            % elif True:
-            % else:
-            % endif
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
- 
-    def test_blank_control_5(self):
-        self._do_memory_test(
-            """
-            % for x in range(10):
-            % endfor
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
- 
-    def test_blank_control_6(self):
-        self._do_memory_test(
-            """
-            % while False:
-            % endwhile
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
- 
-    def test_blank_control_7(self):
-        self._do_memory_test(
-            """
-            % try:
-            % except:
-            % endtry
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
- 
-    @skip_if(lambda: not util.py26)
-    def test_blank_control_8(self):
-        self._do_memory_test(
-            """
-            % with open('x', 'w') as fp:
-            % endwith
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
-
-    def test_commented_blank_control_1(self):
-        self._do_memory_test(
-            """
-            % if True:
-            ## comment
-            % endif
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
- 
-    def test_commented_blank_control_2(self):
-        self._do_memory_test(
-            """
-            % if True:
-            ## comment
-            % elif True:
-            ## comment
-            % endif
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
- 
-    def test_commented_blank_control_3(self):
-        self._do_memory_test(
-            """
-            % if True:
-            ## comment
-            % else:
-            ## comment
-            % endif
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
- 
-    def test_commented_blank_control_4(self):
-        self._do_memory_test(
-            """
-            % if True:
-            ## comment
-            % elif True:
-            ## comment
-            % else:
-            ## comment
-            % endif
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
- 
-    def test_commented_blank_control_5(self):
-        self._do_memory_test(
-            """
-            % for x in range(10):
-            ## comment
-            % endfor
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
- 
-    def test_commented_blank_control_6(self):
-        self._do_memory_test(
-            """
-            % while False:
-            ## comment
-            % endwhile
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
- 
-    def test_commented_blank_control_7(self):
-        self._do_memory_test(
-            """
-            % try:
-            ## comment
-            % except:
-            ## comment
-            % endtry
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
- 
-    @skip_if(lambda: not util.py26)
-    def test_commented_blank_control_8(self):
-        self._do_memory_test(
-            """
-            % with open('x', 'w') as fp:
-            ## comment
-            % endwith
-            """,
-            "",
-            filters=lambda s:s.strip()
-        )
- 
-    def test_multiline_control(self):
-        t = Template("""
-    % for x in \\
-        [y for y in [1,2,3]]:
-        ${x}
-    % endfor
-""")
-        #print t.code
-        assert flatten_result(t.render()) == "1 2 3"
- 
-class GlobalsTest(TemplateTest):
-    def test_globals(self):
-        self._do_memory_test(
-            """
-                <%!
-                    y = "hi"
-                %>
-            y is ${y}
-            """,
-            "y is hi",
-            filters=lambda t:t.strip()
-        )
-
-class RichTracebackTest(TemplateTest):
- 
-    def _do_test_traceback(self, utf8, memory, syntax):
-        if memory:
-            if syntax:
-                source = u'## coding: utf-8\n<% print "m’a réveillé. '\
-                        u'Elle disait: « S’il vous plaît… dessine-moi un mouton! » %>'
-            else:
-                source = u'## coding: utf-8\n<% print u"m’a réveillé. '\
-                        u'Elle disait: « S’il vous plaît… dessine-moi un mouton! »" + str(5/0) %>'
-            if utf8:
-                source = source.encode('utf-8')
-            else:
-                source = source
-            templateargs = {'text':source}
-        else:
-            if syntax:
-                filename = 'unicode_syntax_error.html'
-            else:
-                filename = 'unicode_runtime_error.html'
-            source = open(self._file_path(filename), 'rb').read()
-            if not utf8:
-                source = source.decode('utf-8')
-            templateargs = {'filename':self._file_path(filename)}
-        try:
-            template = Template(**templateargs)
-            if not syntax:
-                template.render_unicode()
-            assert False
-        except Exception, e:
-            tback = exceptions.RichTraceback()
-            if utf8:
-                assert tback.source == source.decode('utf-8')
-            else:
-                assert tback.source == source
-
-for utf8 in (True, False):
-    for memory in (True, False):
-        for syntax in (True, False):
-            def _do_test(self):
-                self._do_test_traceback(utf8, memory, syntax)
-            name = 'test_%s_%s_%s' % (utf8 and 'utf8' or 'unicode', 
-                                        memory and 'memory' or 'file', 
-                                        syntax and 'syntax' or 'runtime')
-            _do_test.__name__ = name
-            setattr(RichTracebackTest, name, _do_test)
-            del _do_test
-
-class ModuleDirTest(TemplateTest):
-    def tearDown(self):
-        import shutil
-        shutil.rmtree(module_base, True)
-
-    def test_basic(self):
-        t = self._file_template("modtest.html")
-        t2 = self._file_template('subdir/modtest.html')
-
-        eq_(
-            t.module.__file__,
-            os.path.join(module_base, 'modtest.html.py')
-        )
-        eq_(
-            t2.module.__file__,
-            os.path.join(module_base, 'subdir', 'modtest.html.py')
-        )
- 
-    def test_callable(self):
-        def get_modname(filename, uri):
-            return os.path.join(
-                        module_base, 
-                        os.path.dirname(uri)[1:], 
-                        'foo', 
-                        os.path.basename(filename) + ".py")
-
-        lookup = TemplateLookup(template_base, modulename_callable=get_modname)
-        t = lookup.get_template('/modtest.html')
-        t2 = lookup.get_template('/subdir/modtest.html')
-        eq_(
-            t.module.__file__, 
-            os.path.join(module_base, 'foo', 'modtest.html.py')
-        )
-        eq_(
-            t2.module.__file__, 
-            os.path.join(module_base, 'subdir', 'foo', 'modtest.html.py')
-        )
-
-    def test_custom_writer(self):
-        canary = []
-        def write_module(source, outputpath):
-            f = open(outputpath, 'wb')
-            canary.append(outputpath)
-            f.write(source)
-            f.close()
-        lookup = TemplateLookup(template_base, module_writer=write_module, 
-                                            module_directory=module_base)
-        t = lookup.get_template('/modtest.html')
-        t2 = lookup.get_template('/subdir/modtest.html')
-        eq_(
-            canary,
-            [os.path.join(module_base, "modtest.html.py"),
-            os.path.join(module_base, "subdir/modtest.html.py")]
-        )
-
-class FilenameToURITest(TemplateTest):
-    def test_windows_paths(self):
-        """test that windows filenames are handled appropriately by Template."""
- 
-        current_path = os.path
-        import ntpath
-        os.path = ntpath
-        try:
-            class NoCompileTemplate(Template):
-                def _compile_from_file(self, path, filename):
-                    self.path = path
-                    return Template("foo bar").module
- 
-            t1 = NoCompileTemplate(
-                                    filename="c:\\foo\\template.html", 
-                                    module_directory="c:\\modules\\")
- 
-            eq_(t1.uri, "/foo/template.html")
-            eq_(t1.path, "c:\\modules\\foo\\template.html.py")
-
-            t1 = NoCompileTemplate(
-                                    filename="c:\\path\\to\\templates\\template.html", 
-                                    uri = "/bar/template.html",
-                                    module_directory="c:\\modules\\")
- 
-            eq_(t1.uri, "/bar/template.html")
-            eq_(t1.path, "c:\\modules\\bar\\template.html.py")
-
-        finally:
-            os.path = current_path
-
-    def test_posix_paths(self):
-        """test that posixs filenames are handled appropriately by Template."""
-
-        current_path = os.path
-        import posixpath
-        os.path = posixpath
-        try:
-            class NoCompileTemplate(Template):
-                def _compile_from_file(self, path, filename):
-                    self.path = path
-                    return Template("foo bar").module
-
-            t1 = NoCompileTemplate(
-                                    filename="/var/www/htdocs/includes/template.html", 
-                                    module_directory="/var/lib/modules")
-
-            eq_(t1.uri, "/var/www/htdocs/includes/template.html")
-            eq_(t1.path, "/var/lib/modules/var/www/htdocs/includes/template.html.py")
-
-            t1 = NoCompileTemplate(
-                                    filename="/var/www/htdocs/includes/template.html", 
-                                    uri = "/bar/template.html",
-                                    module_directory="/var/lib/modules")
-
-            eq_(t1.uri, "/bar/template.html")
-            eq_(t1.path, "/var/lib/modules/bar/template.html.py")
-
-        finally:
-            os.path = current_path
- 
-    def test_dont_accept_relative_outside_of_root(self):
-        assert_raises_message(
-            exceptions.TemplateLookupException,
-            "Template uri \"../../foo.html\" is invalid - it "
-            "cannot be relative outside of the root path",
-            Template, "test", uri="../../foo.html", 
-        )
-
-        assert_raises_message(
-            exceptions.TemplateLookupException,
-            "Template uri \"/../../foo.html\" is invalid - it "
-            "cannot be relative outside of the root path",
-            Template, "test", uri="/../../foo.html", 
-        )
-
-        # normalizes in the root is OK
-        t = Template("test", uri="foo/bar/../../foo.html")
-        eq_(t.uri, "foo/bar/../../foo.html")
-
-
-class ModuleTemplateTest(TemplateTest):
-    def test_module_roundtrip(self):
-        lookup = TemplateLookup()
-
-        template = Template("""
-        <%inherit file="base.html"/>
- 
-        % for x in range(5):
-            ${x}
-        % endfor
-""", lookup=lookup)
-
-        base = Template("""
-        This is base.
-        ${self.body()}
-""", lookup=lookup)
-
-        lookup.put_template("base.html", base)
-        lookup.put_template("template.html", template)
- 
-        assert result_lines(template.render()) == [
-            "This is base.", "0", "1", "2", "3", "4"
-        ]
- 
-        lookup = TemplateLookup()
-        template = ModuleTemplate(template.module, lookup=lookup)
-        base = ModuleTemplate(base.module, lookup=lookup)
-
-        lookup.put_template("base.html", base)
-        lookup.put_template("template.html", template)
- 
-        assert result_lines(template.render()) == [
-            "This is base.", "0", "1", "2", "3", "4"
-        ]
- 
- 
-class PreprocessTest(TemplateTest):
-    def test_old_comments(self):
-        t = Template("""
-        im a template
-# old style comment
-    # more old style comment
- 
-    ## new style comment
-    - # not a comment
-    - ## not a comment
-""", preprocessor=convert_comments)
-
-        assert flatten_result(t.render()) == "im a template - # not a comment - ## not a comment"
diff --git a/lib/mako-0.7.2/test/test_tgplugin.py b/lib/mako-0.7.2/test/test_tgplugin.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_tgplugin.py
+++ /dev/null
@@ -1,42 +0,0 @@
-import unittest
-
-from mako.ext.turbogears import TGPlugin
-from util import flatten_result, result_lines
-from test import TemplateTest, template_base
-
-tl = TGPlugin(options=dict(directories=[template_base]), extension='html')
-
-class TestTGPlugin(TemplateTest):
-    def test_basic(self):
-        t = tl.load_template('/index.html')
-        assert result_lines(t.render()) == [
-            "this is index"
-        ]
-    def test_subdir(self):
-        t = tl.load_template('/subdir/index.html')
-        assert result_lines(t.render()) == [
-            "this is sub index",
-            "this is include 2"
-
-        ]
-
-        assert tl.load_template('/subdir/index.html').module_id == '_subdir_index_html'
-
-    def test_basic_dot(self):
-        t = tl.load_template('index')
-        assert result_lines(t.render()) == [
-            "this is index"
-        ]
-    def test_subdir_dot(self):
-        t = tl.load_template('subdir.index')
-        assert result_lines(t.render()) == [
-            "this is sub index",
-            "this is include 2"
-
-        ]
-
-        assert tl.load_template('subdir.index').module_id == '_subdir_index_html'
- 
-    def test_string(self):
-        t = tl.load_template('foo', "hello world")
-        assert t.render() == "hello world"
diff --git a/lib/mako-0.7.2/test/test_util.py b/lib/mako-0.7.2/test/test_util.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/test_util.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import os
-import unittest
-from mako import util
-from test import eq_
-
-class UtilTest(unittest.TestCase):
-    def test_fast_buffer_write(self):
-        buf = util.FastEncodingBuffer()
-        buf.write("string a ")
-        buf.write("string b")
-        eq_(buf.getvalue(), "string a string b")
-
-    def test_fast_buffer_truncate(self):
-        buf = util.FastEncodingBuffer()
-        buf.write("string a ")
-        buf.write("string b")
-        buf.truncate()
-        buf.write("string c ")
-        buf.write("string d")
-        eq_(buf.getvalue(), "string c string d")
-
-    def test_fast_buffer_encoded(self):
-        s = u"drôl m’a rée « S’il"
-        buf = util.FastEncodingBuffer(encoding='utf-8')
-        buf.write(s[0:10])
-        buf.write(s[10:])
-        q = buf.getvalue()
-        eq_(buf.getvalue(), s.encode('utf-8'))
-
-    def test_read_file(self):
-        fn = os.path.join(os.path.dirname(__file__), 'test_util.py')
-        data = util.read_file(fn, 'rb')
-        self.failUnless('test_util' in str(data)) # str() for py3k
-
-    def test_load_module(self):
-        fn = os.path.join(os.path.dirname(__file__), 'test_util.py')
-        module = util.load_module('mako.template', fn)
-        import mako.template
-        self.assertEqual(module, mako.template)
diff --git a/lib/mako-0.7.2/test/util.py b/lib/mako-0.7.2/test/util.py
deleted file mode 100644
--- a/lib/mako-0.7.2/test/util.py
+++ /dev/null
@@ -1,7 +0,0 @@
-import re
-
-def flatten_result(result):
-    return re.sub(r'[\s\r\n]+', ' ', result).strip()
-
-def result_lines(result):
-    return [x.strip() for x in re.split(r'\r?\n', re.sub(r' +', ' ', result)) if x.strip() != '']
\ No newline at end of file
diff --git a/perf.py b/perf.py
--- a/perf.py
+++ b/perf.py
@@ -1500,7 +1500,7 @@
 
 def MeasureMakoV2(python, options):
     bm_path = Relative("performance/bm_mako_v2.py", python, options)
-    mako_path = Relative("lib/mako-0.7.2", python, options)
+    mako_path = Relative("lib/Mako-0.7.3", python, options)
     bm_env = BuildEnv({"PYTHONPATH": mako_path}, options.inherit_env)
     return MeasureGeneric(python, options, bm_path, bm_env,
                           iteration_scaling=10)

-- 
Repository URL: http://hg.python.org/benchmarks


More information about the Python-checkins mailing list