Login

Snippets by mwdiers

Snippet List

Remove quotes from bits in a custom tag

A simple function that will remove the quote marks from every string in a list - if and only if the quote marks are the first and last character of the string, regardless of whether they are single or double quotes. Useful when parsing the arguments of a custom tag.

  • quotes
  • parse
  • custom-tags
  • tokens
Read More

Integrate Tenjin using a decorator

This provides basic [Tenjin](http://www.kuwata-lab.com/tenjin/) integration, using a decorator. Tenjin is a blazingly fast templating system, the fastest pure-python system available. For usage and configuration, see the example in the code. I modeled this after Robert Thomson's code for Mako integration.

  • decorator
  • tenjin
  • template-engine
Read More

mwdiers has posted 2 snippets.