[Tutor] Gadfly... missing?

alan.gauld@bt.com alan.gauld@bt.com
Wed, 20 Mar 2002 17:45:13 -0000


> This actually raises a quick question -- are there any 
> small-scale open source relational databases?  

There are several but I've no idea of the functionality on 
offer- try a google or sourceforge search. BUT...

> easily embedded into a Python program.  Or is the preferred means of 
> storing things like "preferences" to place them in a file?  I am 
> interested in something that can run in Unix or Linux.

...preferences etc are almost certainly better in a file (which 
is why unix programsd traditionally have a .foorc file) and in 
windows foo.ini. Windows even has a dedicated set of API calls 
for building and searching .ini files. Of course nowadays it 
should be the registry but personally I wouldn't trust 
anything to that!

> MySQL would be perfect except that it is really overkill to 
> what I have in mind -- I'm thinking of something light and 
> small that can store or retrieve data for a program 

Consider non relational databases then.
The DBM module should be adequate for your needs or as another 
approach (more Pythonic? )create a config object(class) with 
all the config variables in it and then pickle/unpickle 
that object.

Alan G.