Popular recipes tagged "meta:loc=318"http://code.activestate.com/recipes/tags/meta:loc=318/2009-04-29T09:11:31-07:00ActiveState Code RecipesPure Python implementation of PEP 380 (yield from) -- Optimized (Python)
2009-04-29T09:11:31-07:00profjimhttp://code.activestate.com/recipes/users/4169991/http://code.activestate.com/recipes/576728-pure-python-implementation-of-pep-380-yield-from-o/
<p style="color: grey">
Python
recipe 576728
by <a href="/recipes/users/4169991/">profjim</a>
(<a href="/recipes/tags/decorator/">decorator</a>, <a href="/recipes/tags/generators/">generators</a>).
Revision 6.
</p>
<p>Decorator-based implementation of PEP 380 (yield from). This is the optimized version (special handling of nested "yield _from"s).</p>
XYAPTU: Lightweight XML/HTML Document Template Engine for Python (Python)
2002-11-18T15:01:35-08:00Mario Ruggierhttp://code.activestate.com/recipes/users/110641/http://code.activestate.com/recipes/162292-xyaptu-lightweight-xmlhtml-document-template-engin/
<p style="color: grey">
Python
recipe 162292
by <a href="/recipes/users/110641/">Mario Ruggier</a>
(<a href="/recipes/tags/xml/">xml</a>).
Revision 3.
</p>
<p>Xyaptu builts on Alex Martelli's generic and elegant module, YAPTU (Yet Another Python Template Utility), to instantiate XML/HTML document templates that include python code for presentational purposes. The goal is _not_ to be able to embed program logic in a document template. This is counter productive if a separation of content and logic is desired. The goal _is_ to be able to prepare arbitrarily complex presentation templates, while offering a simple and open-ended means to hook in application data. A page template may therefore contain anything that targeted clients will accept, with the addition of five XML tags and one 'pcdata' expression token, as mark-up for the python code that defines the coupling between the presentation to the application data.</p>