Stupid question with (for sure) simple answer...
I am using configparser to read some strings from a file. When the string has the '%' symbol ($%& for example) it complains:
ConfigParser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: "%&'"
Anybody familiar with this?
Thanks!
If you don't want environment variable substitution, then use RawConfigParser, not ConfigParser.
Write two
%
:result:
In newer Python versions, use
This disables interpolation.
Note that
RawConfigParser
is a legacy variant. From the python docs: