[ANN] ConfigObj 4.2.0

F

Fuzzyman

`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`` and UTF8 encodings.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,744
Latest member
CortneyMcK

Latest Threads

Top