Pauser added the comment:
Thanks a lot for the fast response ... did not expect this ;)
I have looked into many threads and I will try to implement my own
interpolation to use the current basic interpolation and process the current
environment.
So thanks a lot, stay healthy and have a nice
Ronald Oussoren added the comment:
There's multiple options:
1. Escape '%' in environment variables (%%not_existing%%) to avoid the exception
2. Switch to configparser.ExtendedInterpolation for the interpolation, which
uses a different syntax that doesn't conflict with env. variables on
Pauser added the comment:
So I have to use two config parser objects to merge the configuration of one
config.ini (needs interpolation) and the environment on windows ?
So at the end choose wether to use environment variables or config parser
interpolation, right? (only on windows)
Not
Ronald Oussoren added the comment:
The exception is due to the interpolation feature of ConfigParser, which
expects a different syntax. The default interpolation syntax is "%(key)s".
Interpolation can be turned off by passing "interpolation=None" when creating
the ConfigParser object.
See
New submission from Pauser :
Hello,
I tried to extend our config processing using the environment variables and the
configparser module.
On some machines (all windows) the configparser failed with an
InterpolationSyntaxError ...
It seems that not resolved environment variables (e.g.