ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Re: bsddb for simple database [very basic]
by Skip Montanaro other posts by this author
Aug 27 2001 1:25AM messages near this date
Re: bsddb for simple database [very basic] | Re: Help: using msvcrt for file locking
Artur>  Ignacio Vazquez-Abrams wrote:
    > > On 26 Aug 2001, Artur Skura wrote:
    > >> etc, I will just have standard dictionary pairs, with strings.
    > >> I need records. How do I do that?
    > > 
    > > "Keys and values must be strings, however, so to use other objects as keys or
    > > to store other kinds of objects the user must serialize them somehow,
    > > typically using marshal.dumps or pickle.dumps."
    > > 
    > > You wanted very simple database functionality, you found it. Anything more
    > > complex is up to you.
 
    Artur>  OK, I will use dumps/loads. I just thought there might be a more
    Artur>  transparent way, maybe with another db module.

You might want to check out the shelve module.  The keys must still be
strings, but it transparently handles serialization of the values.

-- 
Skip Montanaro (skip@pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/

-- 
http://mail.python.org/mailman/listinfo/python-list
Thread:
Artur Skura
Skip Montanaro

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved