Popular recipes tagged "formatter"http://code.activestate.com/recipes/tags/formatter/2014-02-19T12:53:03-08:00ActiveState Code RecipesString templates with adaptive indenting (Python) 2014-02-19T12:53:03-08:00Sander Evershttp://code.activestate.com/recipes/users/4173111/http://code.activestate.com/recipes/578835-string-templates-with-adaptive-indenting/ <p style="color: grey"> Python recipe 578835 by <a href="/recipes/users/4173111/">Sander Evers</a> (<a href="/recipes/tags/formatter/">formatter</a>, <a href="/recipes/tags/indent/">indent</a>, <a href="/recipes/tags/templating/">templating</a>). </p> <p>An extension of Python's <code>'Hello {fieldname}!'.format(fieldname='world')</code> functionality for multi-line strings. When <code>{fieldname}</code> is indented, all the lines in the inserted <code>fieldvalue</code> are indented to the same amount.</p>