[mod_python] How to initialize a variable using PythonImport and access it from a Handler?

jarrod roberson jarrod.roberson at gmail.com
Mon May 2 17:21:26 EDT 2005

thanks that PythonInterpreter directive did it, I can access the object and 
call methods on it but they never return any data until you stop the server 
then it flushes the data out to the browser.

can you see any reason that the following code might hang like that and 
never return?

from mod_python import apache

from myapp import cac
from twisted.names import dns

def handler(req):
req.content_type = "text/plain"
for answer in cac.getCachedResults(None, None, None):
return apache.OK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20050502/23bdf030/attachment.html

More information about the Mod_python mailing list