How to store data?

Lars Behrens Spam.Buster at web.de
Sat Aug 23 17:21:02 EDT 2003


Hi there!

For a web project I need a little expert help. I don't have written much 
code yet, just been fiddling around a bit, testing and planning.

The web site will have a submission page for attendants of a congress. 
In a form the user will submit name, mailadress etc. and I plan to store 
the data in a list of dictionaries:

People = [{'name' : 'Sir Galahad', 'address' : 'Camelot', 'mail' : 
'Carrierpigeon at england.com'}]

#new attendant:
People.append({'name' : 'Brian', 'address' : 'Palestine', 'mail' : 
'fastridingmessenger at rome.com'})

The 'lines' can be accessed by their index.

Now my question: Where do you suggest to store the data? I know that 
something sql-like would be quite useful but I don't have any knowledge 
of sql. So I thought about putting the data either into a comma 
separated file or pickling it.

I should mention that some other people on different operation systems 
should be able to import the file (Excel, Open Office) so I tend towards 
the csv file.

What would be better?

And another problem: How to lock the file when several users try to 
write to it?

As I'm no very experienced programmer I would appreciate your help,
thanks in advance

Cheerz Lars














More information about the Python-list mailing list