Hi, I'm trying to make my own pyhton classes and use them with zope, so I tried to subclass the class Persistent. However, no matter what I try I get always an error like: *** Bobo-Exception-Value: (<class exceptions.ImportError at 80a9d98>, 'cannot import name Persistent') *** I have read "The (old) Product API Tutorial", "Create a Boring Product in Python" and "ZODB" HowTos but I didn't find the exact way to do it. Even reading the Persistence module doesn't enlighten me too much: it's just the license and a string. So I would appreciate if someone could give a clue about how to subclass Persistent and to which module it belong? Oscar
If you're trying to import your product into the interpreter, you have to load the Zope framework first. The Zope initialization is where the Persistent module is populated.
From $zopedir/lib/python:
import Zope import Products.MyProduct etc... -jfarr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Hi! I'm a signature virus. Copy me into your .sig to join the fun! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ----- Original Message ----- From: Oscar Picasso <picasso@videotron.ca> To: <zope@zope.org> Sent: Monday, March 13, 2000 2:35 PM Subject: [Zope] Subclassing Persistent (QUEST)
Hi,
I'm trying to make my own pyhton classes and use them with zope, so I tried to subclass the class Persistent. However, no matter what I try I get always an error like: *** Bobo-Exception-Value: (<class exceptions.ImportError at 80a9d98>, 'cannot import name Persistent') ***
I have read "The (old) Product API Tutorial", "Create a Boring Product in Python" and "ZODB" HowTos but I didn't find the exact way to do it. Even reading the Persistence module doesn't enlighten me too much: it's just the license and a string.
So I would appreciate if someone could give a clue about how to subclass Persistent and to which module it belong?
Oscar
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Jonothan Farr -
Oscar Picasso