[mod_python] module not reloading?

Michael S. Fischer michael at dynamine.net
Fri Sep 26 13:19:59 EST 2003


Actually, my problem is that the main module reloads, but my called 
modules don't, even if I call reload() explicitly.

--Michael

Michael C. Neel wrote:

> I believe the main module reloads, but you will need to manually reload
> any modules your module calls you want reloaded.  I tie this into the
> PythonDebug setting, like such:
> 
>     # if this is in debug/test mode, reload any changes
>     if req.get_config().has_key('PythonDebug'):
>         reload(www_forms)
>         reload(globals)
> 
> (if you state PythonDebug Off, there will not be a PythonDebug key at
> all - a little gotcha as you might expect there to by a PythonDebug key
> with a value of Off).
> 
> avoid "from module import *"'s; these don't seem to work with the reload
> function (I think that is the way it's supposed to work, btw).
> 
> With the above inplace, I don't need to restart/killhup apache unless I
> have PythonDebug Off.
> 
> HTH,
> Mike
> 
> 
>>-----Original Message-----
>>From: Michael S. Fischer [mailto:michael at dynamine.net] 
>>Sent: Friday, September 26, 2003 3:50 PM
>>To: Seung Chan Lim
>>Cc: mod_python at modpython.org
>>Subject: Re: [mod_python] module not reloading?
>>
>>
>>I have the same problem.  (Same versions, also running OS X 10.2, 
>>Python2.2 from Fink.)
>>
>>--Michael
>>
>>Seung Chan Lim wrote:
>>
>>>The module reloading mechanism doesn't seem to work. I have 
>>
>>to restart
>>
>>>apache everytime to have it reload the modules...
>>>
>>>I even tried using the PythonAutoReload directive and set 
>>
>>it to "ON" inside
>>
>>>the "Directory" section of the httpd.conf file... no luck..
>>>
>>>any advice?
>>>
>>>thanks
>>>
>>>
>>>I'm using python 2.2
>>>mod_python 3.03
>>>Apache 2.0
>>>
>>>
>>>
>>>_______________________________________________
>>>Mod_python mailing list
>>>Mod_python at modpython.org
>>>http://mailman.modpython.org/mailman/listinfo/mod_python
>>>
>>
>>_______________________________________________
>>Mod_python mailing list
>>Mod_python at modpython.org
>>http://mailman.modpython.org/mailman/listinfo/mod_python
>>
> 
> 



More information about the Mod_python mailing list