roberto.c.aguilar at gmail.com
Mon Jul 11 12:24:21 EDT 2005
Hello everyone, I've been trying to figure out how to develop python web scripts without having to restart httpd every time I make a change to a module. I found the directive: PythonAutoReload so I explicitly set it to On in httpd.conf. But, in the following script, for example: ---- from mod_python import apache import test def handler(req): req.content_type = 'text/plain' f = test.foo() req.write('string: %s\n' % (f.getString())) return apache.OK ---- any modifications to the module "test" (tell getString() to return "string1", then change it to return "string2") will not appear consistently across all the httpd sub-processes until the server is restarted. It appears this directive only xhecks the modification time of the requested module, or in my case, the handler script. Most of the development I'm doing is within modules so bouncing the server each time I make a change is a bit tedious. Is there some way to get mod_python to check the modification time of any module being imported? Thanks! -Roberto.