[mod_python] import madness!

The Doctor What list.mod_python at docwhat.gerf.org
Thu May 13 23:34:16 EDT 2004


* Kamil Niechajewicz (kamil at nvstudio.pl) [040512 05:06]:
> On Tue, 11 May 2004 13:11:21 -0500
> The Doctor What <list.modpython at docwhat.gerf.org> wrote:
> 
> > I have found an interesting bug.  My handler has, at it's start,
> > something like:
> > from blah import config
> > 
> > This is great, works fine, etc. EXCEPT when I clean up the .pyc
> > files in the blah directory!  Then it says that it cannot import
> > config!
> 
> this is strange, but there is solution for it. just run the 
> interpreter and type 'import config'. it will automatically
> create .pyc files and everything will be fine.
> the thing i don't understand about it is why it does not 
> import from .py files when no .pyc is present? 

I agree, it should do that on it's own.  It's something in the way
mod_python's handler stuff works.

Regarding your "import config" suggestion, it doesn't work on a
heavily used system.  Before that command can run, a user will get
errors (500 server errors, specifically).  I cannot afford that.
This is a web application that drives a whole company, having
periodic "errors" isn't acceptable.

Any other suggestions?

Ciao!

-- 
"There's a problem with NT - it fails a lot,"
	-- Jimmy Treybig, founder of Tandem Computers

The Doctor What: Da Man                          http://docwhat.gerf.org/
docwhat *at* gerf *dot* org                                        KF6VNC


More information about the Mod_python mailing list