On Dec 5, 2007 10:04 AM, JLIST <[EMAIL PROTECTED]> wrote: > > Hello all, > > I find that code.py is imported multiple times upon start. > I wonder what is the best way to instantiate single objects > in a web.py application, for example, a logger. > > I also notice that for one request, the handler functions > are called multiple times. Not sure if it's because > I'm using reloader.
Yes, it is because of using reloader. Since it is not possible to reload __main__ module, web.py imports that module another time with its name. So you must have seen that the main is imported twice. If you find it importing more than twice, then probably it is a problem. What is the version of web.py you are using? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
