2010/7/29 lars <[email protected]>:
> I've noticed some behavioral weirdness in my web app that I can
> reproduce with the basic hello app.  The problem in that the mainline
> routine gets run twice: first by the main thread and then once again
> by the first thread that handles a request.  Why does it do this?  It
> only happens when the code in run from a file.  If you paste the code
> into an interpreter, it doesn't happen.

That happens because in debug mode, autoreloader is enabled. Since
__main__ module can't be reimported, it imports the main module like a
regular module. You can disable this by setting web.config.debug =
False before creating the app.

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to