File: test-installed

package info (click to toggle)
python-tempita 0.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 208 kB
  • ctags: 259
  • sloc: python: 1,167; makefile: 37
file content (11 lines) | stat: -rwxr-xr-x 308 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python3

import os
from tempita import Template as t

tmpldir = os.path.dirname(os.path.realpath(__file__))
w = t.from_filename(os.path.join(tmpldir, "test.tmpl"))
print(str(w.substitute()))

w = t.from_filename(os.path.join(tmpldir, "test.tmpl"), encoding='utf-8')
print(str(w.substitute()))