File: test-installed

package info (click to toggle)
python-tempita 0.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 244 kB
  • sloc: python: 1,173; makefile: 3
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()))