python读写配置文件
来源:互联网 发布:淘宝分销什么产品好 编辑:程序博客网 时间:2024/06/02 03:45
import configparserself.config = configparser.ConfigParser()self.config.read("Config.ini")try: self.rkusername.setText(self.config.get("rk", "username")) self.rkpassword.setText(self.config.get("rk", "Password")) #读取except: passtry: self.config.add_section("rk") #写入 self.config.set("rk", "username", self.rkusername.text()) self.config.set("rk", "Password", self.rkpassword.text()) self.config.write(open("Config.ini", "w"))except: pass
0 0
- python 读写 .ini 配置文件
- python 读写ini配置文件
- python读写配置文件
- python读写配置文件
- python读写csv_xml_json配置文件
- python读写配置文件
- Python读写配置文件
- 【python】ConfigParser---读写配置文件
- 【python】configparser读写配置文件
- python读写配置文件
- python-ConfigParser模块【读写配置文件】
- python-ConfigParser模块【读写配置文件】
- python-ConfigParser模块【读写配置文件】
- python-ConfigParser模块【读写配置文件】
- python-ConfigParser模块【读写配置文件】
- python-ConfigParser模块【读写配置文件】
- 规范Python程序配置文件读写
- python-ConfigParser模块【读写配置文件】
- EJB和JBOSS的宏观理解
- MySQL安装
- 结构型之桥接模式
- C陷阱与缺陷(四)--声明与定义2
- map与unordered_map
- python读写配置文件
- 编程之法第一章【回文判断+字符串转化成整数】
- java第五天--protected权限
- ubuntu14.04 下让vim8.0开启python2.x 和 python3.x支持
- Red Hat 7.0 如何修改root密码
- jaxb入门
- 广西中公教育各分部地址及联系方式
- Is Subsequence
- Apache配置PHP开发环境