Video Catalogue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rodney Dangerfield

    #1

    Video Catalogue

    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.
  • Tom B.

    #2
    Re: Video Catalogue


    "Rodney Dangerfield" <rahorkuit@yaho o.com> wrote in message
    news:755b5724.0 411300353.654d7 db6@posting.goo gle.com...[color=blue]
    > 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.[/color]

    I think a dictionary might work well, I might use a dictionary within a
    dictionary.

    vidiodict =
    {'Title':{'desc ription':'','da te':'','cast':' ','length':'130 .99','comments' :''}}

    that way you could look at vidiodict['Title']['length'] it returns '130.99'.

    Tom


    Comment

    • Harlin Seritt

      #3
      Re: Video Catalogue

      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@comms peed.net> wrote in message
      news:1101957359 .806647@news.co mmspeed.net...[color=blue]
      >
      > "Rodney Dangerfield" <rahorkuit@yaho o.com> wrote in message
      > news:755b5724.0 411300353.654d7 db6@posting.goo gle.com...[color=green]
      > > 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.[/color]
      >
      > I think a dictionary might work well, I might use a dictionary within a
      > dictionary.
      >
      > vidiodict =
      >[/color]
      {'Title':{'desc ription':'','da te':'','cast':' ','length':'130 .99','comments' :
      ''}}[color=blue]
      >
      > that way you could look at vidiodict['Title']['length'] it returns[/color]
      '130.99'.[color=blue]
      >
      > Tom
      >
      >[/color]


      Comment

      Working...