Re: [Zope-dev] Persistence Module Confustion (fwd)

2004-02-12 Thread Dieter Maurer
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

Re: [Zope-dev] persistence and lists

2002-09-18 Thread Lennart Regebro
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. ___

Re: [Zope-dev] persistence and lists

2002-09-18 Thread Casey Duncan
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

Re: [Zope-dev] persistence

2001-06-28 Thread Stephan Richter
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

Re: [Zope-dev] persistence

2001-06-28 Thread Michel Pelletier
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

RE: [Zope-dev] Persistence ( was Thread Safe Counting )

2001-02-12 Thread Tres Seaver
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

RE: [Zope-dev] Persistence ( was Thread Safe Counting )

2001-02-11 Thread Jon Franz
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

Re: [Zope-dev] Persistence ( was Thread Safe Counting )

2001-02-11 Thread Chris Withers
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