Actually, I take that back.  Only the servlet's module gets reloaded,
other modules don't. (unless you explicitly reload() them)

You should check sys.path first -- I believe it is printed in error
pages -- and make sure there's no ambiguities.  Then you may also want
to look at sys.modules (maybe printing it out at several points), and
see if your module shows up more than once there.  A module should
*never* be reloaded except explicitly (as with reload(), or what happens
to servlets), or if it is being referred to by two different names.

On Wed, 2002-07-17 at 03:04, Ian Bicking wrote:
> Is the module imported from a servlet?  Servlets get re-imported if the
> file is edited and the page is reloaded.  If you don't edit the files
> this won't happen.
> 
> On Wed, 2002-07-17 at 02:53, Michael Bub wrote:
> > I am currently writing a WebApp using Webware0.7/Python2.2, and I have
> > discovered a strange (at least for me) behaviour. And I bet that you guys
> > are just the ones to tell me how to handle this, or what I might be doing
> > wrong.
> > 
> > First, I had some problems with my singletons. Sometimes, the singleton
> > instance was just forgotten about and a new one was created. No good.
> > I then found out that this was due to a re-import of the class, i. e.
> > Webware behaves as if the class was never imported before, imports it
> > again, and consequently also creates a new instance.
> > After further testing, I learnt that every file gets re-imported every
> > once in a while.
> > This seems so strange to me as I have read in the Python docs that every
> > import is performed only once, and that's it. So, I really have no clue
> > why this behaves so differently (even fatal in my case) when the code
> > is running under Webware.
> > 
> > Any ideas, hints, solutions?
> > -- 
> > Michael Bub ([EMAIL PROTECTED])
> > 
> > 
> > 
> > 
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Webware-discuss mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/webware-discuss
> 
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Webware-discuss mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webware-discuss




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to