On Thu, 01 May 2008 08:30:03 -0500, Nick Craig-Wood wrote: > Lance Gamet <[EMAIL PROTECTED]> wrote: >> This project will store most of its actual data in a shared-database, >> but I have a small amount of user specific data that I need to be >> stored like configuration or preferences for example, the list of >> databases that the program should connect to. >> >> On Unix this might be a .file, on windows this could be in the >> registry, or an ini file or an xml file in ProgramData or AppData or >> something. >> >> Is there a pythony way to store such config data, perhaps there is >> already a standard python package for such a purpose? > > I've found > > http://docs.python.org/lib/module-ConfigParser.html > > To be easy to use and built in. It makes human readable / editable .ini > - like files.
IMO .ini-like config files are from the stone age. The modern approach is to use YAML (http://www.yaml.org). It has a lot of advantages over .ini and xml, YAML syntax was designed to be easily mapped to Python data types and is very similar to Python. More at http://en.wikipedia.org/wiki/YAML As for where to store it, I completely agree with Nick Craig-Wood. -- Ivan -- http://mail.python.org/mailman/listinfo/python-list