NIlesh Meharkar NIlesh Meharkar - 11 months ago 24
Python Question

How to read config(.ini) file in python which will work on 2.7 and 3.x python

Should I use

witch compatible with python 2.7 and 3.x, or do you suggest any other module in python which is compatible for both versions for reading config file?


You can make use of configparser backport, so it will work on both Python version.

pip install configparser