av一区二区在线观看_亚洲男人的天堂网站_日韩亚洲视频_在线成人免费_欧美日韩精品免费观看视频_久草视

您的位置:首頁技術文章
文章詳情頁

python操作toml文件的示例代碼

瀏覽:83日期:2022-07-04 09:19:23

# -*- coding: utf-8 -*-# @Time : 2019-11-18 09:31# @Author : cxa# @File : toml_demo.py# @Software: PyCharmimport tomlimport osBASE_DIR = os.path.dirname(os.path.abspath(__file__))class FileOperation: def __init__(self): self.dic = dict() self.toml_file_path = os.path.join(BASE_DIR, 'config.toml') def __add__(self, other): self.dic.update(self.other) return self.dic def write(self): mysql_dic = {'user': 'root', 'password': 'Aa1234'} mysql2_dic = {'user1': 'root', 'password2': 'Aa1234'} mysql_dic.update(mysql2_dic) with open(self.toml_file_path, 'w', encoding='utf-8') as fs: toml.dump(mysql_dic, fs) def read(self): with open(self.toml_file_path, 'r', encoding='utf-8') as fs: t_data = toml.load(fs) return t_dataif __name__ == ’__main__’: f = FileOperation() data = f.read() print(data)

以上就是python操作toml文件的示例代碼的詳細內容,更多關于python操作toml文件的資料請關注好吧啦網其它相關文章!

標簽: Python 編程
相關文章:
主站蜘蛛池模板: 日韩大片在线观看 | 五月激情丁香 | 国产精品一区二区免费 | 综合伊人 | 自拍偷拍欧美日韩 | 免费黄色av| 久久国产精品免费视频 | 懂色av一区二区三区 | 欧美 日韩 国产 成人 在线 | 久久性色 | 欧美在线视频观看 | 人人爱人人 | 成年人视频在线播放 | 九九成人 | 91爱看 | 激情综合网五月 | 夜夜av| 欧美精品入口蜜桃 | 久久青青操 | 中文在线字幕免费观 | 99热亚洲| 亚洲成人中文字幕 | 久久久亚洲精品视频 | www五月天| 欧美日韩一区二 | 久久久综合网 | 在线亚洲天堂 | 成人网在线| 伊人成人在线 | 天天干天天操天天爽 | 欧美偷拍视频 | 久久精品在线视频 | 日韩a级片| 欧美精品三区 | av在线播放免费 | 中文天堂在线观看 | 在线成人小视频 | 99久久婷婷国产综合精品草原 | 亚洲国产成人在线 | 日韩国产欧美 | 精品在线看 |