摘要: 一.推导 : 1.创建日志对象 2. 创建handler对象控制输出到控制台或文件 3.创建日志格式 4.为handler对象绑定日志格式 5.为logger对象绑定handler 6.设置日志级别 import logging #介绍 # logging.basicConfig( # # file 阅读全文
posted @ 2019-11-19 21:10 躺云飘 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1.调用cmd命令,并在打印台输出 subprocess.Popen() 参数解释: cmd_str: cmd命令 shell=True : 调用shell解释器解释cmd命令 stdout=subprocess.PIPE: 输出正确的数据存放在此内存数据类型PIPE中 stderror=subpr 阅读全文
posted @ 2019-11-19 21:02 躺云飘 阅读(268) 评论(0) 推荐(0) 编辑
摘要: import re #博客截图 # 数字字母下划线 print(re.findall('\w','egon 123 + _ - *')) # 非数字字母下划线 print(re.findall('\W','egon 123 + _ - *')) #匹配空白字符 print(re.findall('\ 阅读全文
posted @ 2019-11-19 21:01 躺云飘 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 待更新 阅读全文
posted @ 2019-11-19 20:58 躺云飘 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 1.openpyxl模块 excel xlsx格式 openpyxl模块 == xls格式 xlrd + xlwt 读写数据 workbook() sheet cell from openpyxl import Workbook book_obj = Workbook() sheet1 = book 阅读全文
posted @ 2019-11-19 20:57 躺云飘 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 1.作用:collections 模块 提供(整型 、浮点型、字符串、字典、元组、列表、集合、布尔) 提供一些python八大数据类型 “以外的数据类型” 阅读全文
posted @ 2019-11-19 20:56 躺云飘 阅读(103) 评论(0) 推荐(0) 编辑