Python Programming, news on the Voidspace Python Projects and all things techie.
ConfigObj Ported to Python 3
ConfigObj is a configuration file reader for Python. It has a very simple API for both reading and writing config files, with support for nested sections and features like preserving ordering, comments and whitespace in ini files.
Unfortunately I haven't had time to port ConfigObj to Python 3, however Zubin Mithra and Prashant Kuma have stepped up and done the port! At the moment the port lives in a mercurial repository on bitbucket.
This port is not maintained by me, but it is "officially blessed".
ConfigObj for Python 3 includes a port of validate, so schema validation works. The next step is to get the Python 3 version up on PyPI. Like unittest for Python 3 this will probably have a different distribution name from the Python 2 version but the same module name.
Putting both versions up on the same PyPI page isn't useful because tools like pip will just download the most recently uploaded distribution file from a PyPI project and don't allow you to differentiate between different distributions within a single project.
Tools like tox (automated cross-python-version test automation) do allow you to specify different dependencies for different versions of Python, so this approach works well.
This work is licensed under a Creative Commons Attribution-Share Alike 2.0 License.