Video Catalogue

Discussion in 'Python' started by Rodney Dangerfield, Nov 30, 2004.

  1. 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.
    Rodney Dangerfield, Nov 30, 2004
    #1
    1. Advertising

  2. Rodney Dangerfield

    Tom B. Guest

    "Rodney Dangerfield" <> wrote in message
    news:...
    > 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
    Tom B., Dec 2, 2004
    #2
    1. Advertising

  3. 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." <> wrote in message
    news:...
    >
    > "Rodney Dangerfield" <> wrote in message
    > news:...
    > > 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
    >
    >
    Harlin Seritt, Dec 2, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Royal
    Replies:
    15
    Views:
    802
    Jim Royal
    Jan 14, 2005
  2. Replies:
    3
    Views:
    448
    Travis Newbury
    Feb 8, 2006
  3. Nick Kew
    Replies:
    0
    Views:
    325
    Nick Kew
    Sep 10, 2003
  4. melledge
    Replies:
    0
    Views:
    437
    melledge
    May 3, 2006
  5. mark | r

    req: prebuilt product catalogue system

    mark | r, Jul 9, 2003, in forum: ASP General
    Replies:
    0
    Views:
    119
    mark | r
    Jul 9, 2003
Loading...

Share This Page