MOD_PYTHON + packages reloading

lukasz.f24 at gmail.com lukasz.f24 at gmail.com
Thu Oct 18 11:21:18 CEST 2007


On 18 Oct, 09:55, Duncan Booth <duncan.bo... at invalid.invalid> wrote:
> lukasz.... at gmail.com wrote:
> > I came across annoying problem during my fun with mod_python. I turned
> > out that mod_python load package only onca and don't care about any
> > changes to it. Obviously it makes sense on production server but
> > during development is more then annoying.
>
> Have you read the mod_python manual?
>
> http://www.modpython.org/live/current/doc-html/dir-other-par.html
>
> 5.4.8 PythonAutoReload
>
> Syntax: PythonAutoReload {On, Off}
> Default: PythonAutoReload On
> Context: server config, virtual host, directory, htaccess
> Override: not None
> Module: mod_python.c
>
> If set to Off, instructs mod_python not to check the modification date
> of the module file.
>
> By default, mod_python checks the time-stamp of the file and reloads the
> module if the module's file modification date is later than the last
> import or reload. This way changed modules get automatically reimported,
> eliminating the need to restart the server for every change.
>
> Disabling autoreload is useful in production environment where the
> modules do not change; it will save some processing time and give a
> small performance gain.

Yes I have read it. This is my config file
<VirtualHost *:80>
    ServerName info
    DocumentRoot D:/web/info/
    <Directory "D:/web/info/">
      AddHandler mod_python .py
      PythonHandler index
      PythonDebug On
      PythonAutoReload On
      AllowOverride All
      Allow from All
      AllowOverride All
    </Directory>
</VirtualHost>

Even when autoreload is ON mod_python doesn't care about any changes
if I import something from package in traditional way :(




More information about the Python-list mailing list