Books Database

Bernhard Herzog bh at
Mon Mar 3 17:50:56 CET 2003

Eliran Gonen <eg at> writes:

> Hello !
> I want to ask you what do you think is the best way to keep
> a list of books with other data (such as year and author) in a
> file ?

One format I've been using for this kind of thing is a python source
file which contains function calls looking something like this:

Book(title = "Hitchhiker's Guide to the Galaxy",
     author = "Douglas Adams",
     year = "can't remember",
     note = "Don't Panic!")

You can then parse it with execfile and a suitably defined function


Intevation GmbH                       

More information about the Python-list mailing list