![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python各种库详解
文章平均质量分 55
sweet tea111
一只努力了一点的小菜鸟
展开
-
CRC/MD5/SHA1详细解析
1.CRC原创 2021-09-02 16:02:54 · 528 阅读 · 0 评论 -
Python----字典详解
1.判断字典中是否存在某个键 arr = {"int":"整数","float":"浮点"} #使用in方法 if "int" in arr: print("pass") if "float" in arr.keys(): print("pass") if "int" not in arr: print("wrong") ----------------------------------------------------------------------------- #使用h原创 2021-07-27 09:56:27 · 145 阅读 · 0 评论 -
Openpyxl库对excel的常规处理详解
1.表格文件和工作簿:导入,创建 from openpyxl import load_work #openpyxl仅支持xlsx,如果表格文件不在脚本所在目录下,则需填ecel文件的完整路径 wb = load_work("xxx.xlsx") ws = wb.active#激活工作表,得到第一张工作表,至少有一个工作表 ws = wb.get_sheet_by_name("xxx")#通过工作表名字得到 ws1 = wb.create_sheet() #默认在最后插入 ws1.title = "xxx"原创 2021-06-29 14:53:06 · 346 阅读 · 0 评论 -
Python定位元素汇总
1.通过ID定位元素 如果id不是动态的,一个页面的id是唯一的,最简单的定位方式。 find_element_by_id(“id_value”) eg: find_element_by_id(“kw”) 2.通过class_name class_name一般情况下都是易重复的 find_element_by_class_name(“class_name_value”) eg:find_element_by_class_name(“s_ipt”) 3.通过name name有可能重复 find_elemen原创 2021-01-14 13:41:33 · 2379 阅读 · 1 评论 -
HTMLTestRunner生成报告
#coding:utf-8 import os, time, unittest import HTMLTestRunner #需要对HTMLTestRunner.py进行修改 #第94行,将import StringIO修改成import io #第539行,将self.outputBuffer = StringIO.StringIO()修改成self.outputBuffer = io.StringIO() #第642行,将if not rmap.has_key(cls):修改成if not cls i原创 2021-01-11 17:12:25 · 175 阅读 · 0 评论 -
Python--多线程详解
1.1创建线程--_thread模块函数式线程 # -*- coding:utf-8 -*- import _thread import time #_thread相对于threading功能较少,所以很少使用 #线程调用的方法 def print_time(threadName, delay): count = 0 while count < 5: time.sleep(delay) count += 1 print('%s : %s'原创 2020-12-01 16:29:26 · 107 阅读 · 0 评论