There is a document http://www.zope.org:8080/Documentation/Reference/API with more information about developing python products, and a sample. In there, I think DC recommends developing your class logic from within python (not through the web, initially), because you don't need to worry about restarting servers, etc. Kevin -----Original Message----- From: Sean Treadway <seant@factory.dk> To: Zope List <zope@zope.org> Date: Thursday, September 16, 1999 11:14 AM Subject: [Zope] Product module reloading
First off, Zope is amazing. It is a wonderful environment to work in. I am new to Python, Web Applications and Zope, but researching the other options (php3, Java, etc) I am glad to have found Zope.
I have spent a bit of time surveying what is needed for my project and I have chosen to write a python product. Now I am in the edit-debug stage. Is there a streamlined way to reload my product module, and the products imported modules without restarting the ZServer?
I have tried exporting a "reload_mod": reload(module) method in my product's __init__.py but Zope complains that it can't find the reload_mod method (http://localhost:8080/reload_mod).
Thanks, Sean
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
Kevin Dangoor wrote:
In there, I think DC recommends developing your class logic from within python (not through the web, initially), because you don't need to worry about restarting servers, etc.
Yes, I would much rather debug outside of the web server but I do not have much experience with python (this product is also an endevor to bone up on python). When I load my product's __init__.py or most any other module that imports Globals from the cmd line, I get get the following: [seant@ember Product]$ python __init__.py Traceback (innermost last): File "__init__.py", line 4, in ? from ImageFile import ImageFile File "/usr/local/zope/lib/python/ImageFile.py", line 97, in ? from App.ImageFile import ImageFile File "/usr/local/zope/lib/python/App/ImageFile.py", line 90, in ? from Globals import package_home File "/usr/local/zope/lib/python/Globals.py", line 90, in ? import Acquisition, ComputedAttribute, App.PersistentExtra, os File "/usr/local/zope/lib/python/App/PersistentExtra.py", line 87, in ? from Persistence import Persistent ImportError: cannot import name Persistent There is nothing defined in the module Persistence which makes me wonder a bit about what is going on. My PYTHONPATH includes .../zope/lib/python and I am running the python binary from a 1.5.2 installation rather than the Zope installation. Any insight would be appreciated. Thanks, -Sean P.S. This product is going to be used for building dynamic SMIL multimedia presentations (drag and drop style, thanks to Zope). There are some interesting challenges regarding multiple visual areas, media sources, timing, live/archived, etc. If you are interested in talking/thinking about this product let me know, I would love some collaboration.
participants (2)
-
Kevin Dangoor -
Sean Treadway