tool.read_config
作用:
增、删、改、查、数据库内容。
必要操作:
>>> from tool.read_config import ReadConfig >>> from tool import project_path
帮助查看:
>>> help(tool)
或 单独查看某个方法(函数)
>>> help(tool.read_config)
方法(函数):
#read_config文件中ReadConfig是静态方法,不用实例化 db_config = eval(ReadConfig.get_config(project_path.case_config_path,"DB","db_config")) print(db_config) #关键字参数传递 cnn = pymysql.connect(**db_config)
参考:
https://www.jianshu.com/p/e266137ebca0