19.02.2016, 05:21
I want to add that it is terrible practice to open and close the file for each line written. This leads to lots of unnecessary IO and it is very slow. Open file, loop, close files. The structure also does not follow the INI file format so it shouldn't realistically have the extension .ini, either.