This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from chameleon import PageTemplate | |
template = PageTemplate("Hello, ${name}.") | |
for name in ('Fred', u'ἃc', '\xf8'): | |
print(template(name=name)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# with pyramid tweak (and 80-column wrapping) | |
import time | |
import sys | |
import StringIO | |
class Bench(object): | |
def __init__(self, flags=None): | |
''' Flags: | |
* cgi: Build a new app every time. |