python读取配置文件
import configparser
cf = configparser.ConfigParser()
cf.read("config.ini", encoding='UTF-8')
username=cf.get("user","username")
auto=cf.get("autologin","auto")
config.ini
[user]
username=abcd
[autologin]
auto=1
import configparser
cf = configparser.ConfigParser()
cf.read("config.ini", encoding='UTF-8')
username=cf.get("user","username")
auto=cf.get("autologin","auto")
config.ini
[user]
username=abcd
[autologin]
auto=1