Tag:ini
-
C / C + + INI file operation implementation code
1、 Purpose of INI file: 1. Stored program initialization information;2. Store the data information to be saved. 2、 INI file structure: It consists of section name, key name and key value. The form is as follows:[section name]Key name = key value Note: multiple sections can be used for an INI file. 3、 Read INI file […]
-
Shell script reads standard ini configuration file demo
ini DEMO Copy codeThe code is as follows: [TESTFTP] host=127.0.0.1 name=my pass=mylove type=ftp [TESTSSH] host=127.0.0.1 name=my pass=mylove type=ssh [END] Shell script: Copy codeThe code is as follows: initConf() { HOSTID=$1 CONF=$2 echo “—-cat—-“ cat $CONF \\ | grep -v ^$ \\ | sed -n “s/\\s\\+//;/\\[${HOSTID}\\]/,/^\\[/p” \\ | grep -v ^’\\[‘ echo “—-INFO—-“ […]
-
Python read ini configuration class encapsulation code instance
This article mainly introduces the python read ini configuration class encapsulation code example, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to This is the basic encapsulation, without considering too much exception handling class # coding:utf-8 import configparser import […]