`ConfigObj 4.2.0 http://www.voidspace.org.uk/python/configobj.html`_ is now available. The main improvements are *full* Unicode support,a s well as the addition of the 'convenience' `Section Methods http://www.voidspace.org.uk/python/configobj.html#section-methods`_ * *as_bool* * *as_int* * *as_float* More compelling reasons to choose **ConfigObj** for reading and writing config files in Python. What's New ? ========== The full changelog is : Removed ``BOM_UTF8`` from ``__all__``. The ``BOM`` attribute has become a boolean. (Defaults to ``False``.) It is *only* ``True`` for the ``UTF16`` encoding. File like objects no longer need a ``seek`` attribute. Full unicode support added. New options/attributes ``encoding``, ``default_encoding``. ConfigObj no longer keeps a reference to file like objects. Instead the ``write`` method takes a file like object as an optional argument. (Which will be used in preference of the ``filename`` attribute if that exists as well.) utf16 files decoded to unicode. If ``BOM`` is ``True``, but no encoding specified, then the utf8 BOM is written out at the start of the file. (It will normally only be ``True`` if the utf8 BOM was found when the file was read.) File paths are *not* converted to absolute paths, relative paths will remain relative as the ``filename`` attribute. Fixed bug where ``final_comment`` wasn't returned if ``write`` is returning a list of lines. Deprecated ``istrue``, replaced it with ``as_bool``. Added ``as_int`` and ``as_float``. What is ConfigObj ? =============== **ConfigObj** is a simple but powerful config file reader and writer: an *ini file round tripper*. It's main feature is that it is very easy to use, with a straightforward programmer's interface and a simple syntax for config files. It has lots of other features though. It is intended as a more powerful (but simpler to use) replacement for `ConfigParser http://docs.python.org/lib/module-ConfigParser.html`_. It's features include : * Nested sections (subsections), to any level * List Values * Multiple Line Values * Full Unicode support * String interpolation (substitution) * Integrated with a powerful validation system - including automatic type checking/conversion - repeated sections - and allowing default values * All comments in the file are preserved * The order of keys/sections is preserved * No external dependencies
participants (1)
-
Fuzzyman