Books Database
Bernhard Herzog
bh at intevation.de
Mon Mar 3 11:50:56 EST 2003
Eliran Gonen <eg at rootshell.be> 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
"Book".
Bernhard
--
Intevation GmbH http://intevation.de/
Sketch http://sketch.sourceforge.net/
MapIt! http://www.mapit.de/
More information about the Python-list
mailing list