Why do I have to reimport External Methods ?
Hi all ! I am new to Zope, and I have a problem with External Methods. Everytime I change the implementation of my file in Extensions/test.py I have to reimport the External Method to see the changes. What am I doing wrong ? I just want the changes I made to the source code to be reflected when I reload a page ! I hope someone can explain what I am doing wrong here. Maik Röder Some more details: I have a folder called VMBI and an external method test in it. Everything works just fine, the index_html file has a call to the external method, which just prints "Hello World!" <!--#var test--> So the following URL http://localhost:9673/VMBI/test prints Hello World ! But when I change the original source code to print for example Hello Zope ! Then upon reloading the web page http://localhost:9673/VMBI/test there still is printed Hello World ! What's going on here ?
On Sat, 20 Mar 1999, Maik Roeder wrote:
Everytime I change the implementation of my file in Extensions/test.py I have to reimport the External Method to see the changes.
You don't have to delete and recreate an External Method each time you change it's file. But you do have to go back to its properties page and hit the "Edit" button to reload its module (this is actually a nice feature of python, being able to reload modules at run time).
What am I doing wrong ? I just want the changes I made to the source code to be reflected when I reload a page !
Well, it may be possible to stat the External Methods file each time its used, and reload it if its changed (you'd have to store its last modification time somewhere to compare against). This probably isn't done for performance reasons. Perhaps it could be linked to the BOBO_DEBUG_MODE environmental variable or something to address this issue. --- John Eikenberry [jae@kavi.com - http://taos.kavi.com/~jae/] ______________________________________________________________ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin
Is there a similar way to reload code for a Product, or is the shutdown/restart of Zope necessary? If I do have to continue the shutdown/restart process, is there any way of tuning PCGI so that it loads up faster? Thanks. -james On Sat, 20 Mar 1999, John Eikenberry wrote:
You don't have to delete and recreate an External Method each time you change it's file. But you do have to go back to its properties page and hit the "Edit" button to reload its module (this is actually a nice feature of python, being able to reload modules at run time).
[] James A. Hillyerd <jamesh@altavista.net> Java Developer [] HyperGlyphics: http://www.hyperglyphics.com/ [] GPG Public Key Fingerprint for 1024D/9F956CDE (Expires 2000-02-01): [] C86F B073 92DF 1E24 EF0B 0118 6061 0FEC 9F95 6CDE
participants (3)
-
James A. Hillyerd -
John Eikenberry -
Maik Roeder