[mod_python] mod_php vs mod_py - include vs. import

Kevin Ballard kevin at sb.org
Mon Jan 5 07:38:27 EST 2004


There's an easy solution:

Keep a table of the modification dates of the relevant modules. In your 
handler function, compare the modification dates you stored with the 
current ones, and if any differ call reload() on that module.

If you want an example, ask me and I can make one. But it shouldn't be 
too hard to do on your own.

HTH,
Kevin

On Jan 5, 2004, at 3:46 AM, fowlertrainer at anonym.hu wrote:

> I want to control my website with only one py file: the main.py.
> But I got experience with one ugly thing in mod_python.
>
> In mod_php, the main.php file is can include many files, and all of
> them can include many other files.
> When I modify some or one of these files, the website is refreshed.
>
> But in mod_python, I cannot use the include, I have only one way to 
> share/split my sources: the import.
> It is ok, but when I modify some of these imported files, the website 
> is not refreshed !!!
>
> My solution in this time to I use only one file.
> It is not too good, because it is growing too much, and I cannot
> separate it to units.
>
> Have any solution to this problem ????

-- 
Kevin Ballard
kevin at sb.org
http://www.tildesoft.com
http://kevin.sb.org



More information about the Mod_python mailing list