Hello Homeseerians,
A question for the programming guru's, I am looking at the best way to be able to not hard code in data through my scripts, and wanted to move towards using INI files to store the data, and then retrieve it (relating to IP addresses and so on).
I understand with the ini settings, one could have something like below in their own ini file (in the config folder)
[setting1]
IP=127.0.0.1
PORT=80
[setting2]
IP=127.0.0.2
PORT=81
[setting3]
IP=127.0.0.3
PORT=82
My question is, how could I determine the number of setting sections, it would be nice to be able to have this as a semi-array, or at least be able to know the number of clients or settings sections I have when they are variable, how are others handling this variability, and would you have some tips you are willing to share on how to identify the number of clients / sections within an ini file,
Thanks
A question for the programming guru's, I am looking at the best way to be able to not hard code in data through my scripts, and wanted to move towards using INI files to store the data, and then retrieve it (relating to IP addresses and so on).
I understand with the ini settings, one could have something like below in their own ini file (in the config folder)
[setting1]
IP=127.0.0.1
PORT=80
[setting2]
IP=127.0.0.2
PORT=81
[setting3]
IP=127.0.0.3
PORT=82
My question is, how could I determine the number of setting sections, it would be nice to be able to have this as a semi-array, or at least be able to know the number of clients or settings sections I have when they are variable, how are others handling this variability, and would you have some tips you are willing to share on how to identify the number of clients / sections within an ini file,
Thanks
Comment