Quote:

Well, you'll eventually will edit either INI file or the scrpt itself. What's the difference?




It is a basic question of design philosophy.

One is a program (script) and the other is a data source. It is a question of change control, limiting the effect of exceptions and introducing lines of demarcation or responsibility.

Including what is quite clearly "data" hard coded in a script is a bad idea. Here are a couple of obvious reasons:
  • It's hard to add a front-end to automate the update of the information if it is hard-coded in the script.
  • It is trivial to add a front end to update the information if it is stored in a data source.
  • Changing a script runs the risk of introducing errors which will make the script fail or behave unexpectedly. These sort of errors may take time to surface and diagnose. The scope of the problems that may surface cannot be limited.
  • Changes to a data source are simpler and finite in scope. They are less likely to be incorrect, and can be checked programatically to ensure that they are consistant and sensible


The more often you are going to make changes, the more often you are likely to introduce errors.

Now, in your situation you may be the only person who will ever update the script, and the updates may be few and far between. In this case it may not suit you to change your methodology - however switching to an INI file requires very little change and you will thank us for it later