Re: BaseHTTPRequestHandler reading .html with python code

2007-04-06 Thread aspineux
On 6 avr, 11:52, [EMAIL PROTECTED] wrote: > H! > > I was wondering how I can do something like this. Use a template engine like : Genshi Django/Jinja Cheetah Kid template For more engine look at http://www.turbogears.org/cogbin/ And maybe what you are looking fore is a complete framework like

BaseHTTPRequestHandler reading .html with python code

2007-04-06 Thread gcmartijn
H! I was wondering how I can do something like this. file.html - hello world print 'hello world' #or display str(time.localtime()[7]) webserver.py - def do_GET(self): try: if self.path.endswith(".html"): f = open(curdir + sep + self.path)