inklesspen (owner)

Revisions

gist: 208173 Download_button fork
public
Public Clone URL: git://gist.github.com/208173.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
>>> from mako.template import Template
>>> templatetext = r"""
... Hello!
... % for x in [1,2,3,4,5]:
... ${x} \
... % endfor
...
... This is indented.
... Whee
... Now back out.
... % for x in [1,2,3,4,5]:
... ${x}
... % endfor
... """
>>> mt = Template(templatetext)
>>> print mt.render()
 
Hello!
1 2 3 4 5
    This is indented.
    Whee
Now back out.
        1
        2
        3
        4
        5
 
>>>