[Zope-dev] Persistence Module Confustion (fwd)

2004-02-11 Thread D. Bickle
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 to resolve these dependencies? Have the

[Zope-dev] persistence and lists

2002-09-18 Thread Arndt Droullier
Hello, I´m working on a product which contains custom data in a list of multiple dictionaries. How can I save the list/dictionaries after changes? Persistence is enabled (and works for other types), and _p_changed is set, also get_transaction().commit() is called. A second problem is that

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

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.

[Zope-dev] persistence

2001-06-28 Thread Mark McEahern
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, which is better? Please don't ask me to define better.

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, which is

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, "persistence

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

2001-02-11 Thread Jon Franz
Morten's product stores the counter's value in a file on the filesystem, and so it doesn't cause the Data.fs to grow. Hmmm, well, my counter above wouldn't cause the data.fs to grow all that much, since it subclasses Persistent and so gets its own pickle jar. cheers, Chris So subclassing

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, and

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

2001-02-11 Thread Jon Franz
:[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 avoid changes to the object being stored and roll-backable in the ZODB