[mod_python] Module getting imported twice?

Sean Reifschneider jafo at tummy.com
Mon May 24 15:24:47 EDT 2004


On Mon, May 24, 2004 at 01:18:45PM -0400, Gregory (Grisha) Trubetskoy wrote:
>This second one does look odd. But it's very hard to tell what is going on
>here. First, I'd try Python 2.3 (and mp 3.1) and see if it behaves
>differently.

That tool-chain is totally breaking my application, so that's going to
take a while to figure out.  It's just generating blank pages at the
moment, I have no idea why, no errors in error_log.

>Also, the value of module I think depends on how it is imported, i.e.
>using 'from' vs 'import' vs the imp module might give you different
>results, and perhaps there is a bug in Python when a module is imported by
>more than way it corrupts the value of module...

I'm fairly sure that this module is not getting imported by "imp".  I
added logging of any time a module was imported by imp, and it isn't
directly called by that.  However, a module that is imported by imp is
importing these modules and that's where the code is that is failing.
As I said, one line works, the next line doesn't.  That code is within a
module imported with imp.

Sean
-- 
 If you don't have time to do it right, when will you ever find time to do
 it over?
Sean Reifschneider, Member of Technical Staff <jafo at tummy.com>
tummy.com, ltd. - Linux Consulting since 1995.  Qmail, Python, SysAdmin


More information about the Mod_python mailing list