Could python configparser
module generate .ini file as follows:
sample (this entire line written to outfiles)
other comments (this entire line discarded)
IOFILES Keyword, don't edit this line
tset.txt Name of input meteorological data file
test Prefix for output file
CONTROL Keyword, don't edit this line
1 (int) Number of header lines in input file
11680 (int) Number of days of data in input file
PARAMETERS Keyword, don't edit this line
500.0 (double) Base station elevation, meters
50.0 (double) Base station annual precip isohyet, cm
48.0 (double) Site latitude, degrees (- for south)
END Keyword, don't edit this line
All the parameters valuses set flush, and use space to seperate valuse and parameters illustrators.
I will build many ini files like above used as .exe program parameter setting. Different ini file with different parameters, but could generate through a loop. Are there any other ways to accomplish?