[ZDP] BackTalk to Document Zope Developer's Guide (2.4 edition)/Zope Products

webmaster at zope.org webmaster at zope.org
Sat Mar 6 07:56:29 EST 2004

A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZDG/current/Products.stx#3-19


      The order of the base classes depends on which classes you want
      to take precedence over others.  Most Zope classes do not define
      similar names, so you usually don't need to worry about what
      order these classes are used in your product.  Let's take a look
      at each of these base classes:

        % Anonymous User - Jan. 9, 2002 7:19 am - Arrgh, that's not fair to your Newbie readers: it seems that (in an interactive session on the console) the import of Persisten fails if 'import ZODB' isn't issued before ...

        % Anonymous User - Jan. 9, 2002 7:23 am - Hint for those who have Python 2 installed as part of the Zope installation (but the system installation is still 1.x): in the folder bin/ of the Zope installation is a python 2 executable which can be used for the interactive sessions as well.

        % chrism - Jan. 15, 2002 10:54 pm - Yup, indeed "import ZODB" should be the first thing you do in an interactive session.  You should also consider starting Zope from within the Zope/lib/python directory to make life easy.  For the inevitable question "why?", the answer is "so it will work" ;-)

        % wleftwich - May 30, 2002 7:55 am:
         Easy way to use Python interpreter while writing Products

         Somewhere in your Python path, make a file called e.g. zopeinit.py, containing:
         import sys
         import ZODB

         Then you can start the Python interpreter in the directory
         where you're writing the product, and say
         >> from zopinit import *

        % Anonymous User - Jan. 24, 2003 8:43 am:
         previous comment, last line should be: >> from zopeinit import *

        % Anonymous User - Mar. 6, 2004 7:56 am:
         I have a debian install of zope which uses /var/... as the root for the zope
         instance files, such as Data.fs. In my case, the extra that I had to do to start zope manually was:
           os.environ['INSTANCE_HOME'] = "/var/lib/zope/instance/default"
         before the 'import Zope' line. (roy)

More information about the ZDP mailing list