"Rodney Dangerfield" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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 -- http://mail.python.org/mailman/listinfo/python-list