Video Catalogue

Harlin Seritt hps3 at seritt.org
Thu Dec 2 06:31:23 EST 2004


Tom B.:

If you're not having trouble saving with dict then use that. You only need
pickle if using lists or dicts are not doing the job when the data in them
are integers or long.


"Tom B." <sbabbitt at commspeed.net> wrote in message
news:1101957359.806647 at news.commspeed.net...
>
> "Rodney Dangerfield" <rahorkuit at yahoo.com> wrote in message
> news:755b5724.0411300353.654d7db6 at posting.google.com...
> > Greetz!
> >
> > Recently I started creating a CGI application for my gf that
> > she would use for indexing and keeping track of her video
> > collection.
> >
> > I am relatively new to python so I started with the basics.
> > I figured out how to extract the form field values in a
> > script and how to save to a file.
> >
> > My question is which data type should I use to store the information
> > about the videos? I was thinking of using a dictionary variable,
> > I saw something about the pickle module too, could I use it to
> > save the state of my dictionary to a file and than later read it
> > and feed values from it to the form fields via CGI?
> >
> > All help is greatly appreciated.
>
> I think a dictionary might work well, I might use a dictionary within a
> dictionary.
>
> vidiodict =
>
{'Title':{'description':'','date':'','cast':'','length':'130.99','comments':
''}}
>
> that way you could look at vidiodict['Title']['length'] it returns
'130.99'.
>
> Tom
>
>





More information about the Python-list mailing list