Fredrik Lundh wrote: > "mneagul" wrote: > > > I am writing a small program using mod_python publisher extension. I > > have created several python files and imported them in a `main' file. > > How can I stop mod_python to byte compile the files? I want to make > > changes to the files and see result imediately! > > > > In the current setup only the changes to the `main' file are applied > > imediately. I is nearly imposible to develop an application this way. > > > > I want to mention that I'm a newby to mod_python. > > the FAQ has the answer: > > http://www.modpython.org/FAQ/faqw.py?req=show&file=faq03.001.htp > "Q. My module imports other modules - how do I reload those?" > > (another approach, used by several frameworks, is to use a stand-alone > test server for development, and mod_python for deployment)
Simply using apache.import_module() is not going to necessarily help at the moment as it has various problems and shortcomings. One of them is that it does not check multiple levels of dependencies between modules. Thus simply replacing global imports in a module with a call to apache.import_module() will not help. For a full list of problems and issues with the mod_python module importer see: http://www.dscpl.com.au/articles/modpython-003.html There is a new module importer being tested with mod_python 3.3 which will hopefully eliminate the major problems. Highly recommend that original poster get onto the mod_python mailing list to discuss what he can do in the interim. Graham -- http://mail.python.org/mailman/listinfo/python-list