usr bin python coding utf-8 import cgi cgitb from jinja2 import Templa

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#!/usr/bin/python
# -*- coding: utf-8 -*-
import cgi, cgitb
from jinja2 import Template
from jinja2 import Environment, FileSystemLoader
print "Content-type:text/html\n"
cgitb.enable()
templ = Template(u"русский текст")
print templ.render()