[Tutor] output of dictionaries
Gabriel Farrell
gsf at panix.com
Tue May 10 19:00:46 CEST 2005
take a look at pickle and shelve. info about both can be found at
http://docs.python.org/lib/python.html
On Tue, May 10, 2005 at 08:46:50AM -0700, Tom Cloyd wrote:
> I'm creating a small database using a dictionary of dictionaries, and I
> want to output it to a file. It seems that only strings can be output to
> files, and I cannot quite figure out how to quickly and simply convert my
> dictionary to a list of strings or whatever. Or maybe I'm going about this
> all wrong.
>
> So, the most general form of my question: how can I store a dictionary
> containing some data records stored as dictionaries - a dictionary of
> dictionaries - in a file, so I can read it back in later and process its
> contents?
>
> Thank you very much for your generosity in giving some of your time to
> this service. I'm very grateful.
>
> -- t.
>
> ======================================================
> Tom Cloyd
> Bellingham, Washington, U.S.A: (360) 920-1226
> << BestMindHealth.com >>
> ======================================================
>
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list