Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(1)  |  Derive(1)  |  Import(4)
A templater.

:class:`Template` wraps :class:`ptemplate.formatter.Formatter` with a
_`Buffet`-compatible _`interface`. In addition to the standard Buffet
arguments (*extra_vars_func*, *options*), the constructor accepts a
*template* string. This string is the template that will be rendered later
(by a call to :meth:`render`).

.. _Buffet:     http://pypi.python.org/pypi/Buffet/
.. _interface:  http://docs.turbogears.org/1.0/TemplatePlugins

src/p/t/ptemplate-0.1.2/lib/ptemplate/ctemplate.py   ptemplate(Download)
"""
 
from ptemplate.template import Template
from ptemplate.util import logger
 
__all__ = ["CTemplate"]
 
class CTemplate(Template):

src/p/t/ptemplate-0.1.2/tests/bench/basic.py   ptemplate(Download)
def ptemplate(dirname, verbose=False):
    import cgi
    try:
        from ptemplate.template import Template
    except ImportError:
        return lambda: None
 
    def read(fname):
        f = open(os.path.join(dirname, fname), 'r')
        template = Template(template=f.read())

src/p/t/ptemplate-0.1.2/tests/test_template.py   ptemplate(Download)
from tests import ModifierTest, TemplateTest
 
from ptemplate.template import Template
 
class TestTemplate(TemplateTest):

src/p/t/ptemplate-0.1.2/tests/bench/bigtable.py   ptemplate(Download)
 
try:
    from ptemplate.template import Template as PTemplate
except ImportError:
    PTemplate = None