Browsed by
Month: May 2020

How to read configurations from an .ini file in Python

How to read configurations from an .ini file in Python

Reading a configuration file like .ini file is fairly simple in Python. First we need to have an ini file as shown below : The above file is an .ini file which contains sections in square brackets as [SectionName]. Then a section contains few key value pairs as IPAddress = 192:168:1:10 To read such a file, we need to mention the section name as well as the key name inside the section whose value we want to retrieve. Below mention…

Read More Read More