[ZDP] BackTalk to Document Zope Developer's Guide (2.4 edition)/Zope Products
webmaster@zope.org
webmaster@zope.org
Fri, 24 Jan 2003 08:43:14 -0500
A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZDG/current/Products.stx#3-18
---------------
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
sys.path.append('/pathToZope/lib/python')
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 *