[Zope-dev] ExtensionClass

Chris McDonough chrism@digicool.com
Fri, 22 Jun 2001 14:44:30 -0400


Hi Mark,

Try to use the Python that ships with the Zope instance in
ZopeWebSite/bin/python instead of the 2.1 version you're trying to use. 
There are link-level incompatibilities that you're seeing.

- C



Mark McEahern wrote:
> 
> Summary:  Hi, I'm a newbie Zope developer.  I'm trying to use a fairly
> simple class from the Python interpreter (see below).  It's not working
> (specific error message listed below).  I've traced the problem to
> ExtensionClass.  I'm not sure that I'm correct about that and I'm really
> looking for any help you might offer.
> 
> Thanks,
> 
> // Mark
> 
> Details:
> 
> Running Zope 2.3.3 as a service on Windows 2000
> Using PythonWin ActivePython Build 210
> Environment variables:
> 
>         PYTHONPATH=C:\Program Files\ZopeWebSite\lib\python
> 
> (That's the /lib/python folder in the Zope installation.)
> 
> When I try to import this class into PythonWin:
> 
>         import ZODB
>         from Persistence import Persistent
> 
>         class Queue(Persistent):
> 
>             def __init__(self):
>           self.list=[]
> 
>             def put(self, obj):
>           self.list=self.list + [obj]
> 
>             def get(self):
>           obj=self.list[-1]
>                 self.list=self.list[0:-1]
>           return obj
> 
> I get this error:
> 
>           File "c:\python21\pythonwin\pywin\framework\scriptutils.py", line 394, in
> ImportFile
>             exec codeObj in __main__.__dict__
>           File "<auto import>", line 1, in ?
>           File "queue.py", line 1, in ?
>             import ZODB
>           File "c:\program files\zopewebsite\lib\python\ZODB\__init__.py", line 85,
> in ?
>             import sys, ExtensionClass, TimeStamp, cPersistence, Persistence
>         ImportError: DLL load failed: The specified module could not be found.
> 
> If I simply try to import ExtensionClass all by itself interactively:
> 
>         import ExtensionClass
> 
> I get this error:
> 
>           File "<interactive input>", line 1, in ?
>         ImportError: DLL load failed: The specified module could not be found.
> 
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )