aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Jinja2/examples/hello/__main__.py
blob: 51b3d1e3d57d3547f12be4b048ad6e05c2ec1034 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import sys

from jinja2 import Environment, PackageLoader


env = Environment(
    loader=PackageLoader("hello", "templates"),
)

username = sys.argv[1] if len(sys.argv) > 1 else "Anonymous"

print(env.get_template("hello").render(username=username))