Should I use ConfigParser
which is compatible with python 2.7 and 3.x or do you suggest any other module in python which is compatible with both versions of python for reading config file?
You can make use of configparser
backport, so it will work on both Python version.
pip install configparser