摘要: logging模块 是用来记录日志的模块,一般记录用户在软件中的操作 #logging配置 import os import logging.config # 定义三种日志输出格式 开始 standard_format = '[%(asctime)s][%(threadName)s:%(thread 阅读全文
posted @ 2019-11-19 19:49 Parado 阅读(124) 评论(0) 推荐(0) 编辑
摘要: re模块 - 1)什么是正则表达式与re模块? - 正则表达式: 正则表达式是一门独立的技术, 任何语言都可以使用正则表达式, 正则表达式是由一堆特殊的字符组合而来的。 - 字符组 - 元字符 - 组合使用 - re模块: 在python中,若想使用正则表达式,必须通过re模块来实现。- 2)为什么 阅读全文
posted @ 2019-11-19 19:43 Parado 阅读(197) 评论(0) 推荐(0) 编辑
摘要: ubprocess模块 可以通过python代码给操作系统终端发送命令, 返回结果。 ''' subprocess: sub: 子 process: 进程 ''' import subprocess while True: # 1.让用户输入终端命令 cmd_str = input('请输入终端命令 阅读全文
posted @ 2019-11-19 19:33 Parado 阅读(133) 评论(0) 推荐(0) 编辑