It occurs to me after my previous post regarding page modified times that I never did put in code to make the new Python back end show the correct Last-Modified time on my site pages. I figured it would be a quick piece of code, but it turned out to be needlessly annoying and difficult to find out the proper syntax and code to do it. So, for posterity, here is how to send a http header for the last modified date of a requested file:

import time
from os.path import getmtime

#path to the real file to get mtime from
    content_file = '/path/to/file'

#instead of getmtime, you could also use an mtime from a database, etc.
    req.headers_out['Last-Modified'] = time.ctime(getmtime(content_file))

#this flushes headers to the client (not needed in all mod_python versions)
    req.send_http_header()

The key bits here are simply "req.headers_out['Last-Modified'] = THE_TIME", where "THE_TIME" is a date/time string representing the modified time you wish to send. The rest is sort of dependent on what you are working with in terms of a back end and how you retrieve the 'real' modified time. I figured I'd document this here since it took me almost an hour to figure out such a simple piece of code, since for whatever reason there just isn't useful information on it indexed anywhere.

-Jay