2009/3/20 Clodoaldo Pinto Neto <[email protected]>: > > 2009/3/20 Graham Dumpleton <[email protected]>: >> >> 2009/3/20 Florian Bösch <[email protected]>: >>> >>> Hi, >>> >>> I'd like to have the process reload upon http request if a file of my >>> package has changed when I have development mode configured. How do I >>> do that? >> >> Must have mod_wsgi 2.X. Then read: >> >> http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode > > Just a small suggestion. In this code at that page: > > 1 import sys > 2 path = '/usr/local/wsgi/modules' > 3 if path not in sys.path: > 4 sys.path.append(path) > > Wouldn't it better if line 4 were an insert in instead of an append?: > > 4 sys.path.insert(0, path)
One could say that. I tend to use 'append()' in examples because then it shows people up as being stupid when they pick a module name which clashes with a standard Python module. Eg. 'test.py'. In other words, with the above their code will not work and hopefully they then go investigate why and realise they should be careful about how they name modules. :-) Evil, aren't I. Graham > Regards, Clodoaldo > >> with further examples highlighting just this in: >> >> http://blog.dscpl.com.au/2008/12/using-modwsgi-when-developing-django.html >> http://blog.dscpl.com.au/2009/02/source-code-reloading-with-modwsgi-on.html >> >> Graham >> >> > >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "modwsgi" 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/modwsgi?hl=en -~----------~----~----~----~------~----~------~--~---
