[Zope] How to configure Zope & Python environment

Michel Pelletier michel@digicool.com
Tue, 15 Jun 1999 09:43:51 -0400


> -----Original Message-----
> From: steve@hosys.com [mailto:steve@hosys.com]
> Sent: Tuesday, June 15, 1999 12:33 AM
> To: zope@zope.org
> Subject: [Zope] How to configure Zope & Python environment
> 
> 
> Hello,
>  I am running Zope on windows using the builtin webserver and 
> attempting to
> add a new Product. The way
> I've been going about using Zope so far is to install a new 
> "Zope directory"
> for each new project...not so
> bad until I started trying to "compile" python code. It seems 
> to me I should
> create a "default" install of
> Zope and point my python path to those directories ?
> 
> I am trying to compile the following Product code (below) and get the
> following err message:
> 
> Traceback (innermost last):
>   File
> "C:\Tech\Lang\Python\Python152\Pythonwin\pywin\framework\scrip
> tutils.py",
> line 237, in RunScript
>     exec codeObject in __main__.__dict__
>   File 
> "C:\Zope\ProjectMgt\lib\python\Products\ProjectMgt\projobjs.py", line
> 1, in ?
>     from Globals import HTMLFile, MessageDialog, Persistent
>   File "C:\Zope\ProjectMgt\lib\python\Globals.py", line 90, in ?
>     import Acquisition, ComputedAttribute, App.PersistentExtra, os
>   File 
> "C:\Zope\ProjectMgt\lib\python\App\PersistentExtra.py", line 87, in ?
>     from Persistence import Persistent
> ImportError: cannot import name Persistent
> 


First, you want to put any "Zope Products" in
Zopedir/lib/python/Products.  Here, your products can find everything
they need.

Also, Persistent is in the Persistence package.

from Persistence import Persistent

I'm not sure if it's still in Globals, but you should get it from
Persistence anyway.

-Michel