Re: [Zope-dev] ZODB : store and retrieve (more specific)

2000-07-25 Thread Johan Carlsson



> Hi, 
> 
> 
> I want to create a persistent List (I want to store data for a long time 
> without using a relational database). I have found source of such list but 
> I don't know how to use it. 
> 
> The things that I want to know are : 
> --> how could I use personnal object (in Python language)
> --> how could I store and retrieve these object ?
> 
> I Hope that anybody can help me thanks...
>

You can either use the PersistentMapping object that comes with Zope 
"from ZODB.PersistentMapping import PersistentMapping" or 
AndrewWilcox's http://www.zope.org/Members/AndrewWilcox/PersistentListDict. 
PersistentMapping is limited to string keys only, which is sufficient most of the 
time. 
Just create a PersistentMapping in your Zope class and use it as if it was 
a regular python dictionary. PersistentMapping takes care of setting 
the necessary attributes for it to be persistent.

Alternative you can use a TinyTable directly in Zope for storing a table.

Regards,
Johan Carlsson







___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )




[Zope-dev] ZODB : store and retrieve (more specific)

2000-07-25 Thread jdiebold

Hi, 


I want to create a persistent List (I want to store data for a long time 
without using a relational database). I have found source of such list but 
I don't know how to use it. 

The things that I want to know are : 
--> how could I use personnal object (in Python language)
--> how could I store and retrieve these object ?

I Hope that anybody can help me thanks...




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )