473,396 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.
Jul 18 '05 #1
2 1129

"Rodney Dangerfield" <ra*******@yahoo.com> wrote in message
news:75**************************@posting.google.c om...
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':'','le ngth':'130.99','comments':''}}

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

Tom
Jul 18 '05 #2
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." <sb******@commspeed.net> wrote in message
news:11***************@news.commspeed.net...

"Rodney Dangerfield" <ra*******@yahoo.com> wrote in message
news:75**************************@posting.google.c om...
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':'','le ngth':'130.99','comments':
''}}
that way you could look at vidiodict['Title']['length'] it returns '130.99'.
Tom

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nick Kew | last post by:
Rationale ========= Many applications today benefit from an SGML and/or XML Entity Catalogue to dereference entities referenced by a Public Identifier. For a validating SGML parser this is an...
0
by: melledge | last post by:
XTech 2006, 17-19 May, Amsterdam, The Netherlands www.xtech.org Ajax lightning demos line-up The provisional line-up for the Ajax lightning demos is now available. These will be rapid-fire...
12
by: Pallas | last post by:
Hi all, I've produced some high-def videos and I want people to be able to watch them on my website, but I may want to prevent downloads and I certainly want to prevent them from editing them....
3
by: lapkorts | last post by:
Hi, I am looking for product catalogue/shop, preferable for Joomla or known CMS with the following two features: 1. Multidimentional. I.e. each product could belong to several trees/ branches...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.