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

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
A string formatter.

:class:`Formatter` extends the advanced string formatter described in
:pep:`3101` and implemented in Python versions greater than 2.5. It
provides hooks that simplify token conversion (:attr:`converters`) and
recognize special template variables (:attr:`markers`). Since it uses
:meth:`str._formatter_parser` (implemented in C in the standard interpreter)
to parse the input string, it should also perform relatively well.

src/p/t/ptemplate-0.1.2/lib/ptemplate/template.py   ptemplate(Download)
"""
 
from ptemplate.formatter import Formatter
from ptemplate.util import logger
 
    def __init__(self, extra_vars_func=None, options=None, template=''):
        self.log = logger(__name__, self)
        self.options = options
        self.template = template
        self.formatter = Formatter()