摘要: '''hashlib模块提供了很多加密的算法'''import hashlibdef hashlib_encode(): salt = '321321' content = "admin" md5 = hashlib.md5(bytes(salt,encoding='utf8')) md5.upda 阅读全文
posted @ 2019-07-02 21:18 天0涯 阅读(143) 评论(0) 推荐(0) 编辑
摘要: '''ConfigParser 是用来读取配置文件的包''' import configparserconfig = configparser.ConfigParser()config.read("ini", encoding="utf-8")def config_test(): # 获取配置文件下 阅读全文
posted @ 2019-07-02 18:14 天0涯 阅读(140) 评论(0) 推荐(0) 编辑
摘要: import loggingdef loggin_config(): ''' logging.basicConfig函数各参数: filename:指定日志文件名; filemode:和file函数意义相同,指定日志文件的打开模式,'w'或者'a'; format:指定输出的格式和内容,format 阅读全文
posted @ 2019-07-02 17:38 天0涯 阅读(624) 评论(0) 推荐(0) 编辑