Commits

Jonathan Eunice committed 10e1eff

removed template() - a bridge too far

  • Participants
  • Parent commits a84602f

Comments (0)

Files changed (2)

 
 setup(
     name='textdata',
-    version=verno("0.011"),
+    version=verno("0.017"),
     author='Jonathan Eunice',
     author_email='jonathan.eunice@gmail.com',
     description='Get clean line or text data from multi-line strings',
  * strip leading/trailing spaces (leading by request, trailing by default)
 """
 
-import os
+import os, string
 
 def lines(text, noblanks=True, dedent=True, lstrip=False, rstrip=True):
     """
     of the nice cleanups ``lines()`` does.
     """
     return "\n".join(lines(text, **kwargs))
+
+def template(text, **kwargs):
+    """
+    Return a ``string.Template`` object for the given text, with the same cleanups
+    supported by ``lines`` and ``textlines``.
+    """
+    
+    return string.Template(textlines(text, **kwargs))