persistant options

Andrei Kulakov sill at sill.silmarill.org
Sun Dec 16 16:09:48 EST 2001


In article <slrna1q0ud.pf6.sill at sill.silmarill.org>, Andrei Kulakov wrote:
> Hello,
> 
> I'm looking for solutions or advice on persistant options / config file.
> 
> Here's an example file:
> 
> ~/.programrc
>     # this option does [...]
>     opt1 = 3
> 
> When the program is run and this option's changed from inside program,
> it should be written back to the config file.
> 
> I know how to do this but I thought maybe there's a module that does
> this sort of thing already. I searched VoP but there's nothing of this
> sort there.. It seems like a lot of programs would benefit from this
> capability.. right?
> 
>  - Andrei
> 

When I was asking that question, I thought about having a conf file
that's both modified by user directly and updated by program when user
changes some options there, but now that I thought about this, I
realized some options should be in a conf file and shouldnt' be changed
from inside program at all, while others can be changed from the program
and kept in a shelve file or a dbm file and shouldn't be in the conf
file. Thanks to all who answered!

 - Andrei

-- 
Cymbaline: intelligent learning mp3 player - python, linux, console.
get it at: cy.silmarill.org



More information about the Python-list mailing list