page contents are not refreshed

Gleb Rybkin grybkin at gmail.com
Wed Sep 13 13:48:01 EDT 2006


when running apache, mod_python in windows.

This looks pretty strange. Creating a simple python file that shows
current time will correctly display the time in apache the first time,
but freezes afterwards and shows the same time on all subsequent clicks
as long as the file is not modified.

Any ideas what's wrong? Thanks.

from mod_python import apache
from time import strftime, gmtime

curtime = strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime())
def handler(req):
     req.content_type = "text/plain"
     req.send_http_header()
     req.write(str(curtime))
     return apache.OK




More information about the Python-list mailing list