[mod_python] Force reload of all imported files on *every* request?

Keith Palmer Jr. keith at uglyslug.com
Sat Dec 2 22:57:53 EST 2006

Is there a way with mod_python to force it to reload all imported files 
on every request?

It's a development server but I *cannot* edit httpd.conf and most other 
suggestions I've seen deal with restarting apache everytime I edit a 
file... that is to say the least cludgy.

Also, if I have a text block of code (reading it from the database) with 
a class definition and a single import (urllib) can I use exec() to 
declare that class and then use it? So I want to do this:

code = "my code is here, this is a class definition and an from urllib 
import urlopen statement"
myinst = MyClassName()

And yes, I'm a complete Python newbie. Thanks! :-P

More information about the Mod_python mailing list