[Tutor] implementing a table data structure in python?

Alan Gauld alan.gauld at freenet.co.uk
Tue Dec 21 23:58:54 CET 2004


> Normally I'd use a database like mysql, postgreSQL, or even SQLite
for this
> sort of application, but the server I'm working on (which is outside
my
> control) does not have any of these installed.
>
> The CGI will not see heavy use, and I'm not very worried about race
conditions
> or collisions...
>
>
> Does anyone have any advice for me? implementing this as a simple 2D
array (or
> list of lists) seems a little silly - surely there's a better way?

Hows about a dictionary of lists. A key per column. The
users pick which columns and you retrieve the lists. And
of course shelve will treat a file like a dictionary...


HTH,

Alan G.



More information about the Tutor mailing list