[mod_python] only one time load of a module

Mateusz Korniak mateusz at ant.gliwice.pl
Fri Dec 21 07:26:44 EST 2007


On Friday 21 of December 2007, kamakhya wrote:
> I have a form.py, which looks like following
>
> import xyz
> def content(req,var1):
> 	return some_html_page
>
> Each time the form.py is called,
imported ?

> xyz is loaded again. 
Prolly false.
It is loaded once per each http process.
Prolly few first reqests hits new process, so it looks like, but later will be 
no more imports.

> In my case,  
> loading of xyz is time consuming. Can anyone suggest for only one time
> load which can be reused?



-- 
Mateusz Korniak


More information about the Mod_python mailing list