Video Catalogue

Tom B. sbabbitt at commspeed.net
Wed Dec 1 21:57:48 EST 2004


"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