Sorry for not replying promptly... Too much real-life going on at the moment.
> Is it hard to implement? May be you can provide me with some pointer
> on how to do it myself.
The implementation of variable interpolation is quite straightforward
- see the _interpolate() function in compat.ConfigParser and
compat.SafeConfigParser. That will have to move to a function within
INISection, I suppose.
The complicated questions are: (1) how do turn interpolation on and
off. Maybe use separate classes, like ConfigParser does? That's a
bit more convoluted since there are multiple iniparse classes -
INIConfig and INISection. (2) Remove existing variable interpolation
code from the compat.* classes, and make sure they work without it.
> Actually I'm new to Python and was pretty surprised with the fact that
> leading spaces/tabs are not supported, because in other C/C++
> libraries I've used so far it was OK. As far as I've seen Ruby config
> parser supports this feature as well.
> I would not call incompatible, it would be still backward-compatible
> with ConfigParser. Iniparse will just have more features.
> If you implement it, I'm ready to test it right away.
I'll think about the feature... meanwhile, here's one thing you can
do. INIParse supports parsing streams instead of files. If you
wrapped your file in a function that removed leading whitespace on
reading, and added it back on writing, you could get this behavior
without any changes to iniparse.
-param