> The "call it twice" might cause by the "caveat" mentioned in python > document of reload(), quoted below. But honestly speaking, it sounds > complicated, I don't quite understand it, and not gonna understand it > either as long as I do not feel the need for using reload(). :-)
In a highly non-scientific way (aka just try and see what happens...) I found this works: DEVELOPMENT = True utilsmodule = 'applications.%s.modules.utils' % request.application exec('from %s import doit' % utilsmodule) if DEVELOPMENT: import sys reload(sys.modules[utilsmodule]) exec('from %s import doit' % utilsmodule) Weird side effect: it shows an empty flash. I'm only using functions in this module, not classes as you do (which apparently give problems). Conclusion: It's all very iffy. I just tried your modules workaround, and that works just fine. It doesn't feel right to abuse models for this, but it definitely makes development life easier. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---