D. Bickle wrote at 2004-2-11 11:16 -0800:
>I am trying to import the MailHost module that has dependencies with the
>Persistence package. The interpreter complains that it cannot load the
>Persistence modules and when I examine the package there is no content or
>modules.
>
>How can I fix my code t
From: "Arndt Droullier" <[EMAIL PROTECTED]>
> How can I save the list/dictionaries after changes?
The easiest thing to do is to is to use PersistentMapping and
PersistentList.
Create them in __init__ with "self.dictionary = PersistentMapping()" instead
of setting them as a class attribute.
___
Sounds like you are trying to persist a class attribute value. This is not
possible because instance are persistent, not classes. This is also the
reason that the values change over all the instances. You are changing a
mutable attribute of the class in place.
I would suggest setting the value
At 01:40 PM 6/28/01 -0700, Mark McEahern wrote:
>I'm a Zope and Python newbie and I'm trying to utilize Persistence, but I've
>seen two different ways:
>
> import ZODB
> from Persistence import Persistent
As Michel said, this is only for non-Zope use. In this case the 'import
ZOD
On Thu, 28 Jun 2001, Mark McEahern wrote:
> I'm a Zope and Python newbie and I'm trying to utilize Persistence, but I've
> seen two different ways:
>
> import ZODB
> from Persistence import Persistent
>
> vs.
>
> from Globals import Persistent
>
> Are these different? If so
Jon Franz <[EMAIL PROTECTED]> wrote
> Ah! this makes more sense, the idea of persistent properties even
> fits with this idea, though a true write-in-place property might be
> even better for some applications ;)
Two things:
* Don't count on storing the hit counter as a separate, "persisten
ris Withers [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, February 11, 2001 1:05 PM
> To: Jon Franz
> Cc: '[EMAIL PROTECTED]'
> Subject: Re: [Zope-dev] Persistence ( was Thread Safe Counting )
>
>
> Jon Franz wrote:
> >
> > So subclassing persistent will av
Jon Franz wrote:
>
> So subclassing persistent will avoid changes to the object being stored and
> roll-backable in the ZODB?
NO! read the posting again... Subclassing from persistent is HOW you make things
live in the ZODB. However, objects that subclass Persistent get their own pickle
jar, an